diff options
Diffstat (limited to 'src/mesa/main/glspirv.h')
-rw-r--r-- | src/mesa/main/glspirv.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/main/glspirv.h b/src/mesa/main/glspirv.h index 4e033735cfe..b8a0125ea9f 100644 --- a/src/mesa/main/glspirv.h +++ b/src/mesa/main/glspirv.h @@ -42,10 +42,35 @@ struct gl_spirv_module { char Binary[0]; }; +/** + * SPIR-V data needed to compile and link a SPIR-V shader. + * + * It includes a SPIR-V binary that is potentially shared among different + * shaders; and shader-specific specialization constants and entry point. + * + * It is reference-counted because it is shared between gl_shader and its + * corresponding gl_linked_shader. + */ +struct gl_shader_spirv_data { + GLint RefCount; + + struct gl_spirv_module *SpirVModule; + + GLchar *SpirVEntryPoint; + + GLuint NumSpecializationConstants; + GLuint *SpecializationConstantsIndex; + GLuint *SpecializationConstantsValue; +}; + void _mesa_spirv_module_reference(struct gl_spirv_module **dest, struct gl_spirv_module *src); +void +_mesa_shader_spirv_data_reference(struct gl_shader_spirv_data **dest, + struct gl_shader_spirv_data *src); + /** * \name API functions */ |