[clang] [HLSL][SPIRV] Add -fspv-use-unknown-image-format option (PR #155664)

Nathan Gauër via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 28 11:15:07 PDT 2025


================
@@ -9480,6 +9480,16 @@ def fvk_use_scalar_layout
     : DXCFlag<"fvk-use-scalar-layout">,
       HelpText<"Use scalar memory layout for Vulkan resources.">;
 
+def fhlsl_spv_use_unknown_image_format
+    : Flag<["-"], "fspv-use-unknown-image-format">,
+      Group<dxc_Group>,
+      Visibility<[CC1Option, DXCOption]>,
+      HelpText<"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 "
+               "fron the resource's data type.">,
----------------
Keenuts wrote:

```suggestion
               "from the resource's data type.">,
```

https://github.com/llvm/llvm-project/pull/155664


More information about the cfe-commits mailing list