summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2014-07-28 10:05:57 +0200
committerIago Toral Quiroga <[email protected]>2014-09-19 15:01:15 +0200
commit6669fd0818a07f3bd8232ee72cf5e01d992b39f2 (patch)
treef63809a2c46b3de8d1b9d88082b2de8c72454ce8 /src/mesa/drivers
parent524ad6b901c3847db9d3528223d4ab2e2f517a1d (diff)
i965/gen6/gs: Assign geometry shader VUE map properly.
So far in gen6 we only used geometry shaders to implement transform feedback in vertex shaders, so we assumed that the VUE map for the geometry shader stage was always the same as for the vertex shader stage. This is no longer true now that we support user provided geometry shaders in gen6 too. Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_gs.c12
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_gs.c b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
index 41c6d8b6593..3c618828c2e 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_vec4_gs.c
@@ -298,18 +298,18 @@ brw_upload_gs_prog(struct brw_context *brw)
(struct brw_geometry_program *) brw->geometry_program;
if (gp == NULL) {
- if (brw->gen == 6) {
- if (brw->state.dirty.brw & BRW_NEW_TRANSFORM_FEEDBACK)
- gen6_brw_upload_ff_gs_prog(brw);
- return;
- }
-
/* No geometry shader. Vertex data just passes straight through. */
if (brw->state.dirty.brw & BRW_NEW_VUE_MAP_VS) {
brw->vue_map_geom_out = brw->vue_map_vs;
brw->state.dirty.brw |= BRW_NEW_VUE_MAP_GEOM_OUT;
}
+ if (brw->gen == 6 &&
+ (brw->state.dirty.brw & BRW_NEW_TRANSFORM_FEEDBACK)) {
+ gen6_brw_upload_ff_gs_prog(brw);
+ return;
+ }
+
/* Other state atoms had better not try to access prog_data, since
* there's no GS program.
*/
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index e1063c734f6..edaa82cb4c3 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -498,7 +498,7 @@ static void brw_upload_vs_prog(struct brw_context *brw)
sizeof(brw->vue_map_geom_out)) != 0) {
brw->vue_map_vs = brw->vs.prog_data->base.vue_map;
brw->state.dirty.brw |= BRW_NEW_VUE_MAP_VS;
- if (brw->gen < 7) {
+ if (brw->gen < 6) {
/* No geometry shader support, so the VS VUE map is the VUE map for
* the output of the "geometry" portion of the pipeline.
*/