Skip to content

Commit acdbdc9

Browse files
committed
Fix format-signedness warning in GraphicsPipeline sample count log
The MSAA sample-count ternary produced signed int literals passed to a %u format specifier. Make the literals unsigned to match the format and the value's conceptual type (a count).
1 parent b135ef2 commit acdbdc9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/ObjectivelyGPU/GraphicsPipeline.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ static GraphicsPipeline *initWithDevice(GraphicsPipeline *self, RenderDevice *de
129129

130130
SDL_Log("Assembling GraphicsPipeline (%u color targets, %ux MSAA, %s)",
131131
info->target_info.num_color_targets,
132-
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_1 ? 1 :
133-
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_2 ? 2 :
134-
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_4 ? 4 : 8,
132+
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_1 ? 1u :
133+
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_2 ? 2u :
134+
info->multisample_state.sample_count == SDL_GPU_SAMPLECOUNT_4 ? 4u : 8u,
135135
info->target_info.has_depth_stencil_target ? "depth" : "no depth");
136136

137137
self->pipeline = SDL_CreateGPUGraphicsPipeline(device->device, info);

0 commit comments

Comments
 (0)