[Mesa-dev] [PATCH 2/3] i965/vs: Emit the vertex position a second time in the Gen5 VUE header.
Kenneth Graunke
kenneth at whitecape.org
Tue Aug 30 12:34:14 PDT 2011
The fragment shader needs gl_Position.w in order to do interpolation.
Both the comments above and the old VS backend emitted this.
Fixes a ton of piglit tests on Ironlake with the new VS.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 4babc56..04c49da 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1736,6 +1736,8 @@ vec4_visitor::emit_vue_header_gen4(int header_mrf)
/* Pad so that vertex element data is aligned. */
header_mrf++;
+
+ emit(BRW_OPCODE_MOV, brw_message_reg(header_mrf++), pos);
} else {
/* There are 8 dwords in VUE header pre-Ironlake:
* dword 0-3 (m1) is indices, point width, clip flags.
--
1.7.6
More information about the mesa-dev
mailing list