Skip to content

Commit 793f8f1

Browse files
authored
Merge branch 'main' into attr-arg-consts
2 parents 423617d + efc9302 commit 793f8f1

196 files changed

Lines changed: 8224 additions & 2349 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ if( MSVC )
301301

302302
set(msvc_warning_flags
303303
# Disabled warnings.
304-
-wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
305304
-wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
306305
-wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
307306
-wd4258 # Suppress ''var' : definition from the for loop is ignored; the definition from the enclosing scope is used'

docs/ReleaseNotes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ The included licenses apply to the following files:
1919

2020
### Upcoming Release
2121

22-
Place release notes for the upcoming release below this line and remove this line upon naming this release.
22+
- Fix regression: [#7510](https://github.com/microsoft/DirectXShaderCompiler/issues/7510) crash when calling `sizeof` on templated type.
23+
- Fix regression: [#7508](https://github.com/microsoft/DirectXShaderCompiler/issues/7508) crash when calling `Load` with `status`.
24+
- Header file `dxcpix.h` was added to the release package.
2325

2426
### Version 1.8.2505
2527

docs/SPIR-V.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,13 @@ are translated into SPIR-V ``OpTypeImage``, with parameters:
896896
The meanings of the headers in the above table is explained in ``OpTypeImage``
897897
of the SPIR-V spec.
898898

899+
For storage images (e.g. ``RWTexture2D<T>``) and texel buffers (e.g. ``RWBuffer<T>``),
900+
the image format is typically inferred from the data type ``T``. However, the
901+
``-fspv-use-unknown-image-format`` command-line option can be used to change
902+
this behavior. When this option is active, the default format for these
903+
resources becomes ``Unknown`` if not otherwise specified by the
904+
``[[vk::image_format]]`` attribute.
905+
899906
Vulkan specific Image Formats
900907
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
901908

@@ -1012,17 +1019,18 @@ right now:
10121019
2. DirectX memory layout rules for uniform buffers and storage buffers:
10131020
they allow packing data on the application side that can be shared with
10141021
DirectX. They can be enabled by ``-fvk-use-dx-layout``.
1022+
1023+
NOTE: This requires ``VK_EXT_scalar_block_layout`` to be enabled on the
1024+
application side.
10151025
3. Strict OpenGL ``std140`` for uniform buffers and strict OpenGL ``std430``
10161026
for storage buffers: they allow packing data on the application side that
10171027
can be shared with OpenGL. They can be enabled by ``-fvk-use-gl-layout``.
10181028
4. Scalar layout rules introduced via `VK_EXT_scalar_block_layout`, which
10191029
basically aligns all aggregrate types according to their elements'
10201030
natural alignment. They can be enabled by ``-fvk-use-scalar-layout``.
1021-
1022-
To use scalar layout, the application side need to request
1023-
``VK_EXT_scalar_block_layout``. This is also true for using DirectX memory
1024-
layout since there is no dedicated DirectX layout extension for Vulkan
1025-
(at least for now). So we must request something more permissive.
1031+
1032+
NOTE: This requires ``VK_EXT_scalar_block_layout`` to be enabled on the
1033+
application side.
10261034

10271035
In the above, "vector-relaxed OpenGL ``std140``/``std430``" rules mean OpenGL
10281036
``std140``/``std430`` rules with the following modification for vector type
@@ -1032,7 +1040,7 @@ alignment:
10321040
2. If the above causes an `improper straddle <https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#interfaces-resources-layout>`_,
10331041
the alignment will be set to 16 bytes.
10341042

1035-
As an exmaple, for the following HLSL definition:
1043+
As an example, for the following HLSL definition:
10361044

10371045
.. code:: hlsl
10381046

external/SPIRV-Headers

Submodule SPIRV-Headers updated 87 files

external/SPIRV-Tools

Submodule SPIRV-Tools updated 100 files

include/dxc/DXIL/DxilConstants.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ const float kMaxMipLodBias = 15.99f;
154154
const float kMinMipLodBias = -16.0f;
155155

156156
const unsigned kResRetStatusIndex = 4;
157+
const unsigned kVecResRetStatusIndex = 1;
157158

158159
/* <py::lines('OLOAD_DIMS-TEXT')>hctdb_instrhelp.get_max_oload_dims()</py>*/
159160
// OLOAD_DIMS-TEXT:BEGIN

include/dxc/HLSL/DxilGenerationPass.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ModulePass *createResumePassesPass();
8181
FunctionPass *createMatrixBitcastLowerPass();
8282
ModulePass *createDxilCleanupAddrSpaceCastPass();
8383
ModulePass *createDxilRenameResourcesPass();
84-
ModulePass *createDxilScalarizeVectorLoadStoresPass();
84+
ModulePass *createDxilScalarizeVectorIntrinsicsPass();
8585

8686
void initializeDxilLowerCreateHandleForLibPass(llvm::PassRegistry &);
8787
void initializeDxilAllocateResourcesForLibPass(llvm::PassRegistry &);
@@ -116,7 +116,7 @@ void initializeResumePassesPass(llvm::PassRegistry &);
116116
void initializeMatrixBitcastLowerPassPass(llvm::PassRegistry &);
117117
void initializeDxilCleanupAddrSpaceCastPass(llvm::PassRegistry &);
118118
void initializeDxilRenameResourcesPass(llvm::PassRegistry &);
119-
void initializeDxilScalarizeVectorLoadStoresPass(llvm::PassRegistry &);
119+
void initializeDxilScalarizeVectorIntrinsicsPass(llvm::PassRegistry &);
120120

121121
ModulePass *createDxilValidateWaveSensitivityPass();
122122
void initializeDxilValidateWaveSensitivityPass(llvm::PassRegistry &);

include/dxc/HLSL/HLOperations.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,9 @@ const unsigned kHitObjectInvoke_PayloadOpIdx = 2;
462462
const unsigned kHitObjectFromRayQuery_WithAttrs_AttributeOpIdx = 4;
463463
const unsigned kHitObjectFromRayQuery_WithAttrs_NumOp = 5;
464464

465+
// HitObject::GetAttributes
466+
const unsigned kHitObjectGetAttributes_AttributeOpIdx = 2;
467+
465468
// Linear Algebra Operations
466469

467470
// MatVecMul

include/dxc/Support/HLSLOptions.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ def fspv_enable_maximal_reconvergence: Flag<["-"], "fspv-enable-maximal-reconver
403403
HelpText<"Enables the MaximallyReconvergesKHR execution mode for this module.">;
404404
def fspv_use_vulkan_memory_model: Flag<["-"], "fspv-use-vulkan-memory-model">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,
405405
HelpText<"Generates SPIR-V modules that use the Vulkan memory model instead of GLSL450.">;
406+
def fspv_use_unknown_image_format
407+
: Flag<["-"], "fspv-use-unknown-image-format">,
408+
Group<spirv_Group>,
409+
Flags<[CoreOption, DriverOption]>,
410+
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 from the resource's data type.">;
411+
406412
def fvk_auto_shift_bindings: Flag<["-"], "fvk-auto-shift-bindings">, Group<spirv_Group>, Flags<[CoreOption, DriverOption]>,
407413
HelpText<"Apply fvk-*-shift to resources without an explicit register assignment.">;
408414
def Wno_vk_ignored_features : Joined<["-"], "Wno-vk-ignored-features">, Group<spirv_Group>, Flags<[CoreOption, DriverOption, HelpHidden]>,

include/dxc/Support/SPIRVOptions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct SpirvCodeGenOptions {
7171
bool fixFuncCallArguments;
7272
bool enableMaximalReconvergence;
7373
bool useVulkanMemoryModel;
74+
bool useUnknownImageFormat;
7475
bool IEEEStrict;
7576
/// Maximum length in words for the OpString literal containing the shader
7677
/// source for DebugSource and DebugSourceContinued. If the source code length

0 commit comments

Comments
 (0)