#[repr(C)]pub enum TargetEnv {
Show 24 variants
Universal_1_0 = 0,
Vulkan_1_0 = 1,
Universal_1_1 = 2,
OpenCL_2_1 = 3,
OpenCL_2_2 = 4,
OpenGL_4_0 = 5,
OpenGL_4_1 = 6,
OpenGL_4_2 = 7,
OpenGL_4_3 = 8,
OpenGL_4_5 = 9,
Universal_1_2 = 10,
OpenCL_1_2 = 11,
OpenCLEmbedded_1_2 = 12,
OpenCL_2_0 = 13,
OpenCLEmbedded_2_0 = 14,
OpenCLEmbedded_2_1 = 15,
OpenCLEmbedded_2_2 = 16,
Universal_1_3 = 17,
Vulkan_1_1 = 18,
WebGPU_0 = 19,
Universal_1_4 = 20,
Vulkan_1_1_Spirv_1_4 = 21,
Universal_1_5 = 22,
Vulkan_1_2 = 23,
}
Expand description
Certain target environments impose additional restrictions on SPIR-V, so it’s
often necessary to specify which one applies. Universal_*
implies an
environment-agnostic SPIR-V.
When an API method needs to derive a SPIR-V version from a target environment the method will choose the highest version of SPIR-V supported by the target environment. Examples:
SPV_ENV_VULKAN_1_0 -> SPIR-V 1.0
SPV_ENV_VULKAN_1_1 -> SPIR-V 1.3
SPV_ENV_VULKAN_1_1_SPIRV_1_4 -> SPIR-V 1.4
SPV_ENV_VULKAN_1_2 -> SPIR-V 1.5
Consult the description of API entry points for specific rules.
Variants§
Universal_1_0 = 0
SPIR-V 1.0 latest revision, no other restrictions.
Vulkan_1_0 = 1
Vulkan 1.0 latest revision.
Universal_1_1 = 2
SPIR-V 1.1 latest revision, no other restrictions.
OpenCL_2_1 = 3
OpenCL Full Profile 2.1 latest revision.
OpenCL_2_2 = 4
OpenCL Full Profile 2.2 latest revision.
OpenGL_4_0 = 5
OpenGL 4.0 plus GL_ARB_gl_spirv, latest revisions.
OpenGL_4_1 = 6
OpenGL 4.1 plus GL_ARB_gl_spirv, latest revisions.
OpenGL_4_2 = 7
OpenGL 4.2 plus GL_ARB_gl_spirv, latest revisions.
OpenGL_4_3 = 8
OpenGL 4.3 plus GL_ARB_gl_spirv, latest revisions.
OpenGL_4_5 = 9
OpenGL 4.5 plus GL_ARB_gl_spirv, latest revisions.
Universal_1_2 = 10
SPIR-V 1.2, latest revision, no other restrictions.
OpenCL_1_2 = 11
OpenCL Full Profile 1.2 plus cl_khr_il_program, latest revision.
OpenCLEmbedded_1_2 = 12
OpenCL Embedded Profile 1.2 plus cl_khr_il_program, latest revision.
OpenCL_2_0 = 13
OpenCL Full Profile 2.0 plus cl_khr_il_program, latest revision.
OpenCLEmbedded_2_0 = 14
OpenCL Embedded Profile 2.0 plus cl_khr_il_program, latest revision.
OpenCLEmbedded_2_1 = 15
OpenCL Embedded Profile 2.1 latest revision.
OpenCLEmbedded_2_2 = 16
OpenCL Embedded Profile 2.2 latest revision.
Universal_1_3 = 17
SPIR-V 1.3 latest revision, no other restrictions.
Vulkan_1_1 = 18
Vulkan 1.1 latest revision.
WebGPU_0 = 19
Work in progress WebGPU 1.0.
Universal_1_4 = 20
SPIR-V 1.4 latest revision, no other restrictions.
Vulkan_1_1_Spirv_1_4 = 21
Vulkan 1.1 with VK_KHR_spirv_1_4, i.e. SPIR-V 1.4 binary.
Universal_1_5 = 22
SPIR-V 1.5 latest revision, no other restrictions.
Vulkan_1_2 = 23
Vulkan 1.2 latest revision.