diff options
author | Christoph Bumiller <[email protected]> | 2012-05-05 14:36:40 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-05-09 17:09:30 +0200 |
commit | 6ae12bac596ce3a6aa8e09f638ad2cb4a7c18e5c (patch) | |
tree | b38186d6df4facf35098bdfaab267788547c55e4 /src/gallium/drivers/nv30 | |
parent | 8c98635d4fc7437b05debe337aef2377df685c0c (diff) |
gallium/drivers: handle TGSI_OPCODE_CEIL
Diffstat (limited to 'src/gallium/drivers/nv30')
-rw-r--r-- | src/gallium/drivers/nv30/nvfx_fragprog.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/nv30/nvfx_vertprog.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv30/nvfx_fragprog.c b/src/gallium/drivers/nv30/nvfx_fragprog.c index e562b454f92..592ad21c6c8 100644 --- a/src/gallium/drivers/nv30/nvfx_fragprog.c +++ b/src/gallium/drivers/nv30/nvfx_fragprog.c @@ -535,6 +535,11 @@ nvfx_fragprog_parse_instruction(struct nv30_context* nvfx, struct nvfx_fpc *fpc, case TGSI_OPCODE_ADD: nvfx_fp_emit(fpc, arith(sat, ADD, dst, mask, src[0], src[1], none)); break; + case TGSI_OPCODE_CEIL: + tmp = nvfx_src(temp(fpc)); + nvfx_fp_emit(fpc, arith(0, FLR, tmp.reg, mask, neg(src[0]), none, none)); + nvfx_fp_emit(fpc, arith(sat, MOV, dst, mask, neg(tmp), none, none)); + break; case TGSI_OPCODE_CMP: insn = arith(0, MOV, none.reg, mask, src[0], none, none); insn.cc_update = 1; diff --git a/src/gallium/drivers/nv30/nvfx_vertprog.c b/src/gallium/drivers/nv30/nvfx_vertprog.c index d7eb9fb0a63..82972b3943c 100644 --- a/src/gallium/drivers/nv30/nvfx_vertprog.c +++ b/src/gallium/drivers/nv30/nvfx_vertprog.c @@ -550,6 +550,11 @@ nvfx_vertprog_parse_instruction(struct nv30_context *nv30, struct nvfx_vpc *vpc, case TGSI_OPCODE_ARL: nvfx_vp_emit(vpc, arith(0, VEC, ARL, dst, mask, src[0], none, none)); break; + case TGSI_OPCODE_CEIL: + tmp = nvfx_src(temp(vpc)); + nvfx_vp_emit(vpc, arith(0, VEC, FLR, tmp.reg, mask, neg(src[0]), none, none)); + nvfx_vp_emit(vpc, arith(sat, VEC, MOV, dst, mask, neg(tmp), none, none)); + break; case TGSI_OPCODE_CMP: insn = arith(0, VEC, MOV, none.reg, mask, src[0], none, none); insn.cc_update = 1; |