diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-03-21 22:37:50 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-03-23 09:29:21 -0700 |
commit | 15012077bceda24cbf38afeda7723c47e1b0d3c3 (patch) | |
tree | e46ea43c7ede5cfa99b8f167ae9e2714714cd8df /src/compiler/spirv/nir_spirv.h | |
parent | dacb11a585face5ca179c34cfc588a71a425c1e0 (diff) |
spirv: Add an execution environment to the options
Also updates gl_spirv to pick the right one. At the moment nothing
uses it, but upcoming functionality part of ARB_gl_spirv will use it,
and we also later can be more assertful when handling certain features
for each of the execution environments.
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Acked-by: Karol Herbst <[email protected]>
Diffstat (limited to 'src/compiler/spirv/nir_spirv.h')
-rw-r--r-- | src/compiler/spirv/nir_spirv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h index d8ccbb48ff8..7a16422b291 100644 --- a/src/compiler/spirv/nir_spirv.h +++ b/src/compiler/spirv/nir_spirv.h @@ -50,7 +50,15 @@ enum nir_spirv_debug_level { NIR_SPIRV_DEBUG_LEVEL_ERROR, }; +enum nir_spirv_execution_environment { + NIR_SPIRV_VULKAN = 0, + NIR_SPIRV_OPENCL, + NIR_SPIRV_OPENGL, +}; + struct spirv_to_nir_options { + enum nir_spirv_execution_environment environment; + /* Whether or not to lower all workgroup variable access to offsets * up-front. This means you will _shared intrinsics instead of _var * for workgroup data access. |