diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_state_upload.c | 9 |
2 files changed, 6 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index a0afe67a9aa..5a170de8459 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -207,22 +207,6 @@ brw_upload_gs_prog(struct brw_context *brw) if (!brw_gs_state_dirty(brw)) return; - if (gp == NULL) { - /* No geometry shader. Vertex data just passes straight through. */ - if (devinfo->gen == 6 && - (brw->ctx.NewDriverState & BRW_NEW_TRANSFORM_FEEDBACK)) { - brw_upload_ff_gs_prog(brw); - return; - } - - /* Other state atoms had better not try to access prog_data, since - * there's no GS program. - */ - brw->gs.base.prog_data = NULL; - - return; - } - brw_gs_populate_key(brw, &key); if (!brw_search_cache(&brw->cache, BRW_CACHE_GS_PROG, diff --git a/src/mesa/drivers/dri/i965/brw_state_upload.c b/src/mesa/drivers/dri/i965/brw_state_upload.c index c69d707c09f..7b31aad170a 100644 --- a/src/mesa/drivers/dri/i965/brw_state_upload.c +++ b/src/mesa/drivers/dri/i965/brw_state_upload.c @@ -400,10 +400,13 @@ brw_upload_programs(struct brw_context *brw, brw_upload_vs_prog(brw); brw_upload_tess_programs(brw); - if (devinfo->gen < 6) - brw_upload_ff_gs_prog(brw); - else + if (brw->geometry_program) { brw_upload_gs_prog(brw); + } else { + brw->gs.base.prog_data = NULL; + if (devinfo->gen < 7) + brw_upload_ff_gs_prog(brw); + } /* Update the VUE map for data exiting the GS stage of the pipeline. * This comes from the last enabled shader stage. |