diff options
author | Kenneth Graunke <[email protected]> | 2017-09-15 00:45:35 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2017-09-21 09:39:27 -0700 |
commit | c9fbe772baaaa24f80960deeb9c722d30e327803 (patch) | |
tree | cc2754127689673c3a0b8a30f3a40746807631e1 | |
parent | 3bec992e367656bf8f043750dd0ab1cb643d34bc (diff) |
i965: Handle unwritten PSIZ/VIEWPORT/LAYER outputs in vec4 shaders.
This can occur if the shader is capturing some of the values from the
VUE header for transform feedback, but the shader hasn't written all of
them.
Reviewed-by: Juan A. Suarez Romero <[email protected]>
-rw-r--r-- | src/intel/compiler/brw_vec4_visitor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/compiler/brw_vec4_visitor.cpp b/src/intel/compiler/brw_vec4_visitor.cpp index 22ee4dd1c4d..88e80aaa3af 100644 --- a/src/intel/compiler/brw_vec4_visitor.cpp +++ b/src/intel/compiler/brw_vec4_visitor.cpp @@ -1245,7 +1245,7 @@ vec4_visitor::emit_psiz_and_flags(dst_reg reg) emit(MOV(retype(reg, BRW_REGISTER_TYPE_UD), brw_imm_ud(0u))); } else { emit(MOV(retype(reg, BRW_REGISTER_TYPE_D), brw_imm_d(0))); - if (prog_data->vue_map.slots_valid & VARYING_BIT_PSIZ) { + if (output_reg[VARYING_SLOT_PSIZ][0].file != BAD_FILE) { dst_reg reg_w = reg; reg_w.writemask = WRITEMASK_W; src_reg reg_as_src = src_reg(output_reg[VARYING_SLOT_PSIZ][0]); @@ -1253,14 +1253,14 @@ vec4_visitor::emit_psiz_and_flags(dst_reg reg) reg_as_src.swizzle = brw_swizzle_for_size(1); emit(MOV(reg_w, reg_as_src)); } - if (prog_data->vue_map.slots_valid & VARYING_BIT_LAYER) { + if (output_reg[VARYING_SLOT_LAYER][0].file != BAD_FILE) { dst_reg reg_y = reg; reg_y.writemask = WRITEMASK_Y; reg_y.type = BRW_REGISTER_TYPE_D; output_reg[VARYING_SLOT_LAYER][0].type = reg_y.type; emit(MOV(reg_y, src_reg(output_reg[VARYING_SLOT_LAYER][0]))); } - if (prog_data->vue_map.slots_valid & VARYING_BIT_VIEWPORT) { + if (output_reg[VARYING_SLOT_VIEWPORT][0].file != BAD_FILE) { dst_reg reg_z = reg; reg_z.writemask = WRITEMASK_Z; reg_z.type = BRW_REGISTER_TYPE_D; |