spirv: Workaround for RelaxedPrecision on OpLogical* in 3DMark
Per spec RelaxedPrecision cannot be applied to bool types, however 3DMark Wild Life does it: OpDecorate %171 RelaxedPrecision ... %171 = OpLogicalAnd %bool %169 %170 Fixes crash in 3DMark Wild Life on Android. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16746>
This commit is contained in:
parent
c21dfe3348
commit
eb5f4c2f6b
|
@ -165,6 +165,11 @@ vtn_mediump_downconvert(struct vtn_builder *b, enum glsl_base_type base_type, ni
|
|||
case GLSL_TYPE_INT:
|
||||
case GLSL_TYPE_UINT:
|
||||
return nir_i2imp(&b->nb, def);
|
||||
/* Workaround for 3DMark Wild Life which has RelaxedPrecision on
|
||||
* OpLogical* operations (which is forbidden by spec).
|
||||
*/
|
||||
case GLSL_TYPE_BOOL:
|
||||
return def;
|
||||
default:
|
||||
unreachable("bad relaxed precision input type");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue