Mesa (master): i965: Fix GS push inputs with enhanced layouts.

Kenneth Graunke kwg at kemper.freedesktop.org
Sat Nov 19 21:30:15 UTC 2016


Module: Mesa
Branch: master
Commit: c4be6e0b8d91746eccf334b9e20861af4036d06a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c4be6e0b8d91746eccf334b9e20861af4036d06a

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Nov 14 15:59:57 2016 -0800

i965: Fix GS push inputs with enhanced layouts.

We weren't taking first_component into account when handling GS push
inputs.  We hardly ever push GS inputs, so this was not caught by
existing tests.  When I started using component qualifiers for the
gl_ClipDistance arrays, glsl-1.50-transform-feedback-type-and-size
started catching this.

Cc: "13.0" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
index e84e371..e770502 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
@@ -1984,7 +1984,7 @@ fs_visitor::emit_gs_input_load(const fs_reg &dst,
       } else {
          for (unsigned i = 0; i < num_components; i++) {
             bld.MOV(offset(dst, bld, i),
-                    fs_reg(ATTR, imm_offset + i, dst.type));
+                    fs_reg(ATTR, imm_offset + i + first_component, dst.type));
          }
       }
       return;




More information about the mesa-commit mailing list