anv/blit2d: Add another passthrough varying to the VS
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 31 Mar 2016 22:27:30 +0000 (15:27 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 8 Apr 2016 22:58:49 +0000 (15:58 -0700)
We need the VS to provide some setup data for other stages.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/anv_meta_blit2d.c

index 68ade55d8eab02e8a8da3b8ebfa6cc6d06ba324f..b6e33c84fdd56801e90d190c717eda5e9226c4d2 100644 (file)
@@ -568,6 +568,15 @@ build_nir_vertex_shader(void)
    tex_pos_out->data.interpolation = INTERP_QUALIFIER_SMOOTH;
    nir_copy_var(&b, tex_pos_out, tex_pos_in);
 
+   nir_variable *other_in = nir_variable_create(b.shader, nir_var_shader_in,
+                                                vec4, "a_other");
+   other_in->data.location = VERT_ATTRIB_GENERIC2;
+   nir_variable *other_out = nir_variable_create(b.shader, nir_var_shader_out,
+                                                   vec4, "v_other");
+   other_out->data.location = VARYING_SLOT_VAR1;
+   other_out->data.interpolation = INTERP_QUALIFIER_FLAT;
+   nir_copy_var(&b, other_out, other_in);
+
    return b.shader;
 }