i965/gs: Pass VerticesIn though prog_data
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 11 Feb 2016 05:57:52 +0000 (21:57 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 11 Feb 2016 23:07:20 +0000 (15:07 -0800)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_compiler.h
src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
src/mesa/drivers/dri/i965/gen8_gs_state.c

index b8423ec1342a5be57fc2d1cccca69bcc7bb8b82b..27a95a3c6612cb1701883a7d6b13842f070131c0 100644 (file)
@@ -626,6 +626,8 @@ struct brw_gs_prog_data
 {
    struct brw_vue_prog_data base;
 
+   unsigned vertices_in;
+
    /**
     * Size of an output vertex, measured in HWORDS (32 bytes).
     */
index 1b63d568d856a3152e1dab5f322fae6c96d27efb..3f30f5b92d11283f35b07dfc02d21cf9c7309db4 100644 (file)
@@ -773,6 +773,8 @@ brw_compile_gs(const struct brw_compiler *compiler, void *log_data,
    prog_data->output_topology =
       get_hw_prim_for_gl_prim(shader->info.gs.output_primitive);
 
+   prog_data->vertices_in = shader->info.gs.vertices_in;
+
    /* The GLSL linker will have already matched up GS inputs and the outputs
     * of prior stages.  The driver does extend VS outputs in some cases, but
     * only for legacy OpenGL or Gen4-5 hardware, neither of which offer
index 6738e85eabaa6eae6a7f52c758be0e24e15a6d75..c3cdb2f435061b7f3f7c823bec6148a5117033d8 100644 (file)
@@ -48,7 +48,7 @@ gen8_upload_gs_state(struct brw_context *brw)
       OUT_BATCH(_3DSTATE_GS << 16 | (10 - 2));
       OUT_BATCH(stage_state->prog_offset);
       OUT_BATCH(0);
-      OUT_BATCH(brw->geometry_program->VerticesIn |
+      OUT_BATCH(brw->gs.prog_data->vertices_in |
                 ((ALIGN(stage_state->sampler_count, 4)/4) <<
                  GEN6_GS_SAMPLER_COUNT_SHIFT) |
                 ((prog_data->base.binding_table.size_bytes / 4) <<