i965: Use prog->info.num_images for needs_dc computation
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 29 Sep 2017 02:03:38 +0000 (19:03 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 13 Oct 2017 05:39:29 +0000 (22:39 -0700)
This should be just as good as looking in prog_data but removes our one
state setup dependency on brw_stage_prog_data::nr_image_param.

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

index a368af3631647d3ec02691b318a2f0687b31bd06..0b2d61f9e0fd3cce7a43ca2b2c2635d4eb7404b8 100644 (file)
@@ -54,8 +54,9 @@ get_pipeline_state_l3_weights(const struct brw_context *brw)
       const struct brw_stage_prog_data *prog_data = stage_states[i]->prog_data;
 
       needs_dc |= (prog && (prog->sh.data->NumAtomicBuffers ||
-                            prog->sh.data->NumShaderStorageBlocks)) ||
-         (prog_data && (prog_data->total_scratch || prog_data->nr_image_params));
+                            prog->sh.data->NumShaderStorageBlocks ||
+                            prog->info.num_images)) ||
+         (prog_data && prog_data->total_scratch);
       needs_slm |= prog_data && prog_data->total_shared;
    }