mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 13:30:11 +01:00
mesa: fix crashes in the no_error path of glUniform
Fixes: bd2662bfa1 - mesa: add KHR_no_error support to glUniform*() functions
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13417>
This commit is contained in:
parent
5948ff4826
commit
03186773a6
1 changed files with 3 additions and 1 deletions
|
|
@ -1280,7 +1280,7 @@ _mesa_uniform(GLint location, GLsizei count, const GLvoid *values,
|
|||
return;
|
||||
|
||||
uni = shProg->UniformRemapTable[location];
|
||||
if (!uni)
|
||||
if (!uni || uni == INACTIVE_UNIFORM_EXPLICIT_LOCATION)
|
||||
return;
|
||||
|
||||
/* The array index specified by the uniform location is just the
|
||||
|
|
@ -1846,6 +1846,8 @@ _mesa_uniform_handle(GLint location, GLsizei count, const GLvoid *values,
|
|||
return;
|
||||
|
||||
uni = shProg->UniformRemapTable[location];
|
||||
if (!uni || uni == INACTIVE_UNIFORM_EXPLICIT_LOCATION)
|
||||
return;
|
||||
|
||||
/* The array index specified by the uniform location is just the
|
||||
* uniform location minus the base location of of the uniform.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue