diff options
author | Jason Ekstrand <[email protected]> | 2015-08-05 16:39:32 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-02 14:22:53 -0700 |
commit | cd1ae6ebfac22f76d26a5b8659423969b2aeddce (patch) | |
tree | 115fb6660580c59ad056306a1848310f2405e264 /src/glsl | |
parent | 30c63571133ed50907ec14172c2f3ef82ee8a34e (diff) |
nir/glsl: Take a gl_shader_program and a stage rather than a gl_shader
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/glsl_to_nir.cpp | 8 | ||||
-rw-r--r-- | src/glsl/nir/glsl_to_nir.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index f8745828a77..ba08e172637 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -129,9 +129,13 @@ private: }; /* end of anonymous namespace */ nir_shader * -glsl_to_nir(struct gl_shader *sh, const nir_shader_compiler_options *options) +glsl_to_nir(const struct gl_shader_program *shader_prog, + gl_shader_stage stage, + const nir_shader_compiler_options *options) { - nir_shader *shader = nir_shader_create(NULL, sh->Stage, options); + struct gl_shader *sh = shader_prog->_LinkedShaders[stage]; + + nir_shader *shader = nir_shader_create(NULL, stage, options); nir_visitor v1(shader); nir_function_visitor v2(&v1); diff --git a/src/glsl/nir/glsl_to_nir.h b/src/glsl/nir/glsl_to_nir.h index 3801e8c55c6..29badcda08d 100644 --- a/src/glsl/nir/glsl_to_nir.h +++ b/src/glsl/nir/glsl_to_nir.h @@ -32,7 +32,8 @@ extern "C" { #endif -nir_shader *glsl_to_nir(struct gl_shader *sh, +nir_shader *glsl_to_nir(const struct gl_shader_program *shader_prog, + gl_shader_stage stage, const nir_shader_compiler_options *options); #ifdef __cplusplus |