diff options
author | Kenneth Graunke <[email protected]> | 2016-01-21 14:56:34 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2016-01-21 14:57:47 -0800 |
commit | 824f7763550bf83ade57a45fcce4c5a6ac0c4a85 (patch) | |
tree | 2532e4e23b66506ddaf6f61361bba4ea41cfd67d /src/glsl | |
parent | f89d5cb80709f3f61a15e1176f9b3351bc437d92 (diff) |
nir/spirv: Implement ModfStruct opcode.
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/spirv/vtn_glsl450.c | 8 |
1 files changed, 7 insertions, 1 deletions
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: |