GL: Silence null dispatch error

These are false positive. We actually want to
not dispatch in this case.
This commit is contained in:
Clément Foucault 2023-10-13 19:15:05 +02:00
parent 8f49407128
commit 44d73f0fa6
1 changed files with 6 additions and 0 deletions

View File

@ -16,6 +16,12 @@ void GLCompute::dispatch(int group_x_len, int group_y_len, int group_z_len)
{
GL_CHECK_RESOURCES("Compute");
/* Sometime we reference a dispatch size but we want to skip it by setting one dimension to 0.
* Avoid error being reported on some implementation for these case. */
if (group_x_len == 0 || group_y_len == 0 || group_z_len == 0) {
return;
}
glDispatchCompute(group_x_len, group_y_len, group_z_len);
}