summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/glsl_to_nir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir/glsl_to_nir.cpp')
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp28
1 files changed, 2 insertions, 26 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index b82e5c7ac18..7e40ef485a1 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -124,34 +124,10 @@ private:
}; /* end of anonymous namespace */
-static const nir_shader_compiler_options default_options = {
-};
-
nir_shader *
-glsl_to_nir(exec_list *ir, _mesa_glsl_parse_state *state,
- bool native_integers)
+glsl_to_nir(exec_list *ir, bool native_integers,
+ const nir_shader_compiler_options *options)
{
- const nir_shader_compiler_options *options;
-
- if (state) {
- struct gl_context *ctx = state->ctx;
- struct gl_shader_compiler_options *gl_options =
- &ctx->Const.ShaderCompilerOptions[state->stage];
-
- if (!gl_options->NirOptions) {
- nir_shader_compiler_options *new_options =
- rzalloc(ctx, nir_shader_compiler_options);
- options = gl_options->NirOptions = new_options;
-
- if (gl_options->EmitNoPow)
- new_options->lower_fpow = true;
- } else {
- options = gl_options->NirOptions;
- }
- } else {
- options = &default_options;
- }
-
nir_shader *shader = nir_shader_create(NULL, options);
nir_visitor v1(shader, native_integers);