diff options
author | Eduardo Lima Mitev <[email protected]> | 2017-10-13 10:31:50 +0200 |
---|---|---|
committer | Alejandro PiƱeiro <[email protected]> | 2018-03-30 09:14:56 +0200 |
commit | abb6d0797c8a0c32f45d38d7a41e96b2db47a47d (patch) | |
tree | f6c47be9651746629038bbd3cdbb8fe327fc04a9 /src/mesa/main/glspirv.h | |
parent | 16f6634e7fb5ada308e55b852cd49251e7f3f8b1 (diff) |
mesa/glspirv: Add a _mesa_spirv_to_nir() function
This is basically a wrapper around spirv_to_nir() that includes
arguments setup and post-conversion validation.
v2: * Rebase update (SpirVCapabilities not a pointer anymore,
spirv_to_nir_options added, and others).
* Code-style improvements and remove debug hunk. (Timothy Arceri)
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main/glspirv.h')
-rw-r--r-- | src/mesa/main/glspirv.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/main/glspirv.h b/src/mesa/main/glspirv.h index 0f03b75c111..81626ce75b5 100644 --- a/src/mesa/main/glspirv.h +++ b/src/mesa/main/glspirv.h @@ -24,6 +24,7 @@ #ifndef GLSPIRV_H #define GLSPIRV_H +#include "compiler/nir/nir.h" #include "mtypes.h" #ifdef __cplusplus @@ -80,6 +81,12 @@ void _mesa_spirv_link_shaders(struct gl_context *ctx, struct gl_shader_program *prog); +nir_shader * +_mesa_spirv_to_nir(struct gl_context *ctx, + const struct gl_shader_program *prog, + gl_shader_stage stage, + const nir_shader_compiler_options *options); + /** * \name API functions */ |