binding: update for xglCmdBindDescriptorSets()
This update makes it possible to bind multiple descriptor sets to the command
buffer. We introduced intel_cmd_dset_data to hold the descriptor set offsets
in the global descriptor region as well as their dynamic offsets. We also
changed the descriptor reading routines from
intel_desc_set_read_surface()
intel_desc_set_read_sampler()
to
intel_desc_region_read_surface()
intel_desc_region_read_sampler()
v2: fix a potential crash when allocation of dynamic_desc_indices fails
diff --git a/icd/intel/cmd.c b/icd/intel/cmd.c
index d4f6a7a..b55b10a 100644
--- a/icd/intel/cmd.c
+++ b/icd/intel/cmd.c
@@ -234,10 +234,14 @@
if (cmd->bind.shader_cache.entries)
intel_free(cmd, cmd->bind.shader_cache.entries);
- if (cmd->bind.dset.graphics_dynamic_offsets)
- intel_free(cmd, cmd->bind.dset.graphics_dynamic_offsets);
- if (cmd->bind.dset.compute_dynamic_offsets)
- intel_free(cmd, cmd->bind.dset.compute_dynamic_offsets);
+ if (cmd->bind.dset.graphics_data.set_offsets)
+ intel_free(cmd, cmd->bind.dset.graphics_data.set_offsets);
+ if (cmd->bind.dset.graphics_data.dynamic_offsets)
+ intel_free(cmd, cmd->bind.dset.graphics_data.dynamic_offsets);
+ if (cmd->bind.dset.compute_data.set_offsets)
+ intel_free(cmd, cmd->bind.dset.compute_data.set_offsets);
+ if (cmd->bind.dset.compute_data.dynamic_offsets)
+ intel_free(cmd, cmd->bind.dset.compute_data.dynamic_offsets);
memset(&cmd->bind, 0, sizeof(cmd->bind));