Skip to content

Commit

Permalink
update testgpu_spinning_cube
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpydog committed Aug 21, 2024
1 parent 4bd7514 commit eaae711
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions test/testgpu_spinning_cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = render_state.sample_count;
msaatex_createinfo.usageFlags = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET_BIT | SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT;
msaatex_createinfo.props = 0;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit eaae711

Please sign in to comment.