[Mesa-dev] [PATCH 25/27] glsl/shader_cache: Save fs (BlendSupport) metadata

Timothy Arceri tarceri at itsqueeze.com
Sun Aug 20 23:01:46 UTC 2017



On 19/08/17 17:44, Jordan Justen wrote:
> Fixes many GL 4.5 CTS blend tests, such as:
> 
> * GL45-CTS.blend_equation_advanced.extension_directive_enable
> * GL45-CTS.blend_equation_advanced.extension_directive_warn
> * GL45-CTS.blend_equation_advanced.blend_all.GL_MULTIPLY_KHR_all_qualifier
> * GL45-CTS.blend_equation_advanced.blend_specific.GL_COLORBURN_KHR
> 
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>   src/compiler/glsl/shader_cache.cpp | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
> index 273c173725..1cb12e9b1d 100644
> --- a/src/compiler/glsl/shader_cache.cpp
> +++ b/src/compiler/glsl/shader_cache.cpp
> @@ -1180,6 +1180,8 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
>                          sizeof(struct gl_bindless_image));
>      }
>   
> +   blob_write_bytes(metadata, &glprog->sh.fs, sizeof(glprog->sh.fs));

Can we please change this to store the BlendSupport bitfield rather than 
the fragment shader struct. We want to void adding pointers to the cache 
in order to create reproducible cache items. I'd rather this just be 
explicit so we don't end up with something slipping into that cache that 
wasn't intended.


> +
>      write_shader_parameters(metadata, glprog->Parameters);
>   }
>   
> @@ -1231,6 +1233,9 @@ read_shader_metadata(struct blob_reader *metadata,
>         }
>      }
>   
> +   blob_copy_bytes(metadata, (uint8_t *) &glprog->sh.fs,
> +                   sizeof(glprog->sh.fs));
> +
>      glprog->Parameters = _mesa_new_parameter_list();
>      read_shader_parameters(metadata, glprog->Parameters);
>   }
> 


More information about the mesa-dev mailing list