Skip to content

Pull Upstream to devshFixes 2 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 90 commits into from
Apr 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
5304402
[SM6.9] Allow native vectors longer than 4
pow2clk Nov 21, 2024
e010223
Produce errors for long vectors in invalid contexts
pow2clk Dec 5, 2024
cd72abe
fix assert for tesselation patch template args
pow2clk Feb 18, 2025
4d5c2a2
Merge remote-tracking branch 'refs/remotes/origin/main' into longvec_…
pow2clk Mar 3, 2025
1f12a3f
Refactor builtin type detection with attributes
pow2clk Mar 3, 2025
de6ac33
Respond to feedback
pow2clk Feb 21, 2025
76dde0d
Reaname and consolidate longvecs tests
pow2clk Mar 3, 2025
765ab1c
Refactor, clarify, and expand testing
pow2clk Mar 3, 2025
fb6538e
clang-format
pow2clk Mar 3, 2025
19633b2
Handle subclasses and templates of longvector structs
pow2clk Feb 25, 2025
466bb14
chore: autopublish 2025-03-05T20:50:11Z
github-actions[bot] Mar 5, 2025
66bb772
Identify matrices and vectors by attributes
pow2clk Mar 6, 2025
20c2609
Use constant vector limit value for cached types
pow2clk Mar 4, 2025
1b3ad42
Use definitiondata bits to determine long vector presence
pow2clk Mar 3, 2025
d3fec83
Test for incomplete types in a number of builtin template-like objects
pow2clk Mar 6, 2025
f7f1e3d
[Metal] Add experimental Metal support (#6805)
llvm-beanz Mar 7, 2025
4d3a2f5
[NFC] Improve time tracing data (#7146)
llvm-beanz Mar 7, 2025
50d1af5
Respond to feedback
pow2clk Mar 10, 2025
eedab25
clang-format
pow2clk Mar 10, 2025
e9cf3d2
Respond to feedback from a different PR
pow2clk Mar 10, 2025
cc0ddc2
Rename long vector check func again
pow2clk Mar 10, 2025
66e7d23
Respond to feedback
pow2clk Mar 10, 2025
0102b3c
Use select indices instead of strings as parameters to longvec error
pow2clk Mar 10, 2025
88479cf
fix formatting induced build break
pow2clk Mar 10, 2025
7c8005a
[SM6.9] Allow native vectors longer than 4 (#7143)
pow2clk Mar 11, 2025
a2979e7
Resolve some default error warnings (#7191)
bob80905 Mar 11, 2025
3d69171
Shorten bool conversion, remove unneeded change (#7197)
bob80905 Mar 12, 2025
ec5324d
NFC: Update HLSL_INTRINSIC struct for Flags and MinShaderModel fields…
tex3d Mar 13, 2025
24dedfd
[OMM] Implement front end diagnostics for OMM, including on TraceRayI…
bob80905 Mar 14, 2025
ebc8c5c
[NFC][Doc] Update HLSL to SPIR-V document (#7204)
lumina37 Mar 17, 2025
909c552
Create new raw buffer load lowering function (#7144)
pow2clk Mar 17, 2025
9ba9689
[SPIR-V] Set RValue for the result of bitfield extract emulation (#7200)
LLJJDD Mar 18, 2025
503ef3c
Switch from tj-actions/changed-files to step-security/changed-files (…
llvm-beanz Mar 18, 2025
3ddf29b
Disallow swizzling on long vectors (#7215)
alsepkow Mar 18, 2025
6475f98
Actually fix the changed-files workflow (#7226)
llvm-beanz Mar 18, 2025
454bbf4
Fix typo in SPIR-V.rst (#7224)
s-perron Mar 19, 2025
6701eed
[SPIRV] Handle a cast to void (#7227)
s-perron Mar 19, 2025
0958e06
[SPIRV] Don't assume entry points are at the start of the worklist. (…
s-perron Mar 19, 2025
b2bcf21
Revert "[SPIRV] Use copy-in/copy-out for non-declaration (#7127)" (#7…
s-perron Mar 19, 2025
a0932fa
Add /bigobj compile option to MSVC build (#7228)
bob80905 Mar 19, 2025
eb02343
NFC: Make hlsl::IntrinsicOp enum values stable (#7231)
tex3d Mar 20, 2025
9e8a698
Lower RayQuery constructor to allocateRayQuery2 (#7205)
bob80905 Mar 20, 2025
8b3fae2
Use Wide String variants explicitly for Windows API calls (#7235)
bob80905 Mar 20, 2025
60e6c76
Add constraint to test that requires spirv support (#7241)
bob80905 Mar 21, 2025
b646ad3
[SPIRV] Update submodules and fix test (#7243)
s-perron Mar 21, 2025
94596e1
[SPIRV] Allow sampled type to be half for universal (#7252)
s-perron Mar 24, 2025
9a06f4d
Consolidate buffer store translation (#7251)
pow2clk Mar 24, 2025
c5f62d9
[SER] Patch 1: HitObject type lowering and SM 6.9 enablement (#7097)
simoll Mar 25, 2025
7269298
[SER] HitObject_MakeNop|Miss DXIL opcodes and verification tests (#7201)
simoll Mar 25, 2025
33bc44a
Update github actions versions to enable coverage (#7183)
pow2clk Mar 25, 2025
1eb83c7
Allow native vectors for LLVM operations (#7155)
pow2clk Mar 26, 2025
d8aad78
Add support for KHR_compute_shader_derivatives (#7249)
iagoCL Mar 26, 2025
31a2f58
[SPIR-V] Fix usage of indices in subfunctions (#7242)
Keenuts Mar 27, 2025
0fa207a
Update DXIL.rst (#7254)
alsepkow Mar 27, 2025
b7b532b
[SPIR-V] Update submodules (#7269)
cassiebeckley Mar 27, 2025
eb16959
Update print statements to be compatible with Python 3 (#7268)
raoanag Mar 27, 2025
5ff9cbc
[Sema] Add and test new Subobject Attribute (#7258)
bob80905 Mar 27, 2025
206b775
[OMM] Add D3D Flag RAYTRACING_PIPELINE_FLAG_ALLOW_OPACITY_MICROMAPS, …
bob80905 Mar 28, 2025
3035d31
Require CMake 3.17, remove CMP0051 (#7287)
llvm-beanz Apr 1, 2025
30bfd82
NFC: Infrastructure changes for DXIL op vector and multi-dim overload…
tex3d Apr 1, 2025
a13938d
PIX: Check for existing PIX UAV in roots sigs before adding it again …
jeffnn Apr 1, 2025
2f357a9
Fix assert due to unreachable discard (#7289)
amaiorano Apr 2, 2025
572aef5
Disable code owners in main (#7298)
llvm-beanz Apr 2, 2025
9eb7119
[SPIRV] Implements vk::BufferPointer proposal (#7163)
danbrown-amd Apr 2, 2025
2b1c2e6
Fix typo in exec tests comment (#7299)
alsepkow Apr 2, 2025
3b1a29b
[OMM] Add DXR Entry point test, non-library target test, conforming t…
bob80905 Apr 2, 2025
6556410
[SPIR-V] Implement QuadAny and QuadAll (#7266)
cassiebeckley Apr 3, 2025
9010244
Add UUID compiler extension check on Clang (#7286)
urshanselmann Apr 3, 2025
6a73640
Update DXC's CONTRIBUTING file (#7265)
llvm-beanz Apr 3, 2025
c9170e5
Update SPIRV-Tools (#7303)
s-perron Apr 3, 2025
85f3432
Fixes non-SPIR-V build, broken by PR #7163 ([SPIRV] Implements vk::Bu…
danbrown-amd Apr 3, 2025
e50f599
[NFC] Standardize DxilValidation variable capitalization (#7307)
pow2clk Apr 4, 2025
0ffd60a
[SM6.9] Native vector load/store lowering (#7292)
pow2clk Apr 4, 2025
9e91844
[NFC] containsLongVector -> ContainsLongVector (#7255)
llvm-beanz Apr 7, 2025
dc4a2b6
[PIX] Add a pass for PIX to log missing NonUniformResourceIndex usage…
nopandbrk Apr 7, 2025
c940161
Bump cryptography from 43.0.1 to 44.0.1 in /utils/git (#7220)
dependabot[bot] Apr 8, 2025
5d2fa92
[SM6.9] Enable trivial native vector Dxil Operations plus a few (#7324)
llvm-beanz Apr 9, 2025
90bfb66
[SER] 'reordercoherent' HLSL attribute and DXIL encoding (#7250)
simoll Apr 10, 2025
bc9044a
[SER] REORDER_SCOPE Barrier semantic flag (#7263)
simoll Apr 10, 2025
0168df1
[SER] HitObject_FromRayQuery[WithAttrs] DXIL opcodes and check-pass t…
simoll Apr 12, 2025
94f9275
[SER] HitObject accessors DXIL opcodes and check-pass tests (#7276)
simoll Apr 13, 2025
8280d0f
[SER] HitObject_Invoke|TraceRay DXIL opcodes and check-pass test (#7278)
simoll Apr 14, 2025
b5a9cd5
[SER] MaybeReorderThread DXIL opcode and validation (#7256)
simoll Apr 14, 2025
47e11af
[spirv] Handles rvalue as implicit object argument of vk::BufferPoint…
danbrown-amd Apr 14, 2025
30a7579
[spirv] Fixes vk::BufferPointer constructor expression construction. …
danbrown-amd Apr 15, 2025
ea3d846
[SER] Declare all SER HLSL intrinsics (#7347)
simoll Apr 15, 2025
5f18e2b
Add HctGen of DXIL.rst back to build without LLVM_BUILD_DOCS required…
tex3d Apr 15, 2025
10bff13
Fix field names in long vector DICompositeType (#7332)
simoll Apr 16, 2025
0a470b5
[SPIRV] Remove patch decoration from gl_TessCoord (#7187) (#7349)
SteveUrquhart Apr 16, 2025
0beaa76
[SER] MaybeReorderThread + Make(Nop|Miss) HLSL -> DXIL lowering and t…
simoll Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* @microsoft/hlsl-release
# Uncomment the next line in release branches after ask-mode begins
# * @microsoft/hlsl-release
15 changes: 11 additions & 4 deletions .github/workflows/clang-format-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@ jobs:
pull-requests: write
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.sha }}

- name: Checkout through merge base
uses: rmacklin/fetch-through-merge-base@bfe4d03a86f9afa52bc1a70e9814fc92a07f7b75 # v0.3.0
with:
base_ref: ${{ github.event.pull_request.base.ref }}
head_ref: ${{ github.event.pull_request.head.sha }}
deepen_length: 500

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
with:
separator: ","
fetch_depth: 100 # Fetches only the last 10 commits
skip_initial_fetch: true

- name: "Listed files"
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/coverage-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ jobs:
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Pages
uses: actions/configure-pages@v2
uses: actions/configure-pages@v5
- name: Install dependencies
run: sudo apt install -y ninja-build
- name: Configure
Expand All @@ -44,7 +44,7 @@ jobs:
- name: Force artifact permissions
run: chmod -c -R +rX ${{github.workspace}}/build/report
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: ${{github.workspace}}/build/report

Expand All @@ -60,4 +60,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v4
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()

if (POLICY CMP0051)
# CMake 3.1 and higher include generator expressions of the form
# $<TARGETLIB:obj> in the SOURCES property. These need to be
# stripped everywhere that access the SOURCES property, so we just
# defer to the OLD behavior of not including generator expressions
# in the output for now.
cmake_policy(SET CMP0051 OLD)
endif()

if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
Expand Down Expand Up @@ -686,6 +677,8 @@ add_subdirectory(include/dxc)
# really depend on anything else in the build it is safe.
list(APPEND LLVM_COMMON_DEPENDS HCTGen)

add_subdirectory(utils/hct)

if(EXISTS "${LLVM_MAIN_SRC_DIR}/external")
add_subdirectory(external) # SPIRV change
endif()
Expand Down Expand Up @@ -769,9 +762,7 @@ if (LLVM_INCLUDE_DOCS)
add_subdirectory(docs)
endif()

if (LLVM_BUILD_DOCS)
add_hlsl_hctgen(DxilDocs OUTPUT docs/DXIL.rst CODE_TAG) # HLSL Change
endif()
add_hlsl_hctgen(DxilDocs OUTPUT docs/DXIL.rst CODE_TAG) # HLSL Change

add_subdirectory(cmake/modules)

Expand Down
24 changes: 23 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,32 @@ Before submitting a feature or substantial code contribution please discuss it w

### Coding guidelines

The coding, style, and general engineering guidelines follow those described in the docs/CodingStandards.rst. For additional guidelines in code specific to HLSL, see the docs/HLSLChanges.rst file.
The coding, style, and general engineering guidelines follow those described in the [LLVM Coding Standards](docs/CodingStandards.rst). For additional guidelines in code specific to HLSL, see the [HLSL Changes](docs/HLSLChanges.rst) docs.

DXC has adopted a clang-format requirement for all incoming changes to C and C++ files. PRs to DXC should have the *changed code* clang formatted to the LLVM style, and leave the remaining portions of the file unchanged. This can be done using the `git-clang-format` tool or IDE driven workflows. A GitHub action will run on all PRs to validate that the change is properly formatted.

#### Applying LLVM Standards

All new code contributed to DXC should follow the LLVM coding standards.

Note that the LLVM Coding Standards have a golden rule:

> **If you are extending, enhancing, or bug fixing already implemented code, use the style that is already being used so that the source is uniform and easy to follow.**

The golden rule should continue to be applied to places where DXC is self-consistent. A good example is DXC's common use of `PascalCase` instead of `camelCase` for APIs in some parts of the HLSL implementation. In any place where DXC is not self-consistent new code should follow the LLVM Coding Standard.

A good secondary rule to follow is:

> **When in doubt, follow LLVM.**

Adopting LLVM's coding standards provides a consistent set of rules and guidelines to hold all contributions to. This allows patch authors to clearly understand the expectations placed on contributions, and allows reviewers to have a bar to measure contributions against. Aligning with LLVM by default ensures the path of least resistance for everyone.

Since many of the LLVM Coding Standards are not enforced automatically we rely on code reviews to provide feedback and ensure contributions align with the expected coding standards. Since we rely on reviewers for enforcement and humans make mistakes, please keep in mind:

> **Code review is a conversation.**

It is completely reasonable for a patch author to question feedback and provide additional context about why something was done the way it was. Reviewers often see narrow slices in diffs rather than the full context of a file or part of the compiler, so they may not always provide perfect feedback. This is especially true with the application of the "golden rule" since it depends on understanding a wider context.

### Documenting Pull Requests

Pull request descriptions should have the following format:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ Development kits containing only the dxc.exe driver app, the dxcompiler.dll, and

As an example of community contribution, this project can also target the [SPIR-V](https://www.khronos.org/registry/spir-v/) intermediate representation. Please see the [doc](docs/SPIR-V.rst) for how HLSL features are mapped to SPIR-V, and the [wiki](https://github.com/microsoft/DirectXShaderCompiler/wiki/SPIR%E2%80%90V-CodeGen) page for how to build, use, and contribute to the SPIR-V CodeGen.

### Metal CodeGen

When built from source DXC can utilize the [Metal Shader
Converter](https://developer.apple.com/metal/shader-converter/) if it is
available during build and configuration time. This allows DXC to generate Metal
shader libraries directly using the `-metal` flag.

Note: DXC cannot currently disassemble Metal shaders so the `-Fc` flag cannot be
used in conjunction with the `-Fo` flag.

## Building Sources

See the full documentation for [Building and testing DXC](docs/BuildingAndTestingDXC.rst) for detailed instructions.
Expand Down
9 changes: 9 additions & 0 deletions cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -568,3 +568,12 @@ else()
endif()

string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}")

# HLSL Change Begin - Metal IR Converter
find_package(MetalIRConverter)
if (METAL_IRCONVERTER_FOUND)
set(ENABLE_METAL_CODEGEN On)
message(STATUS "Enabling Metal Support")
add_definitions(-DENABLE_METAL_CODEGEN)
endif()
# HLSL Change End - Metal IR Converter
16 changes: 16 additions & 0 deletions cmake/modules/FindMetalIRConverter.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
find_path(METAL_IRCONVERTER_INCLUDE_DIR metal_irconverter.h
HINTS /usr/local/include/metal_irconverter
DOC "Path to metal IR converter headers"
)

find_library(METAL_IRCONVERTER_LIB NAMES metalirconverter
PATH_SUFFIXES lib
)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(METAL_IRCONVERTER
REQUIRED_VARS METAL_IRCONVERTER_LIB METAL_IRCONVERTER_INCLUDE_DIR)

message(STATUS "Metal IR Converter Include Dir: ${METAL_IRCONVERTER_INCLUDE_DIR}")
message(STATUS "Metal IR Converter Library: ${METAL_IRCONVERTER_LIB}")
mark_as_advanced(METAL_IRCONVERTER_LIB METAL_IRCONVERTER_INCLUDE_DIR)
Loading
Loading