From f90bb54734bf03be6c736812226e3f65f2e11519 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 2 Feb 2015 16:13:49 -0800 Subject: nir: Add a nir_shader_compiler_options struct pointed to by the shaders. This will be used to give the optimization passes a chance to customize behavior for the particular target device. v2: Rebase to master (no TGSI->NIR present) Reviewed-by: Kenneth Graunke (v1) --- src/glsl/nir/nir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/glsl/nir/nir.c') diff --git a/src/glsl/nir/nir.c b/src/glsl/nir/nir.c index b46fd3083fd..0d8c80ae55b 100644 --- a/src/glsl/nir/nir.c +++ b/src/glsl/nir/nir.c @@ -29,7 +29,7 @@ #include nir_shader * -nir_shader_create(void *mem_ctx) +nir_shader_create(void *mem_ctx, const nir_shader_compiler_options *options) { nir_shader *shader = ralloc(mem_ctx, nir_shader); @@ -40,6 +40,8 @@ nir_shader_create(void *mem_ctx) shader->outputs = _mesa_hash_table_create(shader, _mesa_key_hash_string, _mesa_key_string_equal); + shader->options = options; + shader->num_user_structures = 0; shader->user_structures = NULL; -- cgit v1.2.3