#define IRIS_RESOURCE_FLAG_DYNAMIC_MEMZONE (PIPE_RESOURCE_FLAG_DRV_PRIV << 2)
#define IRIS_MAX_TEXTURE_SAMPLERS 32
+/* IRIS_MAX_ABOS and IRIS_MAX_SSBOS must be the same. */
+#define IRIS_MAX_ABOS 16
+#define IRIS_MAX_SSBOS 16
#define IRIS_MAX_VIEWPORTS 16
#define IRIS_DIRTY_COLOR_CALC_STATE (1ull << 0)
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
- case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
return IRIS_MAX_TEXTURE_SAMPLERS;
+ case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
+ return IRIS_MAX_ABOS + IRIS_MAX_SSBOS;
case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS:
return 0;
bt_map[s++] = use_const_buffer(batch, cbuf);
}
- for (int i = 0; i < info->num_abos + info->num_ssbos; i++) {
- bt_map[s++] = use_ssbo(batch, ice, shs, i);
+ /* XXX: st is wasting 16 binding table slots for ABOs. Should add a cap
+ * for changing nir_lower_atomics_to_ssbos setting and buffer_base offset
+ * in st_atom_storagebuf.c so it'll compact them into one range, with
+ * SSBOs starting at info->num_abos. Ideally it'd reset num_abos to 0 too
+ */
+ if (info->num_abos + info->num_ssbos > 0) {
+ for (int i = 0; i < IRIS_MAX_ABOS + info->num_ssbos; i++) {
+ bt_map[s++] = use_ssbo(batch, ice, shs, i);
+ }
}
#if 0