GPU: Update D3D12 to create multisample textures with default MSAA alignment

(cherry picked from commit f4942b3eae)
This commit is contained in:
Logan
2025-05-20 13:29:42 +12:00
committed by Sam Lantinga
parent 195f709eda
commit ef97329f41

View File

@@ -3350,7 +3350,7 @@ static D3D12Texture *D3D12_INTERNAL_CreateTexture(
if (createinfo->type != SDL_GPU_TEXTURETYPE_3D) { if (createinfo->type != SDL_GPU_TEXTURETYPE_3D) {
desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D; desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
desc.Alignment = isSwapchainTexture ? 0 : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; desc.Alignment = isSwapchainTexture ? 0 : isMultisample ? D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT : D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT;
desc.Width = createinfo->width; desc.Width = createinfo->width;
desc.Height = createinfo->height; desc.Height = createinfo->height;
desc.DepthOrArraySize = (UINT16)createinfo->layer_count_or_depth; desc.DepthOrArraySize = (UINT16)createinfo->layer_count_or_depth;