aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2019-02-22 11:51:24 +1100
committerTimothy Arceri <[email protected]>2019-03-06 23:05:20 +0000
commit7530d4abfcf9d39fb1b4abeb77cdbf6cf1d411a7 (patch)
treef7dec5de299bcb431672f3a7c9209bc871b328a2 /src/gallium/drivers
parent15b83b3af972fe32de4b1730ef6aff110e5da49a (diff)
glsl/freedreno/panfrost: pass gl_context to the standalone compiler
This allows us to use the ctx with glsl_to_nir() in a following patch. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_cmdline.c3
-rw-r--r--src/gallium/drivers/panfrost/midgard/cmdline.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
index 872bcb28469..0850618bc3d 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_cmdline.c
@@ -110,8 +110,9 @@ load_glsl(unsigned num_files, char* const* files, gl_shader_stage stage)
struct gl_shader_program *prog;
const nir_shader_compiler_options *nir_options =
ir3_get_compiler_options(compiler);
+ static struct gl_context local_ctx;
- prog = standalone_compile_shader(&options, num_files, files);
+ prog = standalone_compile_shader(&options, num_files, files, &local_ctx);
if (!prog)
errx(1, "couldn't parse `%s'", files[0]);
diff --git a/src/gallium/drivers/panfrost/midgard/cmdline.c b/src/gallium/drivers/panfrost/midgard/cmdline.c
index 1aa0323bb0d..7326402dd09 100644
--- a/src/gallium/drivers/panfrost/midgard/cmdline.c
+++ b/src/gallium/drivers/panfrost/midgard/cmdline.c
@@ -53,7 +53,9 @@ compile_shader(char **argv)
.do_link = true,
};
- prog = standalone_compile_shader(&options, 2, argv);
+ static struct gl_context local_ctx;
+
+ prog = standalone_compile_shader(&options, 2, argv, &local_ctx);
prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
for (unsigned i = 0; i < MESA_SHADER_STAGES; ++i) {
@@ -83,7 +85,9 @@ compile_blend(char **argv)
.glsl_version = 140,
};
- prog = standalone_compile_shader(&options, 1, argv);
+ static struct gl_context local_ctx;
+
+ prog = standalone_compile_shader(&options, 1, argv, &local_ctx);
prog->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program->info.stage = MESA_SHADER_FRAGMENT;
midgard_program program;