Skip to content

Commit e695785

Browse files
authored
Update 1.10.2605 preview release to main (#8457)
Updates the release branch for 1.10.2605 preview to `main`. Part of the release activities for #8455
2 parents ea53cb5 + 8539e1d commit e695785

73 files changed

Lines changed: 1913 additions & 770 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.

AIToolPolicy.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# AI Tool Use Policy
2+
3+
This policy aims to be compatible with the [LLVM AI Tool Use
4+
Policy](https://llvm.org/docs/AIToolPolicy.html) so that people contributing to
5+
both projects have a similar policy to work with.
6+
7+
Contributors to DirectXShaderCompiler can use whatever tools they would like to
8+
craft their contributions, but there must be a **human in the loop. Contributors
9+
must read and review all LLM-generated code or text before they ask other
10+
project members to review it.** The contributor is always the author and is
11+
fully accountable for their contributions. Contributors should be sufficiently
12+
confident that the contribution is high enough quality that asking for a review
13+
is a good use of scarce maintainer time, and they should be **able to answer
14+
questions about their work during review.**
15+
16+
We expect that new contributors will be less confident in their contributions,
17+
and our guidance to them is to **start with small contributions** that they can
18+
fully understand to build confidence. We aspire to be a welcoming community that
19+
helps new contributors grow their expertise, but learning involves taking small
20+
steps, getting feedback, and iterating. Passing maintainer feedback to an LLM
21+
doesn't help anyone grow and does not sustain our community.
22+
23+
Contributors are expected to **be transparent and label contributions that
24+
contain substantial amounts of tool-generated content.** Our policy on labelling
25+
is intended to facilitate reviews, and not track which parts of the project are
26+
generated. Contributors should note tool usage in their pull request
27+
description, commit message, or wherever authorship is normally indicated for
28+
the work. For instance, use a commit message trailer like Assisted-by: Copilot.
29+
This transparency helps the community develop best practices and understand the
30+
role of these new tools.
31+
32+
## Copilot Code Reviews
33+
34+
Copilot code reviews are allowed. It's TBD whether we will enable these by
35+
default for all PRs - but feel free to request a review from Copilot.
36+
37+
## Cloud Agents
38+
39+
The cloud-based version of GitHub Copilot is a great way to have multiple agents
40+
work simultaneously and autonomously on issues. However, we require that these
41+
run in a fork of the repo rather than in the main repo itself. Then, once the
42+
change has been crafted such that it is ready for others to review, a PR can be
43+
opened to merge it into upstream. Rationale:
44+
45+
* Everyone should be working in a fork rather than creating branches in the main
46+
repo, agents are no different.
47+
* We shouldn't be spamming people watching the main repo with the agent's work.
48+
* As you're responsible for the work Copilot is doing, the PR into upstream
49+
should come from you, not from Copilot.
50+
51+
Note that cloud agents are only able to build and test on Linux, and this
52+
affects the sort of work an agent can do.
53+
54+
## Local Agents
55+
56+
CLI, or editor-hosted agents, run on your own machine, so there is less concern
57+
about the activity of these agents impacting others.

azure-pipelines.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,21 @@ stages:
2727
matrix:
2828
VS2022_Release:
2929
configuration: Release
30+
spirvBuildFlag: -spirvtest
3031
VS2022_Debug:
3132
configuration: Debug
33+
spirvBuildFlag: -spirvtest
34+
VS2022_Release_NoSPIRV:
35+
configuration: Release
36+
spirvBuildFlag: ''
3237

3338
steps:
3439
- checkout: self
3540
clean: true
3641
submodules: true
3742
- script: |
3843
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%
39-
call utils\hct\hctbuild.cmd -vs2022 -$(platform) -$(configuration) -show-cmake-log -spirvtest -warp-nuget-version 1.0.16.1
44+
call utils\hct\hctbuild.cmd -vs2022 -$(platform) -$(configuration) -show-cmake-log $(spirvBuildFlag) -warp-nuget-version 1.0.16.1
4045
displayName: 'Building'
4146
- script: |
4247
call utils\hct\hctstart.cmd %HLSL_SRC_DIR% %HLSL_BLD_DIR%

docs/DXIL.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,8 +3096,8 @@ ID Name Description
30963096
2147483676 LinAlgMatrixAccumulateToMemory accumulates a matrix to groupshared memory
30973097
2147483677 LinAlgMatrixOuterProduct Outer products an M sized vector and a N sized vector producing an MxN matrix
30983098
2147483678 LinAlgConvert Convert vector components from one interpretation to another
3099-
2147483679 ReservedE0 reserved
3100-
2147483680 ReservedE1 reserved
3099+
2147483679 LinAlgVectorAccumulateToDescriptor Accumulates given vector to the buffer at the given offset
3100+
2147483680 ReservedE0 reserved
31013101
2147483681 DebugBreak triggers a breakpoint if a debugger is attached
31023102
2147483682 IsDebuggerPresent returns true if a debugger is attached
31033103
========== ======================================== ===================================================================================================================

docs/ReleaseNotes.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ The included licenses apply to the following files:
1717

1818
## Changelog
1919

20+
### Version 1.10.2605.1 (preview)
21+
22+
#### Experimental Shader Model 6.10
23+
- Added VectorAccumlate operaton to LinAlg Matrix API [#8448](https://github.com/microsoft/DirectXShaderCompiler/pull/8448)
24+
25+
#### Experimental Shader Model 6.10 Bug Fixes
26+
- Fixed validator rejecting LinAlgMatrix type in DXIL [#8441](https://github.com/microsoft/DirectXShaderCompiler/pull/8441)
27+
- Fixed float trunc and coord calc errors in ExecTests [#8420](https://github.com/microsoft/DirectXShaderCompiler/pull/8420)
28+
- Convert Bias Vector to match the output type [#8394](https://github.com/microsoft/DirectXShaderCompiler/pull/8394)
29+
30+
#### Bug Fixes
31+
- Fixed build break on certain platforms [#8307](https://github.com/microsoft/DirectXShaderCompiler/pull/8307)
32+
- SPIR-V: Fix compiler error for certain pointer casts [#7891](https://github.com/microsoft/DirectXShaderCompiler/issues/7891)
33+
- Raise a compliation error when invalid `volatile` keyword is used [8397](https://github.com/microsoft/DirectXShaderCompiler/pull/8397)
34+
- Fixed codegen that emitted illigal-width integerse [#8444](https://github.com/microsoft/DirectXShaderCompiler/pull/8444)
35+
- Fixed crash when using `-fcgl` when container has a resource arg function [#8442](https://github.com/microsoft/DirectXShaderCompiler/pull/8442)
36+
2037
### Version 1.10.2605 (preview)
2138

2239
#### Experimental Shader Model 6.10
@@ -75,10 +92,13 @@ The included licenses apply to the following files:
7592
default, with `/Fi` to override the output filename. The old FXC-style `/P
7693
<filename>` positional syntax has been renamed to `/Po`.
7794
[#4611](https://github.com/microsoft/DirectXShaderCompiler/issues/4611).
95+
- SPIR-V: Support `vk::SampledTexture` types (GLSL's `samplerND` equivalent)
96+
[#7979](https://github.com/microsoft/DirectXShaderCompiler/issues/7979). With
97+
this type, users no longer need to define both Sampler and Texture resources
98+
with the same binding number.
7899
- Added support for -Fre for Metal
79100
[#8159](https://github.com/microsoft/DirectXShaderCompiler/pull/8159)
80101

81-
82102
### Version 1.9.2602
83103

84104
#### Shader Model 6.9 Release

external/SPIRV-Tools

Submodule SPIRV-Tools updated 57 files

include/dxc/DXIL/DxilConstants.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,7 @@ static const OpCodeTableID TableID = OpCodeTableID::ExperimentalOps;
533533
// Enumeration for ExperimentalOps DXIL operations
534534
enum class OpCode : unsigned {
535535
//
536-
ReservedE0 = 31, // reserved
537-
ReservedE1 = 32, // reserved
536+
ReservedE0 = 32, // reserved
538537

539538
// Debugging
540539
DebugBreak = 33, // triggers a breakpoint if a debugger is attached
@@ -597,6 +596,8 @@ enum class OpCode : unsigned {
597596
LinAlgMatrixStoreToDescriptor =
598597
20, // stores a matrix to a RWByteAddressBuffer
599598
LinAlgMatrixStoreToMemory = 21, // stores a matrix to groupshared memory
599+
LinAlgVectorAccumulateToDescriptor =
600+
31, // Accumulates given vector to the buffer at the given offset
600601

601602
// No-op
602603
ExperimentalNop = 0, // nop does nothing
@@ -1355,10 +1356,13 @@ enum class OpCode : unsigned {
13551356
// LinAlgConvert = 0x8000001E, 2147483678U, -2147483618
13561357
EXP_OPCODE(ExperimentalOps, LinAlgConvert), // Convert vector components from
13571358
// one interpretation to another
1358-
// ReservedE0 = 0x8000001F, 2147483679U, -2147483617
1359+
// LinAlgVectorAccumulateToDescriptor = 0x8000001F, 2147483679U, -2147483617
1360+
EXP_OPCODE(
1361+
ExperimentalOps,
1362+
LinAlgVectorAccumulateToDescriptor), // Accumulates given vector to the
1363+
// buffer at the given offset
1364+
// ReservedE0 = 0x80000020, 2147483680U, -2147483616
13591365
EXP_OPCODE(ExperimentalOps, ReservedE0), // reserved
1360-
// ReservedE1 = 0x80000020, 2147483680U, -2147483616
1361-
EXP_OPCODE(ExperimentalOps, ReservedE1), // reserved
13621366
// DebugBreak = 0x80000021, 2147483681U, -2147483615
13631367
EXP_OPCODE(ExperimentalOps,
13641368
DebugBreak), // triggers a breakpoint if a debugger is attached
@@ -1544,6 +1548,7 @@ enum class OpCodeClass : unsigned {
15441548
LinAlgMatrixSetElement,
15451549
LinAlgMatrixStoreToDescriptor,
15461550
LinAlgMatrixStoreToMemory,
1551+
LinAlgVectorAccumulateToDescriptor,
15471552

15481553
// Mesh shader instructions
15491554
EmitIndices,
@@ -1730,7 +1735,7 @@ enum class OpCodeClass : unsigned {
17301735
NodeOutputIsValid,
17311736
OutputComplete,
17321737

1733-
NumOpClasses = 222, // exclusive last value of enumeration
1738+
NumOpClasses = 223, // exclusive last value of enumeration
17341739
};
17351740
// OPCODECLASS-ENUM:END
17361741

include/dxc/DXIL/DxilInstructions.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10960,6 +10960,43 @@ struct DxilInst_LinAlgConvert {
1096010960
void set_outputInterpretation(llvm::Value *val) { Instr->setOperand(3, val); }
1096110961
};
1096210962

10963+
/// This instruction Accumulates given vector to the buffer at the given offset
10964+
struct DxilInst_LinAlgVectorAccumulateToDescriptor {
10965+
llvm::Instruction *Instr;
10966+
// Construction and identification
10967+
DxilInst_LinAlgVectorAccumulateToDescriptor(llvm::Instruction *pInstr)
10968+
: Instr(pInstr) {}
10969+
operator bool() const {
10970+
return hlsl::OP::IsDxilOpFuncCallInst(
10971+
Instr, hlsl::OP::OpCode::LinAlgVectorAccumulateToDescriptor);
10972+
}
10973+
// Validation support
10974+
bool isAllowed() const { return true; }
10975+
bool isArgumentListValid() const {
10976+
if (5 != llvm::dyn_cast<llvm::CallInst>(Instr)->getNumArgOperands())
10977+
return false;
10978+
return true;
10979+
}
10980+
// Metadata
10981+
bool requiresUniformInputs() const { return false; }
10982+
// Operand indexes
10983+
enum OperandIdx {
10984+
arg_vector = 1,
10985+
arg_handle = 2,
10986+
arg_offset = 3,
10987+
arg_align = 4,
10988+
};
10989+
// Accessors
10990+
llvm::Value *get_vector() const { return Instr->getOperand(1); }
10991+
void set_vector(llvm::Value *val) { Instr->setOperand(1, val); }
10992+
llvm::Value *get_handle() const { return Instr->getOperand(2); }
10993+
void set_handle(llvm::Value *val) { Instr->setOperand(2, val); }
10994+
llvm::Value *get_offset() const { return Instr->getOperand(3); }
10995+
void set_offset(llvm::Value *val) { Instr->setOperand(3, val); }
10996+
llvm::Value *get_align() const { return Instr->getOperand(4); }
10997+
void set_align(llvm::Value *val) { Instr->setOperand(4, val); }
10998+
};
10999+
1096311000
/// This instruction triggers a breakpoint if a debugger is attached
1096411001
struct DxilInst_DebugBreak {
1096511002
llvm::Instruction *Instr;

include/dxc/DXIL/DxilResourceProperties.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
namespace llvm {
1717
class Constant;
1818
class Type;
19+
class Module;
1920
} // namespace llvm
2021

2122
namespace hlsl {
@@ -89,6 +90,7 @@ struct DxilInst_AnnotateHandle;
8990
namespace resource_helper {
9091
llvm::Constant *getAsConstant(const DxilResourceProperties &, llvm::Type *Ty,
9192
const ShaderModel &);
93+
llvm::Type *GetResourcePropertiesType(llvm::Module &M);
9294
DxilResourceProperties loadPropsFromConstant(const llvm::Constant &C);
9395
DxilResourceProperties
9496
loadPropsFromAnnotateHandle(DxilInst_AnnotateHandle &annotateHandle,

include/dxc/HlslIntrinsicOp.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ enum class IntrinsicOp {
132132
IOP___builtin_LinAlg_MatrixStoreToMemory = 410,
133133
IOP___builtin_LinAlg_MatrixVectorMultiply = 418,
134134
IOP___builtin_LinAlg_MatrixVectorMultiplyAdd = 419,
135+
IOP___builtin_LinAlg_VectorAccumulateToDescriptor = 423,
135136
IOP_abort = 102,
136137
IOP_abs = 103,
137138
IOP_acos = 104,
@@ -429,7 +430,7 @@ enum class IntrinsicOp {
429430
IOP_usign = 355,
430431
MOP_InterlockedUMax = 356,
431432
MOP_InterlockedUMin = 357,
432-
Num_Intrinsics = 423,
433+
Num_Intrinsics = 424,
433434
};
434435
inline bool HasUnsignedIntrinsicOpcode(IntrinsicOp opcode) {
435436
switch (opcode) {

0 commit comments

Comments
 (0)