This variable is handled in a fashion identical to gl_Layer.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
emit(MOV(retype(brw_writemask(reg, WRITEMASK_Y), BRW_REGISTER_TYPE_D),
src_reg(output_reg[VARYING_SLOT_LAYER])));
}
+ if (prog_data->vue_map.slots_valid & VARYING_BIT_VIEWPORT) {
+ emit(MOV(retype(brw_writemask(reg, WRITEMASK_Z), BRW_REGISTER_TYPE_D),
+ src_reg(output_reg[VARYING_SLOT_VIEWPORT])));
+ }
}
}
vue_map->slots_valid = slots_valid;
int i;
- /* gl_Layer doesn't get its own varying slot--it's stored in the virst VUE
- * slot (VARYING_SLOT_PSIZ).
+ /* gl_Layer and gl_ViewportIndex don't get their own varying slots -- they
+ * are stored in the virst VUE slot (VARYING_SLOT_PSIZ).
*/
- slots_valid &= ~VARYING_BIT_LAYER;
+ slots_valid &= ~(VARYING_BIT_LAYER | VARYING_BIT_VIEWPORT);
/* Make sure that the values we store in vue_map->varying_to_slot and
* vue_map->slot_to_varying won't overflow the signed chars that are used