aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-11-21 17:19:37 -0600
committerJason Ekstrand <[email protected]>2018-11-22 09:17:28 -0600
commita24654b49d36609b43a5ef6f04453ab284a6ea4f (patch)
tree7c5e61788a74ed7b30b5ea303de4a3fa8a27b80b /src/intel/vulkan
parent617e402b3d1be185f200b1667540096d9a8b2aec (diff)
anv/nir: Rework arguments to apply_pipeline_layout
Instead of taking a whole pipeline (which could be anything!), just take a physical device and robust_buffer_access boolean. This makes it easier to verify that only the things in the hash actually affect pipeline compilation. Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_nir.h3
-rw-r--r--src/intel/vulkan/anv_nir_apply_pipeline_layout.c5
-rw-r--r--src/intel/vulkan/anv_pipeline.c4
3 files changed, 8 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_nir.h b/src/intel/vulkan/anv_nir.h
index cf90c90f857..dd6c89529ac 100644
--- a/src/intel/vulkan/anv_nir.h
+++ b/src/intel/vulkan/anv_nir.h
@@ -40,7 +40,8 @@ bool anv_nir_lower_multiview(nir_shader *shader, uint32_t view_mask);
bool anv_nir_lower_ycbcr_textures(nir_shader *shader,
struct anv_pipeline_layout *layout);
-void anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
+void anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice,
+ bool robust_buffer_access,
struct anv_pipeline_layout *layout,
nir_shader *shader,
struct brw_stage_prog_data *prog_data,
diff --git a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
index fa967c217e7..4e405ae4bb0 100644
--- a/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
+++ b/src/intel/vulkan/anv_nir_apply_pipeline_layout.c
@@ -423,7 +423,8 @@ setup_vec4_uniform_value(uint32_t *params, uint32_t offset, unsigned n)
}
void
-anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
+anv_nir_apply_pipeline_layout(const struct anv_physical_device *pdevice,
+ bool robust_buffer_access,
struct anv_pipeline_layout *layout,
nir_shader *shader,
struct brw_stage_prog_data *prog_data,
@@ -434,7 +435,7 @@ anv_nir_apply_pipeline_layout(struct anv_pipeline *pipeline,
struct apply_pipeline_layout_state state = {
.shader = shader,
.layout = layout,
- .add_bounds_checks = pipeline->device->robust_buffer_access,
+ .add_bounds_checks = robust_buffer_access,
};
void *mem_ctx = ralloc_context(NULL);
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index f170366d030..ee37685fccf 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -532,7 +532,9 @@ anv_pipeline_lower_nir(struct anv_pipeline *pipeline,
/* Apply the actual pipeline layout to UBOs, SSBOs, and textures */
if (layout) {
- anv_nir_apply_pipeline_layout(pipeline, layout, nir, prog_data,
+ anv_nir_apply_pipeline_layout(&pipeline->device->instance->physicalDevice,
+ pipeline->device->robust_buffer_access,
+ layout, nir, prog_data,
&stage->bind_map);
}