aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/mtypes.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 36d48e2115d..ac4cac0e498 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2493,6 +2493,21 @@ struct gl_uniform_block
uint8_t stageref;
/**
+ * Linearized array index for uniform block instance arrays
+ *
+ * Given a uniform block instance array declared with size
+ * blk[s_0][s_1]..[s_m], the block referenced by blk[i_0][i_1]..[i_m] will
+ * have the linearized array index
+ *
+ * m-1 m
+ * i_m + ∑ i_j * ∏ s_k
+ * j=0 k=j+1
+ *
+ * For a uniform block instance that is not an array, this is always 0.
+ */
+ uint8_t linearized_array_index;
+
+ /**
* Layout specified in the shader
*
* This isn't accessible through the API, but it is used while