summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-18 15:14:05 -0800
committerJason Ekstrand <[email protected]>2015-12-07 21:08:26 -0800
commit43ac954e25f28d240da65ed816458d3529675a04 (patch)
treecbcbacaee2af33d0394107c6e886e08ee89f37a2 /src/vulkan/anv_pipeline.c
parent1eb731d9fe41bdf5813a8e3646a7df36121b244c (diff)
anv: Add initial support for pushing image params
The helper to fill out the image params data-structure is stilly a dummy, but this puts the infastructure in place.
Diffstat (limited to 'src/vulkan/anv_pipeline.c')
-rw-r--r--src/vulkan/anv_pipeline.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index 821f5e33774..9b6eef8074b 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -315,6 +315,10 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
if (pipeline->layout && pipeline->layout->stage[stage].has_dynamic_offsets)
prog_data->nr_params += MAX_DYNAMIC_BUFFERS * 2;
+ if (pipeline->layout && pipeline->layout->stage[stage].image_count > 0)
+ prog_data->nr_params += pipeline->layout->stage[stage].image_count *
+ BRW_IMAGE_PARAM_SIZE;
+
if (prog_data->nr_params > 0) {
/* XXX: I think we're leaking this */
prog_data->param = (const gl_constant_value **)
@@ -339,7 +343,7 @@ anv_pipeline_compile(struct anv_pipeline *pipeline,
/* Apply the actual pipeline layout to UBOs, SSBOs, and textures */
if (pipeline->layout)
- anv_nir_apply_pipeline_layout(nir, pipeline->layout);
+ anv_nir_apply_pipeline_layout(nir, prog_data, pipeline->layout);
/* All binding table offsets provided by apply_pipeline_layout() are
* relative to the start of the bindint table (plus MAX_RTS for VS).