summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2013-04-17 16:17:50 -0700
committerJordan Justen <[email protected]>2013-05-13 13:57:57 -0700
commita16a2d7147865634d68151d681a399f669146ff1 (patch)
tree9aafe938d95f7f135f192db067e25478b5fd06d6
parent220f70667dacc37f0e5cb871f6054214519d191f (diff)
i965: write layer if gl_Layer is used in VS
This is enabled by the AMD_vertex_shader_layer extension. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp4
1 files changed, 4 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 e5c1cece337..f14529af80f 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2597,6 +2597,10 @@ vec4_visitor::emit_psiz_and_flags(struct brw_reg reg)
emit(MOV(brw_writemask(reg, WRITEMASK_W),
src_reg(output_reg[VARYING_SLOT_PSIZ])));
}
+ if (prog_data->vue_map.slots_valid & VARYING_BIT_LAYER) {
+ emit(MOV(retype(brw_writemask(reg, WRITEMASK_Y), BRW_REGISTER_TYPE_D),
+ src_reg(output_reg[VARYING_SLOT_LAYER])));
+ }
}
}