From: Kenneth Graunke Date: Thu, 21 Jan 2016 22:56:34 +0000 (-0800) Subject: nir/spirv: Implement ModfStruct opcode. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=824f7763550bf83ade57a45fcce4c5a6ac0c4a85;p=mesa.git nir/spirv: Implement ModfStruct opcode. --- diff --git a/src/glsl/nir/spirv/vtn_glsl450.c b/src/glsl/nir/spirv/vtn_glsl450.c index afcf8e2a7da..a675aa4c7f3 100644 --- a/src/glsl/nir/spirv/vtn_glsl450.c +++ b/src/glsl/nir/spirv/vtn_glsl450.c @@ -424,6 +424,13 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint, return; } + case GLSLstd450ModfStruct: { + assert(glsl_type_is_struct(val->ssa->type)); + val->ssa->elems[0]->def = nir_ffract(nb, src[0]); + val->ssa->elems[1]->def = nir_ffloor(nb, src[0]); + return; + } + case GLSLstd450FMin: op = nir_op_fmin; break; case GLSLstd450UMin: op = nir_op_umin; break; case GLSLstd450SMin: op = nir_op_imin; break; @@ -618,7 +625,6 @@ handle_glsl450_alu(struct vtn_builder *b, enum GLSLstd450 entrypoint, return; } - case GLSLstd450ModfStruct: case GLSLstd450PackDouble2x32: case GLSLstd450UnpackDouble2x32: case GLSLstd450IMix: