diff options
author | Nicolai Hähnle <[email protected]> | 2017-06-10 20:35:21 +0200 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2017-12-12 08:18:32 +0100 |
commit | 5bc03d250861df6836f9c9fe37e0609c1777a87b (patch) | |
tree | 378bee83caef17baf2c2793d06f18c2484afb5a5 /src/mesa/main/shaderobj.c | |
parent | a8889f5cc7129c1f8942248d620f64b4496e8f35 (diff) |
mesa: implement SPIR-V loading in glShaderBinary
v2: * Add a gl_shader_spirv_data member to gl_shader, which already
encapsulates a gl_spirv_module where the binary will be saved.
(Eduardo Lima)
* Just use the 'spirv_data' member to know whether a gl_shader has
the SPIR_V_BINARY_ARB state. (Timothy Arceri)
* Remove redundant argument checks. Move extension presence check
to API entry point where the rest of checks are. Retype 'n' and
'length'arguments to use the correct and more standard types.
(Ian Romanick)
* Fix some nitpicks. (Ian Romanick)
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r-- | src/mesa/main/shaderobj.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c index ce2e3df4fae..5c1cdd6b27a 100644 --- a/src/mesa/main/shaderobj.c +++ b/src/mesa/main/shaderobj.c @@ -33,6 +33,7 @@ #include "compiler/glsl/string_to_uint_map.h" #include "main/glheader.h" #include "main/context.h" +#include "main/glspirv.h" #include "main/hash.h" #include "main/mtypes.h" #include "main/shaderapi.h" @@ -121,6 +122,7 @@ _mesa_new_shader(GLuint name, gl_shader_stage stage) void _mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh) { + _mesa_shader_spirv_data_reference(&sh->spirv_data, NULL); free((void *)sh->Source); free((void *)sh->FallbackSource); free(sh->Label); |