summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vulkan/anv_cmd_buffer.c4
-rw-r--r--src/vulkan/anv_pipeline.c4
-rw-r--r--src/vulkan/anv_private.h6
3 files changed, 8 insertions, 6 deletions
diff --git a/src/vulkan/anv_cmd_buffer.c b/src/vulkan/anv_cmd_buffer.c
index 17857d9759a..c2024e4dd60 100644
--- a/src/vulkan/anv_cmd_buffer.c
+++ b/src/vulkan/anv_cmd_buffer.c
@@ -449,7 +449,7 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
struct anv_descriptor_slot *surface_slots =
set_layout->stage[stage].surface_start;
- uint32_t start = bias + layout->set[set].surface_start[stage];
+ uint32_t start = bias + layout->set[set].stage[stage].surface_start;
for (uint32_t b = 0; b < set_layout->stage[stage].surface_count; b++) {
struct anv_surface_view *view =
@@ -515,7 +515,7 @@ anv_cmd_buffer_emit_samplers(struct anv_cmd_buffer *cmd_buffer,
struct anv_descriptor_slot *sampler_slots =
set_layout->stage[stage].sampler_start;
- uint32_t start = layout->set[set].sampler_start[stage];
+ uint32_t start = layout->set[set].stage[stage].sampler_start;
for (uint32_t b = 0; b < set_layout->stage[stage].sampler_count; b++) {
struct anv_sampler *sampler =
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index 9372fb318df..dba2a5e7b46 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -395,9 +395,9 @@ VkResult anv_CreatePipelineLayout(
layout->set[i].layout = set_layout;
for (uint32_t s = 0; s < VK_SHADER_STAGE_NUM; s++) {
- layout->set[i].surface_start[s] = surface_start[s];
+ layout->set[i].stage[s].surface_start = surface_start[s];
surface_start[s] += set_layout->stage[s].surface_count;
- layout->set[i].sampler_start[s] = sampler_start[s];
+ layout->set[i].stage[s].sampler_start = sampler_start[s];
sampler_start[s] += set_layout->stage[s].sampler_count;
layout->stage[s].surface_count += set_layout->stage[s].surface_count;
diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h
index 53eb0b30526..f556161679f 100644
--- a/src/vulkan/anv_private.h
+++ b/src/vulkan/anv_private.h
@@ -664,8 +664,10 @@ anv_descriptor_set_destroy(struct anv_device *device,
struct anv_pipeline_layout {
struct {
struct anv_descriptor_set_layout *layout;
- uint32_t surface_start[VK_SHADER_STAGE_NUM];
- uint32_t sampler_start[VK_SHADER_STAGE_NUM];
+ struct {
+ uint32_t surface_start;
+ uint32_t sampler_start;
+ } stage[VK_SHADER_STAGE_NUM];
} set[MAX_SETS];
uint32_t num_sets;