diff options
author | Timothy Arceri <[email protected]> | 2016-10-13 15:20:38 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | debed12fdde9766fd9cf99d679207a36a4599a82 (patch) | |
tree | 334d24b14f1ad541177bc601b9a31cf6f3cedda0 /src/compiler/glsl/glsl_to_nir.cpp | |
parent | e1af20f18a86f52a9640faf2d4ff8a71b0a4fa9b (diff) |
glsl: add a shader info field to the gl_program type
And use this field as the source for shader info in the nir_shader
this will allow us to set some of these fields from GLSL directly.
It will also simplify restoring from shader cache and allow the
removal of duplicate fields from GLSL.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_to_nir.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index b5318928792..934c9d14f94 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -136,7 +136,8 @@ glsl_to_nir(const struct gl_shader_program *shader_prog, { struct gl_linked_shader *sh = shader_prog->_LinkedShaders[stage]; - nir_shader *shader = nir_shader_create(NULL, stage, options, NULL); + nir_shader *shader = nir_shader_create(NULL, stage, options, + &sh->Program->info); nir_visitor v1(shader); nir_function_visitor v2(&v1); |