mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 06:30:10 +01:00
anv: fix dynamic buffers & independent sets
In0ca870c6f3I forgot to fill the bind_map::dynamic_descriptors array... Duh! Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Fixes:0ca870c6f3("anv: fix broken ray tracing dynamic descriptors") Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38893>
This commit is contained in:
parent
ef246aaf72
commit
6dff50c8bc
3 changed files with 24 additions and 7 deletions
|
|
@ -1588,10 +1588,12 @@ bind_graphics_shaders(struct anv_cmd_buffer *cmd_buffer,
|
|||
set_dirty_for_bind_map(cmd_buffer, s, &shader->bind_map);
|
||||
|
||||
for (uint32_t i = 0; i < MAX_SETS; i++) {
|
||||
assert(dynamic_descriptors[i] == 0 ||
|
||||
dynamic_descriptors[i] ==
|
||||
shader->bind_map.dynamic_descriptors[i]);
|
||||
dynamic_descriptors[i] = shader->bind_map.dynamic_descriptors[i];
|
||||
if (shader->bind_map.binding_mask & ANV_PIPELINE_BIND_MASK_SET(i)) {
|
||||
assert(dynamic_descriptors[i] == 0 ||
|
||||
dynamic_descriptors[i] ==
|
||||
shader->bind_map.dynamic_descriptors[i]);
|
||||
dynamic_descriptors[i] = shader->bind_map.dynamic_descriptors[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1158,9 +1158,19 @@ struct anv_push_range {
|
|||
};
|
||||
|
||||
enum anv_pipeline_bind_mask {
|
||||
ANV_PIPELINE_BIND_MASK_USES_NUM_WORKGROUP = BITFIELD_BIT(0),
|
||||
ANV_PIPELINE_BIND_MASK_SET0 = BITFIELD_BIT(0),
|
||||
ANV_PIPELINE_BIND_MASK_SET1 = BITFIELD_BIT(1),
|
||||
ANV_PIPELINE_BIND_MASK_SET2 = BITFIELD_BIT(2),
|
||||
ANV_PIPELINE_BIND_MASK_SET3 = BITFIELD_BIT(3),
|
||||
ANV_PIPELINE_BIND_MASK_SET4 = BITFIELD_BIT(4),
|
||||
ANV_PIPELINE_BIND_MASK_SET5 = BITFIELD_BIT(5),
|
||||
ANV_PIPELINE_BIND_MASK_SET6 = BITFIELD_BIT(6),
|
||||
ANV_PIPELINE_BIND_MASK_SET7 = BITFIELD_BIT(7),
|
||||
ANV_PIPELINE_BIND_MASK_USES_NUM_WORKGROUP = BITFIELD_BIT(8),
|
||||
};
|
||||
|
||||
#define ANV_PIPELINE_BIND_MASK_SET(i) (ANV_PIPELINE_BIND_MASK_SET0 << i)
|
||||
|
||||
struct anv_pipeline_bind_map {
|
||||
unsigned char surface_sha1[20];
|
||||
unsigned char sampler_sha1[20];
|
||||
|
|
|
|||
|
|
@ -1455,8 +1455,13 @@ anv_shader_lower_nir(struct anv_device *device,
|
|||
uint32_t dynamic_descriptors_offsets[MAX_SETS] = {};
|
||||
for (uint32_t i = 0; i < set_layout_count; i++) {
|
||||
dynamic_descriptors_offsets[i] = dynamic_descriptors_offset;
|
||||
dynamic_descriptors_offset += set_layouts[i] != NULL ?
|
||||
set_layouts[i]->vk.dynamic_descriptor_count : 0;
|
||||
if (set_layouts[i] != NULL) {
|
||||
shader_data->bind_map.binding_mask |= ANV_PIPELINE_BIND_MASK_SET(i);
|
||||
const uint32_t dyn_desc_count =
|
||||
set_layouts[i]->vk.dynamic_descriptor_count;
|
||||
shader_data->bind_map.dynamic_descriptors[i] = dyn_desc_count;
|
||||
dynamic_descriptors_offset += dyn_desc_count;
|
||||
}
|
||||
}
|
||||
|
||||
/* Apply the actual pipeline layout to UBOs, SSBOs, and textures */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue