LIBDXCOMPILER.SO:(1)
๐ LIBDXCOMPILER.SO:(1) โ DirectX Shader Compiler ๐
okay bestie, settle in, grab a strawberry matcha ๐, because this is the manual page for libdxcompiler.so: โ User Commands energy, one hundred percent. This is part 1 of a two-parter, so don't go anywhere, we are NOT done yet.
๐ NAME ๐
libdxcompiler.so: โ the DirectX Shader Compiler. that's it, that's the vibe. she compiles HLSL, on Linux, and she's iconic for it. ๐
โจ DESCRIPTION โจ
OVERVIEW: HLSL Compiler for Linux ๐ง
Version: libdxcompiler.so: 1.9(0-00000000)(1.9.2602.0)
USAGE:
dxc.exe [options] <inputs>
like. that's the whole shape of it. options, then your inputs, go off. ๐
๐ Common Options:
-helpโ show me the available options, bestie. the full menu. ๐-Qunused-argumentsโ don't emit a warning just because some driver arguments are sitting there unused. lowkey polite of her.--versionโ display compiler version information.
๐ฅ Compilation Options:
-all-resources-boundโ enables aggressive flattening. (the manual spells it "agressive" and we are keeping it, no cap. ๐)-auto-binding-space <value>โ set the auto binding space. this is what enables auto resource binding in libraries.-Ccโ output color coded assembly listings. cute AND functional. ๐-default-linkage <value>โ set the default linkage for non-shader functions when compiling or linking to a library target. your choices areinternalorexternal.-denorm <value>โ select your denormal value options:any,preserve,ftz. andanyis the default, iykyk.-disable-payload-qualifiersโ disables support for payload access qualifiers for raytracing payloads in SM 6.7.-D <value>โ define a macro. classic.-enable-16bit-typesโ enable 16bit types and disable min precision types. available in HLSL 2018 and shader model 6.2.-enable-lifetime-markersโ enable generation of lifetime markers.-enable-payload-qualifiersโ enables support for payload access qualifiers for raytracing payloads in SM 6.6.-encoding <value>โ set the default encoding for source inputs and text outputs. your picks areutf8,utf16(win),utf32(*nix), orwide, and the default isutf8.-export-shaders-onlyโ only export shaders when you're compiling a library.-exports <value>โ specify exports when compiling a library, and the syntax is very specific, so copy it exactly, fr fr:
export1[[,export1_clone,...]=internal_name][;...]
-E <value>โ entry point name.-Fc <file>โ output assembly code listing file.-fdiagnostics-format=<value>โ select the diagnostic message format. supported values:clang,msvc,mdvc-fallback,vi. (yes,mdvc, that's what it says, we do not correct the manual in this house ๐)-fdiagnostics-show-optionโ print the option name along with mappable diagnostics.-fdisable-loc-trackingโ disable source location tracking in IR. heads up though: this will break diagnostic generation for late validation. (it gets ignored if/Ziis passed.)-Fd <file>โ write debug information to the given file, or to an automatically named file in a directory when the name ends in'\'.-Fe <file>โ output warnings and errors to the given file.-Fh <file>โ output a header file containing object code.-Fi <file>โ set the preprocess output file name (used with/P).-flegacy-macro-expansionโ expand the operands before performing the token-pasting operation. this is thefxcbehavior, for the nostalgia girlies.-flegacy-resource-reservationโ reserve unused explicit register assignments for compatibility with shader model 5.0 and below.-fnew-inlining-behaviorโ experimental option to use heuristics-driven late inlining and disablealwaysinlineannotation for library shaders. experimental, okay? she said what she said.-fno-diagnostics-show-optionโ do not print the option name with mappable diagnostics. the opposite of the other one, slay.-force-rootsig-ver <profile>โ force a root signature version (rootsig_1_1if omitted).-Fo <file>โ output object file.-Fre <file>โ output reflection to the given file.-Frs <file>โ output root signature to the given file.-Fsh <file>โ output shader hash to the given file.-ftime-reportโ print a time report.-ftime-trace-granularity=<value>โ minimum time granularity (in microseconds) traced by the time profiler.-ftime-trace=<value>โ print hierarchical time tracing to file. (yes it says "hierchial" in the original. we love her. ๐)-ftime-traceโ print hierarchical time tracing to stdout.-Gecโ enable backward compatibility mode.-Gesโ enable strict mode.-Gfaโ avoid flow control constructs.-Gfpโ prefer flow control constructs.-Gisโ force IEEE strictness.-HV <value>โ HLSL version:2016,2017,2018,2021. default is2021.-Hโ show header includes and nesting depth.-ignore-line-directivesโ ignore line directives.-I <value>โ add a directory to the include search path.-Lxโ output hexadecimal literals.-Niโ output instruction numbers in assembly listings.-no-warningsโ suppress warnings.-Noโ output instruction byte offsets in assembly listings.-Odumpโ print the optimizer commands.-Odโ disable optimizations.-pack-optimizedโ optimize signature packing, assuming an identical signature is provided for each connecting stage.-pack-prefix-stableโ (default) pack signatures preserving the prefix-stable property: appended elements will not disturb the placement of prior elements.-recompileโ recompile from a DXIL container with Debug Info or from a Debug Info bitcode file.-res-may-aliasโ assume that UAVs/SRVs may alias.-rootsig-define <value>โ read the root signature from a#define.-T <profile>โ set the target profile. and bestie, the list is LONG and we are not cutting a single one:
<profile>: ps_6_0, ps_6_1, ps_6_2, ps_6_3, ps_6_4, ps_6_5, ps_6_6,
ps_6_7, ps_6_8, ps_6_9,
vs_6_0, vs_6_1, vs_6_2, vs_6_3, vs_6_4, vs_6_5, vs_6_6, vs_6_7, vs_6_8,
vs_6_9, gs_6_0, gs_6_1, gs_6_2, gs_6_3, gs_6_4, gs_6_5, gs_6_6, gs_6_7,
gs_6_8, gs_6_9, hs_6_0, hs_6_1, hs_6_2, hs_6_3, hs_6_4, hs_6_5, hs_6_6,
hs_6_7, hs_6_8, hs_6_9, ds_6_0, ds_6_1, ds_6_2, ds_6_3, ds_6_4, ds_6_5,
ds_6_6, ds_6_7, ds_6_8, ds_6_9, cs_6_0, cs_6_1, cs_6_2, cs_6_3, cs_6_4,
cs_6_5, cs_6_6, cs_6_7, cs_6_8, cs_6_9, lib_6_1, lib_6_2, lib_6_3,
lib_6_4, lib_6_5, lib_6_6, lib_6_7, lib_6_8, lib_6_9, ms_6_5, ms_6_6,
ms_6_7, ms_6_8, ms_6_9, as_6_5, as_6_6, as_6_7, as_6_8, as_6_9,
-Vdโ disable validation. (spicy! ๐ถ๏ธ)-verboseโ allow emission of verbose compiler information.-verify<value>โ verify diagnostic output using comment directives.-Viโ display details about the include process.-Vn <name>โ use<name>as the variable name in the header file.-vโ an alias for-verbose.-WXโ treat warnings as errors. no more ignoring them, bestie, they're real now. ๐ญ-Ziโ enable debug information. cannot be used together with-Zs.-Zpcโ pack matrices in column-major order.-Zprโ pack matrices in row-major order.-Zsbโ compute Shader Hash considering only the output binary.-Zssโ compute Shader Hash considering source information.-Zsโ generate a small PDB with just sources and compile options. cannot be used together with-Zi.
๐ซถ note:-Ziand-Zsare mutually exclusive. pick your fighter, you cannot have both.
๐ OPTIONS: ๐
-MDโ write a file with a.dextension that will contain the list of the compilation target dependencies.-MF <file>โ write the specified file that will contain the list of the compilation target dependencies. (the manual says "specfied" and honestly? she's doing her best. ๐)-Mโ dump the list of the compilation target dependencies.
๐ Optimization Options:
-ffinite-math-onlyโ allow optimizations for floating-point arithmetic that assume arguments and results are not NaNs or+-Infs.-fno-finite-math-onlyโ disallow optimizations for floating-point arithmetic that assume that arguments and results are not NaNs or+-Infs. the mirror image, we love a matched set. ๐ช-O0โ Optimization Level 0.-O1โ Optimization Level 1.-O2โ Optimization Level 2.-O3โ Optimization Level 3. (Default) โ she comes optimized out of the box, periodt. โจ
๐ฆ Rewriter Options:
-decl-global-cbโ collect all global constants outside cbuffer declarations intocbuffer GlobalCB { ... }. still experimental, and not all dependency scenarios are handled. (so like, be aware, bestie ๐ซฃ)-extract-entry-uniformsโ move uniform parameters from the entry point to global scope.-global-extern-by-defaultโ set extern on non-static globals.-keep-user-macroโ write out user defines after rewritten HLSL.-line-directiveโ add line directive.-remove-unused-functionsโ remove unused functions and types.-remove-unused-globalsโ remove unused static globals and functions.-skip-fn-bodyโ translate function definitions to declarations.-skip-staticโ remove static functions and globals when used with-skip-fn-body.-unchangedโ rewrite HLSL, without changes. she's just here for the vibes. ๐ธ
๐ SPIR-V CodeGen Options:
-fspv-debug=<value>โ specify the whitelist of debug info category (file->source->line,tool,vulkan-with-source).-fspv-enable-maximal-reconvergenceโ enables theMaximallyReconvergesKHRexecution mode for this module.-fspv-entrypoint-name=<value>โ specify the SPIR-V entry point name. defaults to the HLSL entry point name.-fspv-extension=<value>โ specify the SPIR-V extension permitted to use.-fspv-flatten-resource-arraysโ flatten arrays of resources so each array element takes one binding number.-fspv-max-id <shift> <space>โ set the maximum value for an id in the SPIR-V binary. default is0x3FFFFF, which is the largest value all drivers must support.-fspv-preserve-bindingsโ preserves all bindings declared within the module, even when those bindings are unused.-fspv-preserve-interfaceโ preserves all interface variables in the entry point, even when those variables are unused.-fspv-print-allโ print the SPIR-V module before each pass and after the last one. useful for debugging SPIR-V legalization and optimization passes.-fspv-reduce-load-sizeโ replaces loads of composite objects to reduce memory pressure for the loads.-fspv-reflectโ emit additional SPIR-V instructions to aid reflection.-fspv-target-env=<value>โ specify the target environment:vulkan1.0(default),vulkan1.1,vulkan1.1spirv1.4,vulkan1.2,vulkan1.3, oruniversal1.5.-fspv-use-legacy-buffer-matrix-orderโ assume the legacy matrix order (row major) when accessing raw buffers (e.g.,ByteAdddressBuffer).-fspv-use-unknown-image-formatโ for storage images and texel buffers, sets the default format to'Unknown'when not specified via the`vk::image_format`attribute. if this option is not used, the format is inferred from the resource's data type.-fspv-use-vulkan-memory-modelโ generates SPIR-V modules that use the Vulkan memory model instead of GLSL450.-fvk-auto-shift-bindingsโ applyfvk-*-shiftto resources without an explicit register assignment.-fvk-b-shift <shift> <space>โ specify the Vulkan binding number shift for ab-type register.-fvk-bind-counter-heap <binding> <set>โ specify the Vulkan binding number and set number for the counter heap.-fvk-bind-globals <binding> <set>โ tells Vulkan which binding number AND which set number the$Globalscbuffer lives at ๐ like, you're hand-delivering the address, bestie.-fvk-bind-register <type-number> <space> <binding> <set>โ same energy but for one specific register: you say the Vulkan descriptor set and binding it gets mapped to ๐-fvk-bind-resource-heap <binding> <set>โ Vulkan binding number + set number, but for the resource heap ๐ธ-fvk-bind-sampler-heap <binding> <set>โ Vulkan binding number + set number, this time for the sampler heap โจ-fvk-invert-yโ flips the sign onSV_Position.yright before it gets written to the stage output in VS/DS/GS/MS/Lib, because Vulkan's coordinate system is built different ๐ (upside-down relative to what you're used to, no cap)-fvk-s-shift <shift> <space>โ sets the Vulkan binding number shift fors-type registers ๐-fvk-support-nonzero-base-instanceโ do it the Vulkan-spec way:gl_BaseInstancebecomes the first vertex instance, which meansSV_InstanceID = gl_InstanceIndex - gl_BaseInstance. Without this option you just getSV_InstanceID = gl_InstanceIndex, periodt ๐-fvk-support-nonzero-base-vertexโ the vertex remix ๐ฆ: follow the Vulkan spec and letgl_BaseVertexbe the first vertex, soSV_VertexID = gl_VertexIndex - gl_BaseVertex. Skip this option and it's plainSV_VertexID = gl_VertexIndexinstead.-fvk-t-shift <shift> <space>โ Vulkan binding number shift, but fort-type registers ๐-fvk-u-shift <shift> <space>โ Vulkan binding number shift,u-type registers this time ๐-fvk-use-dx-layoutโ use the DirectX memory layout for your Vulkan resources ๐ฎ-fvk-use-dx-position-wโ reciprocatesSV_Position.wafter reading from stage input in PS, so Vulkan and DirectX stop disagreeing about things ๐ญ-fvk-use-gl-layoutโ strict OpenGLstd140/std430memory layout for Vulkan resources, no wiggle room ๐-fvk-use-scalar-layoutโ scalar memory layout for Vulkan resources โจ-metalโ generated code is Metal now ๐ธ-Oconfig=<value>โ hands SPIRV-Tools a comma-separated list of passes so you can customize the optimization configuration however you want (peephttp://khr.io/hlsl2spirv#optimizationfor the deets) ๐ฅ-spirvโ generated code is SPIR-V now ๐ซ
๐งฐ Utility Options
-dumpbinโ loads a binary file instead of compiling one ๐-extractrootsignatureโ pulls the root signature out of shader bytecode (heads up: this one has to be used with/Fo <file>) ๐-getprivate <file>โ saves the private data from a shader blob ๐พ-linkโ links the list of libraries you passed in the<inputs>argument, separated by';'๐-Pโ preprocess to file ๐-Qembed_debugโ embeds the PDB in the shader container (must be used with/Zi) ๐ซถ-Qsource_in_debug_moduleโ embeds source code in the PDB ๐-Qstrip_debugโ strips debug information out of 4_0+ shader bytecode (must be used with/Fo <file>) ๐งน-Qstrip_privโ strips private data out of shader bytecode (must be used with/Fo <file>) ๐งฝ-Qstrip_reflectโ strips reflection data out of shader bytecode (must be used with/Fo <file>) โจ-Qstrip_rootsignatureโ strips root signature data out of shader bytecode (must be used with/Fo <file>) ๐-setprivate <file>โ private data to add to the compiled shader blob ๐ฅ-setrootsignature <file>โ attaches a root signature to shader bytecode ๐๏ธ-verifyrootsignature <file>โ verifies shader bytecode against a root signature โ
โ ๏ธ Warning Options
-W[no-]<warning>โ enables or disables the specified warning. Theno-is literally the off switch, bestie ๐ฆ
๐ SEE ALSO
The full documentation for libdxcompiler.so: lives as a Texinfo manual ๐ so if the info and libdxcompiler.so: programs are properly installed on your site, this:
info libdxcompiler.so:
is gonna hand you the complete manual. Obsessed, honestly ๐
and that's the whole page, bestie!! this was libdxcompiler.so: version 1.9(0-0000000..., dated March 2026, from the LIBDXCOMPILER.SO:(1) manual โ go forth and shift those bindings ๐โจ๐ฆ
๐ฆ where this page comes from
- ubuntu stonking: dxc 1.9.2602+dfsg-0ubuntu1 ยท llvm-release-license
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms