mirror of https://github.com/libsdl-org/SDL.git
parent
db154c8b9b
commit
252129f433
|
|
@ -1546,6 +1546,14 @@ SDL_GPURenderPass *SDL_BeginGPURenderPass(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (color_target_infos[i].layer_or_depth_plane >= textureHeader->info.layer_count_or_depth) {
|
||||||
|
SDL_assert_release(!"Color target layer index must be less than the texture's layer count!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (color_target_infos[i].mip_level >= textureHeader->info.num_levels) {
|
||||||
|
SDL_assert_release(!"Color target mip level must be less than the texture's level count!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (depth_stencil_target_info != NULL) {
|
if (depth_stencil_target_info != NULL) {
|
||||||
|
|
@ -2082,6 +2090,14 @@ SDL_GPUComputePass *SDL_BeginGPUComputePass(
|
||||||
SDL_assert_release(!"Texture must be created with COMPUTE_STORAGE_WRITE or COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE flag");
|
SDL_assert_release(!"Texture must be created with COMPUTE_STORAGE_WRITE or COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE flag");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (storage_texture_bindings[i].layer >= header->info.layer_count_or_depth) {
|
||||||
|
SDL_assert_release(!"Storage texture layer index must be less than the texture's layer count!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (storage_texture_bindings[i].mip_level >= header->info.num_levels) {
|
||||||
|
SDL_assert_release(!"Storage texture mip level must be less than the texture's level count!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: validate buffer usage?
|
// TODO: validate buffer usage?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue