summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_l3.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-08-25 12:22:28 -0700
committerJason Ekstrand <[email protected]>2016-08-30 15:08:23 -0700
commit13c09fdd0cfb62f3f45c39ad01a1c8f4b37c9c19 (patch)
tree8ce5831819f8a7127beb5173c2d0d16b0e6debe4 /src/intel/vulkan/genX_l3.c
parentb259d86ad62503dfb3a18e501fb5ddff2c5c099a (diff)
anv: Add pipeline_has_stage guards a few places
All of these worked before because they were depending on prog_data to be null. Soon, we won't be able to depend on a nice prog_data pointer and it's nice to be more explicit anyway. Signed-off-by: Jason Ekstrand <[email protected]> Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_l3.c')
-rw-r--r--src/intel/vulkan/genX_l3.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_l3.c b/src/intel/vulkan/genX_l3.c
index 0d36e3cd4c0..8b3b8acb098 100644
--- a/src/intel/vulkan/genX_l3.c
+++ b/src/intel/vulkan/genX_l3.c
@@ -315,10 +315,13 @@ get_pipeline_state_l3_weights(const struct anv_pipeline *pipeline)
bool needs_dc = false, needs_slm = false;
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
+ if (!anv_pipeline_has_stage(pipeline, i))
+ continue;
+
const struct brw_stage_prog_data *prog_data = pipeline->prog_data[i];
needs_dc |= pipeline->needs_data_cache;
- needs_slm |= prog_data && prog_data->total_shared;
+ needs_slm |= prog_data->total_shared;
}
return get_default_l3_weights(&pipeline->device->info,