mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 17:00:13 +01:00
glsl: catch out of bounds access in the debug version
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6067>
This commit is contained in:
parent
eac0ba7fc1
commit
59bb0ff945
1 changed files with 2 additions and 1 deletions
|
|
@ -445,8 +445,9 @@ is_lowerable_builtin(ir_call *ir,
|
|||
*/
|
||||
const struct util_format_description *desc =
|
||||
util_format_description(resource->data.image_format);
|
||||
unsigned i =
|
||||
int i =
|
||||
util_format_get_first_non_void_channel(resource->data.image_format);
|
||||
assert(i >= 0);
|
||||
|
||||
if (desc->channel[i].pure_integer ||
|
||||
desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue