mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-27 15:09:11 +00:00
Add SDL_BindGPUComputeSamplers (#10778)
--------- Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com>
This commit is contained in:
parent
323b60abf1
commit
2b8a349b26
10 changed files with 692 additions and 209 deletions
|
@ -1782,6 +1782,32 @@ void SDL_BindGPUComputePipeline(
|
|||
commandBufferHeader->compute_pipeline_bound = true;
|
||||
}
|
||||
|
||||
void SDL_BindGPUComputeSamplers(
|
||||
SDL_GPUComputePass *compute_pass,
|
||||
Uint32 first_slot,
|
||||
const SDL_GPUTextureSamplerBinding *texture_sampler_bindings,
|
||||
Uint32 num_bindings)
|
||||
{
|
||||
if (compute_pass == NULL) {
|
||||
SDL_InvalidParamError("compute_pass");
|
||||
return;
|
||||
}
|
||||
if (texture_sampler_bindings == NULL && num_bindings > 0) {
|
||||
SDL_InvalidParamError("texture_sampler_bindings");
|
||||
return;
|
||||
}
|
||||
|
||||
if (COMPUTEPASS_DEVICE->debug_mode) {
|
||||
CHECK_COMPUTEPASS
|
||||
}
|
||||
|
||||
COMPUTEPASS_DEVICE->BindComputeSamplers(
|
||||
COMPUTEPASS_COMMAND_BUFFER,
|
||||
first_slot,
|
||||
texture_sampler_bindings,
|
||||
num_bindings);
|
||||
}
|
||||
|
||||
void SDL_BindGPUComputeStorageTextures(
|
||||
SDL_GPUComputePass *compute_pass,
|
||||
Uint32 first_slot,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue