1. printf format mismatch.
2. avoid cast from CComPtr<IncludeHandlerVFSOverlayForTest> to
CComPtr<IDxcIncludeHandler>.
3. fix signed unsigned mismatch.
4. fix order of fields in constructor.
5. add override for override methods.
6. port
01f4209631
7. add copy assignment operator to avoid
-Wdeprecated-copy-with-user-provided-copy
8. disable -Wignored-qualifiers for taef header WexTestClass.h.
9. remove unused fields.
10. add -clang-cl for hctbuild.
Bumps cryptography from 41.0.3 to 41.0.4.
Sourced from cryptography's changelog:
41.0.4 - 2023-09-19
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.1.3.
fc11bce693
bump for 41.0.4
https://github.com/pyca/cryptography/pull/9629
See full diff in https://github.com/pyca/cryptography/compare/41.0.3...41.0.4
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Adds support for
- `RasterizerOrderedBuffer`
- `RasterizerOrderedByteAddressBuffer`
- `RasterizerOrderedStructuredBuffer`
- `RasterizerOrderedTexture1D`
- `RasterizerOrderedTexture1DArray`
- `RasterizerOrderedTexture2D`
- `RasterizerOrderedTexture2DArray`
- `RasterizerOrderedTexture3D`
Each of these types is treated and lowered as their corresponding `RW`
type, with the addition that loads and stores to values are wrapped with
`OpBeginInvocationInterlockEXT` and `OpEndInvocationInterlockEXT`. If
loads or stores to an ROV type are present, one of the
- `SampleInterlockOrderedEXT`
- `PixelInterlockOrderedEXT`
- `ShadingRateInterlockOrderedEXT`
execution modes are added to the entry function, based on semantics
inputted to the function.
Header changes to make Direct3D WSL build work:
- Move non-WIN32 IMalloc definition back to `WinAdapter.h` (it was there
until commit 44f8833938)
- Define DEFINE_ENUM_FLAG_OPERATORS only if it was not already defined
1. add noexcept for methods with __declspec(nothrow)
2. add override for override methods.
3. add const when cast const ptr for a const argument.
4. change 0 to 0u for immediate to avoid signed unsigned mismatch.
1. fix order of fields in constructor.
2. fix compare warning for type mismatch by cast to same type.
3. use {} instead of {0} when initialize to all zero.
4. add override for override methods.
This action and scripting was written by @tru for LLVM and addresses
some of the false positives we've been seeing in our action. There is
more room for improvement, but it would be better to unify than to have
divergent approaches since we're solving the same problem.
This change makes `DxilFinalizeModule` remove `dx.temp` metadata
regardless of target profile.
`DxilFinalizeModule` pass removes metadata that the validator disallows
in the final DXIL. These metadata are only removed for non-lib target,
however dx.temp is something that the validator does not allow even in
lib target. There is no reason to keep this metadata because it's only
used for inserting nops and that's not something we do when linking
libraries.
1. add override for override methods.
2. remove unnecessary std::move
3. remove unused lambda capture
4. use same enum when compare.
5. fix field order in constructor.
6. add const for when cast from a const variable.
1. remove unused variable.
2. use 1u instead 1 to avoid signed unsigned mismatch.
3. use std::size to replace _countof.
4. Use LPCWSTR/LPCSTR instead of LPWSTR/LPSTR.
1. Missing const when cast pointer. Add const.
2. Negtive shift casted to unsigned.
3. Missing override for override functions. Add override.
4. Remove unused variable/function.
5. Add constructor for TableParameter to workaround unintialized field.
6. RawBufferLdStTestData<int32_t> first field should not have {} when
initialize.
7. memset parameter order which also fixes in
https://github.com/microsoft/DirectXShaderCompiler/pull/4516 by
gongminmin
Address sanitizer can detect all sorts of memory usage related bugs.
Things like overflows, underflows, use-after-free, and (on Linux) leaks.
Due to the great work by @amaiorano, DXC is now asan-clean in our test
suite. Enabling this in our PR builds will allow us to stay that way.
I've chosen the Linux builds because the Linux runtime hooks capture
more errors than on other platforms. It only runs in the Release
configuration because asan can have significant runtime overhead so
running it in a release configuration will mitigate that substantially.
I've also changed the build to use libc++ instead of libstdc++ because
the libc++ headers have additional address sanitizer annotations to
catch misuses of C++ standard library containers.
Fix UBSAN error:
```
lib/DxilRootSignature/DxilRootSignatureSerializer.cpp:134:5: runtime error: store to misaligned address 0x7fff812daf5f for type 'unsigned int', which requires 4 byte alignment
```
Use memcpy to write to unaligned address.
Fixes 63 of these reported from running check-all.
Fixes UBSAN error:
```
include/llvm/ADT/iterator.h:171:7: runtime error: applying non-zero offset 8 to null pointer
```
When ULE has no decls, `decls_begin` returns a null-ptr iterator, and
adding 1 to this pointer is undefined behaviour. We fix this by adding a
check that ULE actually has decls before doing this.
Fixes 332 of these reported from running check-all.
HLSL 2021 can't resolve calls to global operator overloads and was never
intended to support them, but it didn't error on them being declared.
This change emits a diagnostic when declaring any operator outside class
or struct scope so that users won't instead be greeted by less intuitive
errors from overload resolution.
Fixes#5792
I meant to send this a couple weeks ago. I'll be sending in a PR soon
that implements this so up to you if you think it makes sense to merge
this first.
QueryInterface would accept any interface IID, instead of only the ones
it recognizes. Fixed by adding PublicAPI::Invalid, returned from
IIDToAPI when not one of the recognized APIs, and only accepting
IUnknown or the original interface IID provided at create time.
CreateDxil{Shader|Library}Reflection would also completely ignore IID.
Fixed by only accepting supported IIDs.
Get*ParameterDesc for signature elements also incorrectly computed
structure size (due to alignment) to memcpy for D3D11_43 version. Fixed
by copying only up to the end of the last field in the old structure
version.
CreateReflectionObjectsForSignature had a special case avoiding filling
in the MinPrecision member for D3D11_43, though this is unnecessary,
since for that API version, the struct will be truncated to exclude the
MinPrecision member when copying out the desc. Removed unnecessary
special case.
Added DxilContainerTest::CheckReflectionQueryInterface test for Create
and QI scenarios for supported and unsupported IIDs. This also tests
that the Get*ParameterDesc methods don't write beyond the structure size
for the interface version.
Fixes#3887
The code to structurize loop exits assumed exiting blocks always use
BranchInst and never SwitchInst. This caused a crash. This change makes
the structurizer preemptively check whether this assumption is true
before attempting.
From a customer bug report, the previous code would skip over a
DISubProgram scope if that scope was contained in a DINamespace (as in
the first test case herein, wherein an include file is enclosed in a
namespace). This would result in DXIL being attributed to the includer
file instead of the included file.
1. signed unisgned compare warning.
Fixed by change 1 into 1u. Or cast directly.
2. writeable string.
Use const char/wchar_t * instead of char/wchar_t*.
3. lost const when cast.
Add const.
Based on GitHubs docs, I think `GITHUB_SHA` will be the last commit from
the target ref that is included in the PR's base ref. That should be the
right compare point rather than `GITHUB_REF`, which would be the target
branch's head ref.
https://docs.github.com/en/actions/using-workflows/events-that-trigger-w
orkflows#pull_request_target
When building with apple-clang on MacOS, we get a linker error:
ld64.lld: error: undefined symbol: llvm_assert
Because the llvm_assert implementation is missing the last parameter.
There were a few bugs that were difficult to reproduce. The pull request
branch ref needs to be fetched and checked out manually in order to get
the PR diff to construct. This change also fixes formatting to get a
nice diff printed of the PR output.
See an example of the error output this produces here:
https://github.com/llvm-beanz/DirectXShaderCompiler/pull/2
This change _should_ fix the permissions issues and allow the PR format
checker to post comments into PRs on failure. The comments should
include the first 50 lines of the diff that clang-format produces and an
error with a link to the full log.
Unfortunately this can't really be tested until it is merged. The
`pull_request_target` event only occurs once the action is in the target
branch.
Parts of this change have been tested separately, but they haven't all
been tested together.
Add `-opt-disable sink` to HelperLaneTest shader compilation to prevent
sinking of `ddx_fine`/`ddy_fine` intrinsics into flow control.
Separate issue has been filed to track down the root of the problem:
#5744: Intrinsics ddx_fine/ddy_fine should not be allowed to sink into
flow control
When cross-compiling from Linux/MacOS targeting Windows, the #include of
"Intrin.h" ends up including the one from the Windows SDK because the
host OS is case-sensitive, rather than "intrin.h" from the host standard
library. Fix this by renaming the include with the correct
case-sensitive name.
This relands #5746.
The initial addition of this action failed due to a permissions issue.
The addition of the permissions entry in the workflow should resolve
that issue.
This reverts commit d949f78f69.
Clang-format determines if a header is the "main" header by looking at
the header name without the last extension and matching it against the
source file (with some extra handling for cuda files).
The automation generating temporary files with a `.tmp` suffix tripped
this up so it wasn't matching the "main" header when sorting includes.
This corrects the issue by writing temporaries to a tmp directory
instead of munging the suffix.
CMAKE_GENERATOR_PLATFORM is not widely available. For example, Ninja
generator doesn't define it. Use CMAKE_C_COMPILER_ARCHITECTURE_ID to
avoid this problem.
ErrorOr has a implicit constructor. A move is required for construct an
ErrorOr object. Then it's returned by the function. Write the
construction explicit to fix the compilation on clang, and reduce the
confusion.
This change applies clang-format to all of the sources added in DXC that
were not part of the original LLVM/Clang 3.7 release when DXC forked.
This provides consistent code formatting across the codebase.
Fixes#5591.
This integrates formatting generated sources with clang-format with the
hctgen generation process.
This change makes a few small adjustments to how the build-time header
generation works. This change, disables automated build-time generation
for C++ sources if you don't have clang-format available on your system.
CMake can automatically detect clang-format installed as part of Visual
Studio, or based on your PATH. You can also explicitly set
`CLANG_FORMAT_EXE` when configuring to manually override. **Developers
on macOS** will need to install clang-format manually and place it on
their path to generate DXC's generated sources.
If clang-format cannot be found and `HLSL_COPY_GENERATED_SOURCES` is On
a fatal error will be reported at configuration time.
This change _does not_ make clang-format a requirement to build DXC, but
it does make it a requirement if you are modifying the generated
sources.
This action runs clang-format-diff on the difference between the head
and the merge base to identify introductions of clang-format violtions
in changed code.
The way taef tests were gathered and executed previously flattened the
list of arguments to a string. This allowed the weird /select: flag to
work correctly, but if any of the arguments had spaces, they were
misinterpretted having lost the implicit quotes around each.
By removing the flattening, putting a space between the flag and the
argument for /select: and removing the explicit quotes around that
argument, the command executes properly whether there are spaces or not
Additionally added a way to detect when these commands failed since they
were silently failing and skipping a large swath of testing when spaces
were present.
Fixes#5719