Skip to content

Commit f4942b3

Browse files
gyxos-loganslouken
authored andcommitted
GPU: Update D3D12 to create multisample textures with default MSAA alignment
1 parent c7549eb commit f4942b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gpu/d3d12/SDL_gpu_d3d12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3346,7 +3346,7 @@ static D3D12Texture *D3D12_INTERNAL_CreateTexture(
33463346

33473347
if (createinfo->type != SDL_GPU_TEXTURETYPE_3D) {
33483348
desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
3349-
desc.Alignment = isSwapchainTexture ? 0 : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
3349+
desc.Alignment = isSwapchainTexture ? 0 : isMultisample ? D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
33503350
desc.Width = createinfo->width;
33513351
desc.Height = createinfo->height;
33523352
desc.DepthOrArraySize = (UINT16)createinfo->layer_count_or_depth;

0 commit comments

Comments
 (0)