diff options
author | Eric Anholt <[email protected]> | 2015-02-02 16:13:49 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-02-18 14:47:50 -0800 |
commit | f90bb54734bf03be6c736812226e3f65f2e11519 (patch) | |
tree | 5ec1cc55001f020619f34184cf02811021346c1e /src/glsl/nir/nir.c | |
parent | 4a95be9772a255776309f23180519a4a8560f2dd (diff) |
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 <[email protected]> (v1)
Diffstat (limited to 'src/glsl/nir/nir.c')
-rw-r--r-- | src/glsl/nir/nir.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <assert.h> 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; |