From 65f5f3c85c5303c88c6dddbb435ad6aa0ebfce5f Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 28 Feb 2017 12:29:43 -0800 Subject: i965: Move SOL PSIZ hacks from draw time to link time. We can just update the gl_transform_feedback_info fields at link time to make the VUE header fields have the right location and component. Then we don't need to handle them specially at draw time, which is expensive. Reviewed-by: Rafael Antognolli --- src/intel/compiler/gen6_gs_visitor.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/intel/compiler/gen6_gs_visitor.cpp') diff --git a/src/intel/compiler/gen6_gs_visitor.cpp b/src/intel/compiler/gen6_gs_visitor.cpp index fe9f834f0ce..66c69fb058f 100644 --- a/src/intel/compiler/gen6_gs_visitor.cpp +++ b/src/intel/compiler/gen6_gs_visitor.cpp @@ -687,18 +687,7 @@ gen6_gs_visitor::xfb_program(unsigned vertex, unsigned num_verts) emit(MOV(dst_reg(this->vertex_output_offset), brw_imm_d(offset))); memcpy(data.reladdr, &this->vertex_output_offset, sizeof(src_reg)); data.type = output_reg[varying][0].type; - - /* PSIZ, LAYER and VIEWPORT are packed in different channels of the - * same slot, so make sure we write the appropriate channel - */ - if (varying == VARYING_SLOT_PSIZ) - data.swizzle = BRW_SWIZZLE_WWWW; - else if (varying == VARYING_SLOT_LAYER) - data.swizzle = BRW_SWIZZLE_YYYY; - else if (varying == VARYING_SLOT_VIEWPORT) - data.swizzle = BRW_SWIZZLE_ZZZZ; - else - data.swizzle = gs_prog_data->transform_feedback_swizzles[binding]; + data.swizzle = gs_prog_data->transform_feedback_swizzles[binding]; /* Write data */ inst = emit(GS_OPCODE_SVB_WRITE, mrf_reg, data, sol_temp); -- cgit v1.2.3