HLSL pragma require command reference
Reference for all the valid values for the pragma require directive.
Read time 3 minutesLast updated 11 hours ago
Here are all the valid values for the directive.
#pragma requireValue | Description |
|---|---|
| 2D texture arrays are a supported data type. |
| The |
| Compute shaders, structured buffers, and atomic operations are supported. |
| Cubemap arrays are a supported data type. |
| Pixel shader derivative instructions (ddx/ddy) are supported. |
| Pixel location (XY on screen, ZW depth in clip space) input in pixel shader is supported. |
| The ability to get the current framebuffer from GPU memory is supported. This process is sometimes called framebuffer fetch. For more information, refer to Writing shaders for different graphics APIs. |
| Geometry shader stages are supported. |
| Inline ray tracing is supported, so you can generate ray queries in the rasterization and compute stages of a shader. Refer to SystemInfo.supportsInlineRayTracing for more information. |
| SV_InstanceID input system value is supported. |
| 64-bit integer operations are supported. |
| Thread-safe 64-bit integer operations in buffers are supported. |
| Thread-safe 64-bit integer operations in |
| Integers are a supported data type, including bit/shift operations. Note: Internally, this also automatically adds |
| At least 10 vertex-to-fragment interpolators (“varyings”) are available. |
| At least 15 vertex-to-fragment interpolators (“varyings”) are available. Note: Internally, this also automatically adds |
| At least 32 vertex-to-fragment interpolators (“varyings”) are available. |
| At least 4 render targets are supported. |
| At least 8 render targets are supported. |
| The ability to access multi-sampled textures (Texture2DMS in HLSL) is supported. |
| Native 16-bit types are supported for arithmetic operations and storage buffers, without conversion to 32-bit types. For more information, refer to Use 16-bit precision in shaders. |
| Operations that let a thread read a value from other threads in its quad are supported. |
| “Random write” (UAV) textures are supported. |
| Explicit texture LOD sampling (tex2Dlod / SampleLevel) is supported. |
| Setting the render target array index from any shader stage (not just the geometry shader stage) is supported. |
| Sparse textures with residency info (“Tier2” support in DirectX terms; |
| Hardware tessellation is supported, but not necessarily tessellation (hull/domain) shader stages. For example, Metal supports tessellation, but not hull or domain stages. |
| Tessellation (hull/domain) shader stages are supported. |
| Basic wave operations are supported. For more information about wave operations, refer to the Shader Model 6 documentation on the Microsoft website. |
| Operations that check which threads in a wave meet a condition are supported. |
| Operations that perform arithmetic across the threads in a wave are supported. |
| Shader Model 6.5 operations that find matching threads and calculate running totals are supported. |
| Operations that let one thread read a value from another thread are supported. |
| Operations that check a condition across all the threads in a wave are supported. |