i965: Force VS -> TCS varyings to use the SSO VUE map layout.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 10 Dec 2015 05:42:21 +0000 (21:42 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 14 Dec 2015 22:48:18 +0000 (14:48 -0800)
The compact VUE map only works when varying packing is in use.
Unfortunately, varying packing is disabled for TCS inputs.

This is needed to fix Piglit's tcs-input-read-array-interface test.

v2: Make lines fit in 80 columns (caught by Jordan Justen).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/brw_nir.c
src/mesa/drivers/dri/i965/brw_vs.c

index 6fb1d62a5cad27d8c103950252aea5b35a786f99..38706a0699ce035cc21aab270b57c96ba818bbec 100644 (file)
@@ -257,7 +257,8 @@ brw_nir_lower_inputs(nir_shader *nir,
          GLbitfield64 inputs_read =
             nir->info.inputs_read & ~VARYING_BIT_PRIMITIVE_ID;
          brw_compute_vue_map(devinfo, &input_vue_map, inputs_read,
-                             nir->info.separate_shader);
+                             nir->info.separate_shader ||
+                             nir->stage == MESA_SHADER_TESS_CTRL);
 
          foreach_list_typed(nir_variable, var, node, &nir->inputs) {
             var->data.driver_location = var->data.location;
index 59b748f20558303b5b13fe6e6bc5709b3a201776..ab765fb209a7311cd690b773431545ba6a893d5a 100644 (file)
@@ -148,7 +148,9 @@ brw_codegen_vs_prog(struct brw_context *brw,
 
    brw_compute_vue_map(brw->intelScreen->devinfo,
                        &prog_data.base.vue_map, outputs_written,
-                       prog ? prog->SeparateShader : false);
+                       prog ? prog->SeparateShader ||
+                              prog->_LinkedShaders[MESA_SHADER_TESS_CTRL]
+                            : false);
 
    if (0) {
       _mesa_fprint_program_opt(stderr, &vp->program.Base, PROG_PRINT_DEBUG,