aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/zink
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-01-31 18:24:42 +0100
committerMarge Bot <[email protected]>2020-02-07 22:03:00 +0000
commitfa915a724fbff0878478ca7dd968207bc9906016 (patch)
tree17e145ef3f09f566e364ca648c3a61a5823cf8ad /src/gallium/drivers/zink
parent0c36b1c0dbf2dcb8ded2509bc547a026b9624cc0 (diff)
zink: lower away fdph
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3668>
Diffstat (limited to 'src/gallium/drivers/zink')
-rw-r--r--src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c3
-rw-r--r--src/gallium/drivers/zink/zink_compiler.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
index af1ddef11bd..043b210caf9 100644
--- a/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
+++ b/src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c
@@ -1025,6 +1025,9 @@ emit_alu(struct ntv_context *ctx, nir_alu_instr *alu)
result = emit_binop(ctx, SpvOpDot, dest_type, src[0], src[1]);
break;
+ case nir_op_fdph:
+ unreachable("should already be lowered away");
+
case nir_op_seq:
case nir_op_sne:
case nir_op_slt:
diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c
index a1428785bd4..5c20c7b297f 100644
--- a/src/gallium/drivers/zink/zink_compiler.c
+++ b/src/gallium/drivers/zink/zink_compiler.c
@@ -164,6 +164,7 @@ lower_discard_if(nir_shader *shader)
static const struct nir_shader_compiler_options nir_options = {
.lower_all_io_to_temps = true,
.lower_ffma = true,
+ .lower_fdph = true,
.lower_flrp32 = true,
.lower_fpow = true,
.lower_fsat = true,