Mesa (master): r600/sfn: use fine gradient evaluation for interpolate_at_offset
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Sep 28 18:23:24 UTC 2020
Module: Mesa
Branch: master
Commit: a8435f70ed5fee46dbc982ec68206f3c4fdd81a7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8435f70ed5fee46dbc982ec68206f3c4fdd81a7
Author: Gert Wollny <gert.wollny at collabora.com>
Date: Fri Sep 25 14:45:43 2020 +0200
r600/sfn: use fine gradient evaluation for interpolate_at_offset
Also pass in the interpolator x component (because the TGSI does this too)
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6879>
---
src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp
index 7b85e9ca15d..b92696febc9 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_fragment.cpp
@@ -481,7 +481,7 @@ bool FragmentShaderFromNir::emit_interp_deref_at_offset(nir_intrinsic_instr* ins
auto& io = m_shaderio.input(var->data.driver_location, var->data.location_frac);
auto interpolator = m_interpolator[io.ij_index()];
- PValue dummy(new GPRValue(interpolator.i->sel(), 7));
+ PValue dummy(new GPRValue(interpolator.i->sel(), 0));
GPRVector interp({interpolator.j, interpolator.i, dummy, dummy});
@@ -491,6 +491,7 @@ bool FragmentShaderFromNir::emit_interp_deref_at_offset(nir_intrinsic_instr* ins
getgradh->set_flag(TexInstruction::y_unnormalized);
getgradh->set_flag(TexInstruction::z_unnormalized);
getgradh->set_flag(TexInstruction::w_unnormalized);
+ getgradh->set_flag(TexInstruction::grad_fine);
emit_instruction(getgradh);
auto getgradv = new TexInstruction(TexInstruction::get_gradient_v, help, interp, 0, 0, PValue());
@@ -499,6 +500,7 @@ bool FragmentShaderFromNir::emit_interp_deref_at_offset(nir_intrinsic_instr* ins
getgradv->set_flag(TexInstruction::y_unnormalized);
getgradv->set_flag(TexInstruction::z_unnormalized);
getgradv->set_flag(TexInstruction::w_unnormalized);
+ getgradv->set_flag(TexInstruction::grad_fine);
emit_instruction(getgradv);
PValue ofs_x = from_nir(instr->src[1], 0);
More information about the mesa-commit
mailing list