mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
nir: implement GLSL.std.450 NMax, NMIn and NClamp operations
v2: NIR fmax/fmin already handles NaN (Connor). Reviewed by: Elie Tournier <elie.tournier@collabora.com>
This commit is contained in:
parent
b5ae17fe59
commit
7ee409dd4e
1 changed files with 3 additions and 0 deletions
|
|
@ -433,9 +433,11 @@ vtn_nir_alu_op_for_spirv_glsl_opcode(enum GLSLstd450 opcode)
|
|||
case GLSLstd450Log2: return nir_op_flog2;
|
||||
case GLSLstd450Sqrt: return nir_op_fsqrt;
|
||||
case GLSLstd450InverseSqrt: return nir_op_frsq;
|
||||
case GLSLstd450NMin: return nir_op_fmin;
|
||||
case GLSLstd450FMin: return nir_op_fmin;
|
||||
case GLSLstd450UMin: return nir_op_umin;
|
||||
case GLSLstd450SMin: return nir_op_imin;
|
||||
case GLSLstd450NMax: return nir_op_fmax;
|
||||
case GLSLstd450FMax: return nir_op_fmax;
|
||||
case GLSLstd450UMax: return nir_op_umax;
|
||||
case GLSLstd450SMax: return nir_op_imax;
|
||||
|
|
@ -537,6 +539,7 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint,
|
|||
return;
|
||||
|
||||
case GLSLstd450FClamp:
|
||||
case GLSLstd450NClamp:
|
||||
val->ssa->def = build_fclamp(nb, src[0], src[1], src[2]);
|
||||
return;
|
||||
case GLSLstd450UClamp:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue