aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_glsl_to_nir.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-30 11:51:31 +1100
committerTimothy Arceri <[email protected]>2018-01-31 09:14:08 +1100
commit93e213f91f64189ff5fe65844a9fe5b8c48366c2 (patch)
tree85332864c48b5cb7f6bfdcd21d8e6234bae97c55 /src/mesa/state_tracker/st_glsl_to_nir.cpp
parentdd6d6c63a700af98a7a7d65dcdf72e8be69d4643 (diff)
st/glsl_to_nir: copy nir compiler options to context
Various nir passes may expect this to be here as does the nir serialisation pass. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_glsl_to_nir.cpp')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_nir.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp
index 8639544142e..6d3a7c78dcd 100644
--- a/src/mesa/state_tracker/st_glsl_to_nir.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp
@@ -304,14 +304,8 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,
struct gl_shader_program *shader_program,
gl_shader_stage stage)
{
- struct pipe_screen *pscreen = st->pipe->screen;
- enum pipe_shader_type ptarget = pipe_shader_type_from_mesa(stage);
- const nir_shader_compiler_options *options;
-
- assert(pscreen->get_compiler_options); /* drivers using NIR must implement this */
-
- options = (const nir_shader_compiler_options *)
- pscreen->get_compiler_options(pscreen, PIPE_SHADER_IR_NIR, ptarget);
+ const nir_shader_compiler_options *options =
+ st->ctx->Const.ShaderCompilerOptions[prog->info.stage].NirOptions;
assert(options);
if (prog->nir)