[Mesa-dev] [PATCH 2/3] mesa: move shader_info to the start of gl_program

Timothy Arceri timothy.arceri at collabora.com
Wed Nov 2 22:18:18 UTC 2016


This will allow use to use ralloc_parent() on the info field and fix
a regression in nir_sweep() caused by e1af20f18a8.

This is intended to be a temporary requirement that will be removed
when we finish separating shader_info from nir_shader.

Cc: Eric Anholt <eric at anholt.net>
---
 src/mesa/main/mtypes.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 3f3c41b..b161301 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1908,6 +1908,9 @@ typedef enum
  */
 struct gl_program
 {
+   /** FIXME: This must be first until we split shader_info from nir_shader */
+   struct shader_info info;
+
    mtx_t Mutex;
    GLuint Id;
    GLint RefCount;
@@ -1920,8 +1923,6 @@ struct gl_program
 
    struct nir_shader *nir;
 
-   struct shader_info info;
-
    GLbitfield64 SecondaryOutputsWritten; /**< Subset of OutputsWritten outputs written with non-zero index. */
    GLbitfield TexturesUsed[MAX_COMBINED_TEXTURE_IMAGE_UNITS];  /**< TEXTURE_x_BIT bitmask */
    GLbitfield SamplersUsed;   /**< Bitfield of which samplers are used */
-- 
2.7.4



More information about the mesa-dev mailing list