[Mesa-dev] [PATCH] mesa/mtypes: reorganise gl_shader

Samuel Pitoiset samuel.pitoiset at gmail.com
Mon Sep 4 08:39:12 UTC 2017


Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 09/03/2017 01:09 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This reduces this from 200->182 bytes.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>   src/mesa/main/mtypes.h | 9 +++++----
>   1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 34da6b9..2dab594 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -2567,9 +2567,10 @@ struct gl_shader
>      GLchar *Label;   /**< GL_KHR_debug */
>      unsigned char sha1[20]; /**< SHA1 hash of pre-processed source */
>      GLboolean DeletePending;
> -   enum gl_compile_status CompileStatus;
>      bool IsES;              /**< True if this shader uses GLSL ES */
>   
> +   enum gl_compile_status CompileStatus;
> +
>   #ifdef DEBUG
>      unsigned SourceChecksum;       /**< for debug/logging purposes */
>   #endif
> @@ -2581,14 +2582,14 @@ struct gl_shader
>   
>      unsigned Version;       /**< GLSL version used for linking */
>   
> -   struct exec_list *ir;
> -   struct glsl_symbol_table *symbols;
> -
>      /**
>       * A bitmask of gl_advanced_blend_mode values
>       */
>      GLbitfield BlendSupport;
>   
> +   struct exec_list *ir;
> +   struct glsl_symbol_table *symbols;
> +
>      /**
>       * Whether early fragment tests are enabled as defined by
>       * ARB_shader_image_load_store.
> 


More information about the mesa-dev mailing list