summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2019-12-30 12:01:25 -0800
committerEric Anholt <eric@anholt.net>2020-01-21 10:06:23 -0800
commit7558b5da13685f701cbe7a9ca804e95e01e38e63 (patch)
tree02f7bb8e20028f5665e5b18bbcc42244e84ced69
parentd0975bfc4ab766a6a0fd65d3f54a608fa5622f59 (diff)
compiler: Add a note about how num_ssbos works in the program info.
These numbers are always confusing, and it's particularly so for this field where it has a different meaning in different info structs. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3240>
-rw-r--r--src/compiler/shader_info.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 7c12dadd1ce..136e71ce234 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -104,7 +104,11 @@ typedef struct shader_info {
uint8_t num_ubos;
/* Number of atomic buffers used by this shader */
uint8_t num_abos;
- /* Number of shader storage buffers used by this shader */
+ /* Number of shader storage buffers (max .driver_location + 1) used by this
+ * shader. In the case of nir_lower_atomics_to_ssbo being used, this will
+ * be the number of actual SSBOs in gl_program->info, and the lowered SSBOs
+ * and atomic counters in nir_shader->info.
+ */
uint8_t num_ssbos;
/* Number of images used by this shader */
uint8_t num_images;