Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/dxc/Support/HLSLOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,6 @@ def rw_decl_global_cb : Flag<["-", "/"], "decl-global-cb">, Group<hlslrewrite_Gr
HelpText<"Collect all global constants outside cbuffer declarations into cbuffer GlobalCB { ... }. Still experimental, not all dependency scenarios handled.">;
// Also removed: compress, decompress, /Gch (child effect), /Gpp (partial precision)
// /Op - no support for preshaders.

def devsh_disable_hlsl_intrinsics : Flag<["-"], "devsh-disable-hlsl-intrinsics">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,
HelpText<"Disable HLSL intrinsics">;
1 change: 1 addition & 0 deletions include/dxc/Support/SPIRVOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum class SpirvLayoutRule {
};

struct SpirvCodeGenOptions {
bool devshDisableHLSLIntrinsics;
/// Disable legalization and optimization and emit raw SPIR-V
bool codeGenHighLevel;
bool debugInfoFile;
Expand Down
2 changes: 2 additions & 0 deletions lib/DxcSupport/HLSLOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,8 @@ int ReadDxcOpts(const OptTable *optionTable, unsigned flagsToInclude,

// SPIRV Change Starts
#ifdef ENABLE_SPIRV_CODEGEN
opts.SpirvOptions.devshDisableHLSLIntrinsics =
Args.hasFlag(OPT_devsh_disable_hlsl_intrinsics, OPT_INVALID, false);
opts.GenSPIRV = Args.hasFlag(OPT_spirv, OPT_INVALID, false);
opts.SpirvOptions.invertY =
Args.hasFlag(OPT_fvk_invert_y, OPT_INVALID, false);
Expand Down
Loading