gpu: Return early when attempting to bind 0 samplers.

This is a common occurrence for vertex shaders specifically, and allows backends
to not have to handle this edge case every time.
This commit is contained in:
Ethan Lee
2026-09-01 08:25:20 -04:00
parent 27d56a5e64
commit 4aa40070ef

View File

@@ -2090,6 +2090,10 @@ void SDL_BindGPUVertexSamplers(
}
}
if (num_bindings == 0) {
return;
}
RENDERPASS_DEVICE->BindVertexSamplers(
RENDERPASS_COMMAND_BUFFER,
first_slot,
@@ -2197,6 +2201,10 @@ void SDL_BindGPUFragmentSamplers(
}
}
if (num_bindings == 0) {
return;
}
RENDERPASS_DEVICE->BindFragmentSamplers(
RENDERPASS_COMMAND_BUFFER,
first_slot,