projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eac0ba7
)
glsl: catch out of bounds access in the debug version
author
Marcin Ślusarz
<marcin.slusarz@intel.com>
Fri, 24 Jul 2020 15:59:36 +0000
(17:59 +0200)
committer
Marge Bot
<eric+marge@anholt.net>
Thu, 30 Jul 2020 10:41:00 +0000
(10:41 +0000)
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>
src/compiler/glsl/lower_precision.cpp
patch
|
blob
|
history
diff --git
a/src/compiler/glsl/lower_precision.cpp
b/src/compiler/glsl/lower_precision.cpp
index
d03c66a
..
1f116cd
100644
(file)
--- a/
src/compiler/glsl/lower_precision.cpp
+++ b/
src/compiler/glsl/lower_precision.cpp
@@
-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)