mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl: dont lower precision for textureGatherOffsets
textureGatherOffsets always takes a highp array of constants. As
per the discussion in [1] trying to lower the precision results in segfault
later on in the compiler as textureGatherOffsets will end up being passed
a temp when its expecting a constant as required by the spec.
[1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547#note_1393704
Fixes: b83f4b9fa2 ("glsl: Add an IR lowering pass to convert mediump operations to 16-bit")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18101>
This commit is contained in:
parent
a9556f97da
commit
87940c3193
1 changed files with 9 additions and 0 deletions
|
|
@ -480,6 +480,15 @@ handle_call(ir_call *ir, const struct set *lowerable_rvalues)
|
|||
if (!strcmp(ir->callee_name(), "textureSize"))
|
||||
return GLSL_PRECISION_HIGH;
|
||||
|
||||
/* textureGatherOffsets always takes a highp array of constants. As
|
||||
* per the discussion https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16547#note_1393704
|
||||
* trying to lower the precision results in segfault later on
|
||||
* in the compiler as textureGatherOffsets will end up being passed
|
||||
* a temp when its expecting a constant as required by the spec.
|
||||
*/
|
||||
if (!strcmp(ir->callee_name(), "textureGatherOffsets"))
|
||||
return GLSL_PRECISION_HIGH;
|
||||
|
||||
return var->data.precision;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue