diff --git a/test/testgpu_spinning_cube.c b/test/testgpu_spinning_cube.c index 1dbc9b1eae6b15..02657893d4f35d 100644 --- a/test/testgpu_spinning_cube.c +++ b/test/testgpu_spinning_cube.c @@ -279,12 +279,12 @@ CreateMSAATexture(Uint32 drawablew, Uint32 drawableh) } msaatex_createinfo.type = SDL_GPU_TEXTURETYPE_2D; - msaatex_createinfo.format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8; + msaatex_createinfo.format = SDL_GpuGetSwapchainTextureFormat(gpu_device, state->windows[0]); msaatex_createinfo.width = drawablew; msaatex_createinfo.height = drawableh; msaatex_createinfo.layerCountOrDepth = 1; msaatex_createinfo.levelCount = 1; - msaatex_createinfo.sampleCount = SDL_GPU_SAMPLECOUNT_4; + msaatex_createinfo.sampleCount = SDL_GpuGetBestSampleCount(gpu_device, msaatex_createinfo.format, render_state.sample_count); msaatex_createinfo.usageFlags = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET_BIT | SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT; msaatex_createinfo.props = 0; @@ -540,11 +540,7 @@ init_render_state(int msaa) SDL_zero(pipelinedesc); - if (msaa) { - color_attachment_desc.format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8; - } else { - color_attachment_desc.format = SDL_GpuGetSwapchainTextureFormat(gpu_device, state->windows[0]); - } + color_attachment_desc.format = SDL_GpuGetSwapchainTextureFormat(gpu_device, state->windows[0]); color_attachment_desc.blendState.blendEnable = 0; color_attachment_desc.blendState.alphaBlendOp = SDL_GPU_BLENDOP_ADD;