@@ -303,6 +303,7 @@ Supported extensions
303303* SPV_GOOGLE_user_type
304304* SPV_NV_mesh_shader
305305* SPV_KHR_fragment_shading_barycentric
306+ * SPV_KHR_float_controls
306307
307308Vulkan specific attributes
308309--------------------------
@@ -397,8 +398,8 @@ interface variables:
397398 main([[vk::location(N)]] float4 input: A) : B
398399 { ... }
399400
400- Macro for SPIR-V
401- ----------------
401+ Macros for SPIR-V
402+ -----------------
402403
403404If SPIR-V CodeGen is enabled and ``-spirv `` flag is used as one of the command
404405line options (meaning that "generates SPIR-V code"), it defines an implicit
@@ -412,6 +413,12 @@ specific part of the HLSL code:
412413 #endif
413414 RWStructuredBuffer<S> mySBuffer;
414415
416+ When the ``-spirv `` flag is used, the ``-fspv-target-env `` option will
417+ implicitly define the macros ``__SPIRV_MAJOR_VERSION__ `` and
418+ ``__SPIRV_MINOR_VERSION__ ``, which will be integers representing the major and
419+ minor version of the SPIR-V being generated. This can be used to enable code that uses a feature
420+ only for environments where that feature is available.
421+
415422SPIR-V version and extension
416423----------------------------
417424
@@ -2884,6 +2891,30 @@ If an output unsigned integer ``status`` argument is present,
28842891``OpImageSparseSampleDrefExplicitLod `` is used instead. The resulting SPIR-V
28852892``Residency Code `` will be written to ``status ``.
28862893
2894+ ``.SampleCmpBias(sampler, location, bias, comparator[, offset][, clamp][, Status]) ``
2895+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2896+
2897+ Not available to ``Texture3D ``, ``Texture2DMS ``, and ``Texture2DMSArray ``.
2898+
2899+ The translation is similar to ``.SampleBias() ``, but the
2900+ ``OpImageSampleDrefImplicitLod `` instruction is used.
2901+
2902+ If an output unsigned integer ``status `` argument is present,
2903+ ``OpImageSparseSampleDrefImplicitLod `` is used instead. The resulting SPIR-V
2904+ ``Residency Code `` will be written to ``status ``.
2905+
2906+ ``.SampleCmpGrad(sampler, location, ddx, ddy, comparator[, offset][, clamp][, Status]) ``
2907+ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2908+
2909+ Not available to ``Texture3D ``, ``Texture2DMS ``, and ``Texture2DMSArray ``.
2910+
2911+ The translation is similar to ``.SampleGrad() ``, but the
2912+ ``OpImageSampleDrefExplicitLod `` instruction are used.
2913+
2914+ If an output unsigned integer ``status `` argument is present,
2915+ ``OpImageSparseSampleDrefExplicitLod `` is used instead. The resulting SPIR-V
2916+ ``Residency Code `` will be written to ``status ``.
2917+
28872918``.Gather() ``
28882919+++++++++++++
28892920
@@ -2977,10 +3008,11 @@ Not available to ``Texture2DMS`` and ``Texture2DMSArray``.
29773008
29783009Since texture types are represented as ``OpTypeImage ``, the ``OpImageQueryLod ``
29793010instruction is used for translation. An ``OpSampledImage `` is created based on
2980- the ``SamplerState `` passed to the function. The resulting sampled image and
2981- the coordinate passed to the function are used to invoke ``OpImageQueryLod ``.
2982- The result of ``OpImageQueryLod `` is a ``float2 ``. The first element contains
2983- the mipmap array layer. The second element contains the unclamped level of detail.
3011+ the ``SamplerState `` or ``SamplerComparisonState `` passed to the function. The
3012+ resulting sampled image and the coordinate passed to the function are used to
3013+ invoke ``OpImageQueryLod ``. The result of ``OpImageQueryLod `` is a ``float2 ``.
3014+ The first element contains the mipmap array layer. The second element contains
3015+ the unclamped level of detail.
29843016
29853017``Texture1D ``
29863018~~~~~~~~~~~~~
0 commit comments