Skip to content

Commit

Permalink
[d3d11] Compute image data layout for unmapped textures
Browse files Browse the repository at this point in the history
We sometimes need this information when uploading image data. Fixes #2380.
  • Loading branch information
doitsujin committed Nov 29, 2021
1 parent b6cd6aa commit 1abd205
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/d3d11/d3d11_texture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ namespace dxvk {
layout.DepthPitch = vkLayout.depthPitch;
} break;

case D3D11_COMMON_TEXTURE_MAP_MODE_NONE:
case D3D11_COMMON_TEXTURE_MAP_MODE_BUFFER:
case D3D11_COMMON_TEXTURE_MAP_MODE_STAGING: {
auto packedFormatInfo = imageFormatInfo(m_packedFormat);
Expand Down Expand Up @@ -304,9 +305,6 @@ namespace dxvk {
layout.Offset += size;
}
} break;

case D3D11_COMMON_TEXTURE_MAP_MODE_NONE:
break; /* no op */
}

// D3D wants us to return the total subresource size in some instances
Expand Down

0 comments on commit 1abd205

Please sign in to comment.