mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-09-02 03:43:38 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user