[Mesa-dev] [PATCH 01/11] mesa: add UseSTD430AsDefaultPacking constant

Timothy Arceri tarceri at itsqueeze.com
Thu Aug 17 11:02:58 UTC 2017

This will be used to enable the STD430 layout as the default for
UBOs and SSBOs with layouts of shared/packed rather than STD140.
 src/mesa/main/mtypes.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 49eb7d54bd..e6b726834f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3837,20 +3837,29 @@ struct gl_constants
     * for older platforms that supports a limited number of texture
     * indirections--on these platforms, unpacking the varyings in the fragment
     * shader increases the number of texture indirections by 1, which might
     * make some shaders not executable at all.
     * Drivers that support transform feedback must set this value to GL_FALSE.
    GLboolean DisableVaryingPacking;
+    * UBOs and SSBOs can be packed tightly by the OpenGL implementation when
+    * layout is set as shared (the default) or packed. However most Mesa drivers
+    * just use STD140 for these layouts. This flag allows drivers to use STD430
+    * for packed and shared layouts which allows arrays to be packed more
+    * tightly.
+    */
+   bool UseSTD430AsDefaultPacking;
+   /**
     * Should meaningful names be generated for compiler temporary variables?
     * Generally, it is not useful to have the compiler generate "meaningful"
     * names for temporary variables that it creates.  This can, however, be a
     * useful debugging aid.  In Mesa debug builds or release builds when
     * MESA_GLSL is set at run-time, meaningful names will be generated.
     * Drivers can also force names to be generated by setting this field.
     * For example, the i965 driver may set it when INTEL_DEBUG=vs (to dump
     * vertex shader assembly) is set at run-time.

More information about the mesa-dev mailing list