summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl/shader_cache.cpp
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-03-28 11:48:55 -0700
committerJordan Justen <[email protected]>2017-10-31 23:36:54 -0700
commite6ecd7d73fdbbca45ed398185eee2823e381d472 (patch)
tree937e728764fab0cffaa847e06b2a9040ad849036 /src/compiler/glsl/shader_cache.cpp
parent7f5204a0dbfc2c3ab240842f06d3afb2e7b9ed2c (diff)
glsl/shader_cache: Save fs (BlendSupport) metadata
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 v2: * Directly save the BlendSupport field to avoid potentially including a pointer in the future in the structure is updated. (tarceri) Cc: Timothy Arceri <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/shader_cache.cpp')
-rw-r--r--src/compiler/glsl/shader_cache.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/glsl/shader_cache.cpp b/src/compiler/glsl/shader_cache.cpp
index 1d208fb0911..8fd2774bdfa 100644
--- a/src/compiler/glsl/shader_cache.cpp
+++ b/src/compiler/glsl/shader_cache.cpp
@@ -1061,6 +1061,9 @@ write_shader_metadata(struct blob *metadata, gl_linked_shader *shader)
sizeof(struct gl_bindless_image) - ptr_size);
}
+ blob_write_bytes(metadata, &glprog->sh.fs.BlendSupport,
+ sizeof(glprog->sh.fs.BlendSupport));
+
write_shader_parameters(metadata, glprog->Parameters);
assert((glprog->driver_cache_blob == NULL) ==
@@ -1122,6 +1125,9 @@ read_shader_metadata(struct blob_reader *metadata,
}
}
+ blob_copy_bytes(metadata, (uint8_t *) &glprog->sh.fs.BlendSupport,
+ sizeof(glprog->sh.fs.BlendSupport));
+
glprog->Parameters = _mesa_new_parameter_list();
read_shader_parameters(metadata, glprog->Parameters);