summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2014-10-15 14:44:00 -0700
committerJason Ekstrand <[email protected]>2015-01-15 07:18:59 -0800
commit95fbd6e1eed58f1f87aaa425bb5312a92db29d21 (patch)
tree899e988b58714c7e51ebb241d043cab9c4ffbee2 /src/mesa
parentd40b5ca5c50796c168aba0e0e3dd4a0f695a9e3b (diff)
i965/fs_nir: Handle coarse/fine derivatives
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_nir.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index aab74298fae..5d78272e82a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -613,6 +613,14 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr)
emit_percomp(FS_OPCODE_DDX_COARSE, result, op[0],
instr->dest.write_mask, instr->dest.saturate);
break;
+ case nir_op_fddx_fine:
+ emit_percomp(FS_OPCODE_DDX_FINE, result, op[0],
+ instr->dest.write_mask, instr->dest.saturate);
+ break;
+ case nir_op_fddx_coarse:
+ emit_percomp(FS_OPCODE_DDX_COARSE, result, op[0],
+ instr->dest.write_mask, instr->dest.saturate);
+ break;
case nir_op_fddy:
if (fs_key->high_quality_derivatives)
emit_percomp(FS_OPCODE_DDY_FINE, result, op[0],
@@ -623,6 +631,16 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr)
fs_reg(fs_key->render_to_fbo),
instr->dest.write_mask, instr->dest.saturate);
break;
+ case nir_op_fddy_fine:
+ emit_percomp(FS_OPCODE_DDY_FINE, result, op[0],
+ fs_reg(fs_key->render_to_fbo),
+ instr->dest.write_mask, instr->dest.saturate);
+ break;
+ case nir_op_fddy_coarse:
+ emit_percomp(FS_OPCODE_DDY_COARSE, result, op[0],
+ fs_reg(fs_key->render_to_fbo),
+ instr->dest.write_mask, instr->dest.saturate);
+ break;
case nir_op_fadd:
case nir_op_iadd: {