LIBDXCOMPILER.SO:(1)

๐Ÿ“ฆ version 1.9.2602, in ubuntu stonking

๐Ÿ’– 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 are internal or external.
  • -denorm <value> โ€” select your denormal value options: any, preserve, ftz. and any is 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 are utf8, utf16(win), utf32(*nix), or wide, and the default is utf8.
  • -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 /Zi is 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 the fxc behavior, 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 disable alwaysinline annotation 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_1 if 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 is 2021.
  • -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: -Zi and -Zs are mutually exclusive. pick your fighter, you cannot have both.

๐Ÿ’… OPTIONS: ๐Ÿ’…

  • -MD โ€” write a file with a .d extension 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 into cbuffer 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 the MaximallyReconvergesKHR execution 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 is 0x3FFFFF, 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, or universal1.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 โ€” apply fvk-*-shift to resources without an explicit register assignment.
  • -fvk-b-shift <shift> <space> โ€” specify the Vulkan binding number shift for a b-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 $Globals cbuffer 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 on SV_Position.y right 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 for s-type registers ๐Ÿ‘‘
  • -fvk-support-nonzero-base-instance โ€” do it the Vulkan-spec way: gl_BaseInstance becomes the first vertex instance, which means SV_InstanceID = gl_InstanceIndex - gl_BaseInstance. Without this option you just get SV_InstanceID = gl_InstanceIndex, periodt ๐Ÿ’€
  • -fvk-support-nonzero-base-vertex โ€” the vertex remix ๐Ÿฆ‹: follow the Vulkan spec and let gl_BaseVertex be the first vertex, so SV_VertexID = gl_VertexIndex - gl_BaseVertex. Skip this option and it's plain SV_VertexID = gl_VertexIndex instead.
  • -fvk-t-shift <shift> <space> โ€” Vulkan binding number shift, but for t-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 โ€” reciprocates SV_Position.w after reading from stage input in PS, so Vulkan and DirectX stop disagreeing about things ๐Ÿ˜ญ
  • -fvk-use-gl-layout โ€” strict OpenGL std140/std430 memory 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 (peep http://khr.io/hlsl2spirv#optimization for 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. The no- 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