aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_program.c
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2019-08-27 10:54:12 +0200
committerConnor Abbott <[email protected]>2019-09-03 15:54:54 +0200
commitdcc64fcfed6904f6be41ee4b742c818e76b85712 (patch)
tree73f686d7d35da411424196c3b8832525f4f17df1 /src/gallium/drivers/iris/iris_program.c
parent2abf62d3483afd8f0de7f19d114d164de4741127 (diff)
nir: Fix num_ssbos when lowering atomic counters
Otherwise it's impossible to know the maximum SSBO index for both internal TGSI shaders from TTN (which don't have any notion of atomic counters and no offset) as well as shaders from GLSL. I fixed everything I could find while grepping for num_ssbos and num_abos, which hopefully is everything (iris was the only user I could find that uses it in a meaningful way). Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_program.c')
-rw-r--r--src/gallium/drivers/iris/iris_program.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index b1830fbdcbf..bf409e5cd9c 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -691,10 +691,7 @@ iris_setup_binding_table(const struct gen_device_info *devinfo,
*/
bt->sizes[IRIS_SURFACE_GROUP_UBO] = num_cbufs + 1;
- /* The first IRIS_MAX_ABOs indices in the SSBO group are for atomics, real
- * SSBOs start after that. Compaction will remove unused ABOs.
- */
- bt->sizes[IRIS_SURFACE_GROUP_SSBO] = IRIS_MAX_ABOS + info->num_ssbos;
+ bt->sizes[IRIS_SURFACE_GROUP_SSBO] = info->num_ssbos;
for (int i = 0; i < IRIS_SURFACE_GROUP_COUNT; i++)
assert(bt->sizes[i] <= SURFACE_GROUP_MAX_ELEMENTS);