Skip to content

Commit c78ae35

Browse files
NielsbishereAltNielsbishere
authored andcommitted
Updated some outdated documentation in the CLI and SPIR-V.rst and lib compiles now also allow fvk-invert-y.
1 parent 474f9d2 commit c78ae35

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/SPIR-V.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4227,7 +4227,7 @@ codegen for Vulkan:
42274227
- ``-fvk-use-dx-layout``: Uses DirectX layout rules for resources.
42284228
- ``-fvk-invert-y``: Negates (additively inverts) SV_Position.y before writing
42294229
to stage output. Used to accommodate the difference between Vulkan's
4230-
coordinate system and DirectX's. Only allowed in VS/DS/GS.
4230+
coordinate system and DirectX's. Only allowed in VS/DS/GS/MS/Lib.
42314231
- ``-fvk-use-dx-position-w``: Reciprocates (multiplicatively inverts)
42324232
SV_Position.w after reading from stage input. Used to accommodate the
42334233
difference between Vulkan DirectX: the w component of SV_Position in PS is

include/dxc/Support/HLSLOptions.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def fvk_bind_register : MultiArg<["-"], "fvk-bind-register", 4>, MetaVarName<"<t
368368
HelpText<"Specify Vulkan descriptor set and binding for a specific register">;
369369
def vkbr : MultiArg<["-"], "vkbr", 4>, Flags<[CoreOption, DriverOption]>, Alias<fvk_bind_register>;
370370
def fvk_invert_y: Flag<["-"], "fvk-invert-y">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,
371-
HelpText<"Negate SV_Position.y before writing to stage output in VS/DS/GS to accommodate Vulkan's coordinate system">;
371+
HelpText<"Negate SV_Position.y before writing to stage output in VS/DS/GS/MS/Lib to accommodate Vulkan's coordinate system">;
372372
def fvk_use_dx_position_w: Flag<["-"], "fvk-use-dx-position-w">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,
373373
HelpText<"Reciprocate SV_Position.w after reading from stage input in PS to accommodate the difference between Vulkan and DirectX">;
374374
def fvk_support_nonzero_base_instance: Flag<["-"], "fvk-support-nonzero-base-instance">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,

tools/clang/lib/SPIRV/SpirvEmitter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ SpirvEmitter::SpirvEmitter(CompilerInstance &ci)
604604
emitError("unknown shader module: %0", {}) << shaderModel->GetName();
605605

606606
if (spirvOptions.invertY && !shaderModel->IsVS() && !shaderModel->IsDS() &&
607-
!shaderModel->IsGS() && !shaderModel->IsMS())
608-
emitError("-fvk-invert-y can only be used in VS/DS/GS/MS", {});
607+
!shaderModel->IsGS() && !shaderModel->IsMS() && !shaderModel->IsLib())
608+
emitError("-fvk-invert-y can only be used in VS/DS/GS/MS/Lib", {});
609609

610610
if (spirvOptions.useGlLayout && spirvOptions.useDxLayout)
611611
emitError("cannot specify both -fvk-use-dx-layout and -fvk-use-gl-layout",

0 commit comments

Comments
 (0)