[Mesa-dev] [PATCH 1/6] i965: Fix BRW_VARYING_SLOT_PAD handling in the scalar VS backend.
Kenneth Graunke
kenneth at whitecape.org
Fri Sep 11 23:58:45 PDT 2015
We can't just break for padding slots. Instead, treat them like
unwritten output variables, so we handle flushing and incrementing
urb_offset correctly.
Paul introduced the concept of padding slots back in 2011, but we've
never actually used them for anything. So it's unsurprising that the
scalar VS backend didn't handle them quite right.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 5cb794b..10b9e48 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -937,9 +937,6 @@ fs_visitor::emit_urb_writes()
unreachable("unexpected scalar vs output");
break;
- case BRW_VARYING_SLOT_PAD:
- break;
-
default:
/* gl_Position is always in the vue map, but isn't always written by
* the shader. Other varyings (clip distances) get added to the vue
@@ -949,7 +946,8 @@ fs_visitor::emit_urb_writes()
* slot for writing we flush a mlen 5 urb write, otherwise we just
* advance the urb_offset.
*/
- if (this->outputs[varying].file == BAD_FILE) {
+ if (varying == BRW_VARYING_SLOT_PAD ||
+ this->outputs[varying].file == BAD_FILE) {
if (length > 0)
flush = true;
else
--
2.5.1
More information about the mesa-dev
mailing list