Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Chris B 37ed613864
[NFC] Clang-format DXC sources (#5602)
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.
2023-09-19 07:49:22 -05:00
Chris B 3266a87f9a
[NFC] Remove SAL annotations from internal APIs (#5639)
We don't keep these annotations up to date or rely on them, so to
simplify our platform layering and ease code formatting this change
removes all the SAL annotations from internal APIs. This change also
replaces most `_Analysis_Assme_(...)` annotations with `assert(...)`.

One `_Analysis_Assume_` in ParseDecl.cpp needed to be updated because it
was incorrect. The code was `_Analysis_Assume_(assert(name.size() >
sizeof("space"));`. When converted to an `assert` it fired in our test
suite because the sizeof a string literal includes the null terminator,
but the size of a StringRef does not.

A few of the `_Analysis_Assume_` annotations were removed because they
didn't make sense (like the ones inside the `DXASSERT` implementation,
and a few others were removed to avoid introducing additional header or
linkage dependencies.

This change does not introduce any functional or behavioral changes.
2023-09-14 08:59:49 -05:00
Xiang Li cdee4461c9
[Build] cleanup build dependency (#5432)
Add LLVMHLSL dependency to LLVMIPO and LLVMScalarOpts. Remove
passprinters from LLVMHLSL to avoid cycle.

This is to fix link error found when trying to enable clang_cc1.
2023-07-19 01:06:31 -04:00
tangogu 5f8ab1677a
Fix the link issue in readme.md (#3149)
Caused by wrongly using backslash
2020-09-22 13:02:56 -07:00
Minmin Gong 7e0f44fa6f
Cleanup part of compiling warnings (#2903)
Try to fix some compiler warnings produced by clang when building the dxc compiler
2020-06-25 02:57:41 -06:00
Tex Riddell 713c80ce4e
Rename 'module' to 'hModule' for C++20 compat (#2667)
* Rename 'module' to 'hModule' for C++20 compat
* Replace a bunch of unintended uses of new keyword 'module' with 'mod'
2020-03-01 18:12:31 -08:00
Tex Riddell f4965b71dd Integrate dxcapi v2 and other changes from internal (#2575)
* Integrate changes from internal.

- dxcapi v2
- new dxc options
- DxilValueCache
- PDB and NoOpt improvements
- noop / llvm::donothing() support

* Update dxrfallbacklayer for dxcapi internal changes

* Reorder diag block based on whether pDiag is set first.

* llvm::donothing() requires dxil 1.6 / SM 6.6 for now, lib as well.

* Fixes for spir-v, non-VC compiler and non-Windows builds

- DEFINE_CROSS_PLATFORM_UUIDOF for new interfaces
- add SAL annotations
- turn output argument validation for -P into warning
- handle warnings without concatenating them to main output
- update spirv preprocessing and compilation paths
- return E_NOTIMPL from IDxcUtils::CreateReflection
- cleanup: DxcContainerBuilder back to uft8, DxcTestUtils: remove comment

* Fix some warnings from clang/gcc.

* Fix unicode conversion problems on linux, where sizeof(wchar_t) == 4

Note this is an intermediate fix.
On linux, what we are calling utf16 is actually a wide string
that's probably utf32.  This change fixes issues introduced by
the new interface changes so things are consistent and pass tests.

A future fix should correct the encodings so they are correctly labeled
on platforms where wchar_t doesn't mean UTF16.

* Return false for IsBufferNullTerminated when CP_ACP.

One test for Disassembler was crashing because it created a pinned blob
with a size of 1 << 31 + 1 without actual memory backing this.  The
IsBufferNullTerminated would attempt to see if this was null terminated,
causing AV.

This change also removes CP_UTF8 from this test when it was creating
binary blobs, not UTF8 text blobs.
2019-11-13 16:16:45 -08:00
Lei Zhang efb45575db
Resolve compiler warnings on Linux and macOS (#1628)
* Removed unused functions and fields
* Turned off switch enumeration value not handled warnings
* Fixed initialization issues
2018-10-25 11:08:12 -04:00
Xiang Li 4df08af7c0
Move DxilModule into DXIL directory. (#1599)
* Move DxilModule into DXIL directory.
2018-10-16 00:28:35 -07:00
Diego Novillo f683ab75ec Fix dependencies for DxrFallback. (#1582)
The dependency for this library had a typo, which failed
to add intrinsics_gen as a dependency, leading to spuirous
failures when building with high leveles of concurrency.
2018-10-04 17:34:47 -04:00
Lei Zhang 0c2d69720c Revert "Fix various Clang compiler warnings (#1558)"
This reverts commit 958ec32c06.
2018-09-21 14:18:28 -04:00
Lei Zhang 958ec32c06
Fix various Clang compiler warnings (#1558) 2018-09-21 13:00:48 -04:00
Helena Kotas 9849acc20c Fix build warnings 2018-08-16 23:04:55 -07:00
Christopher Wallis 74520bb662 Merged PR 98: Adding a DxrFallbackCompiler.dll containing IDxcDxrFallbackCompiler implementation + tests
This adds an isolated component *IDxcDxrFallbackCompiler*  that is used by the D3D12 Raytracing Fallback Compiler. The component is responsible for linking together DXR shaders into a state machine capable of emulating function invocations including recursion, patching HLSL intrinsics, export renaming, and emulating Shader Record support. This component is compiled to a DxrFallbackCompiler.dll that gets consumedd with D3D12 Raytracing Fallback Compiler apps.

For deeper implementation details, I will be fleshing out lib\DxrFallback\readme.md

Some leftover work still required:

1. Currently the Fallback Layer tests compile to an exe that must be manually run. This should be refactored to conform with existing DXIL unittests.
2018-06-29 23:43:40 +00:00