DirectXShaderCompiler/lib/Support
Nathan Gauër 6d62e57524
Fix Layer & ViewportIndex ext in 1.2+ (#4597)
* llvm: fix UB when building with sized-deletion ON

This issue can show up with compiling DXC with libasan.
It has been fixed upstream:
21c303e9ea

Signed-off-by: Nathan Gauër <brioche@google.com>

* [spirv] specify correct SPV env for disassembling

When DXC finishes generating SPIR-V, the binary is disassembled and
printed to stdout.
The target env was hardcoded to Vulkan1.1, meaning disassembly would
fail if we tried disassembling Vulkan1.2+ SPIR-V.

Fixes #4067

Signed-off-by: Nathan Gauër <brioche@google.com>

* [spirv] Fix Layer & ViewportIndex ext in 1.2+

Back in Vulkan1.1, ShaderViewportIndexLayer was required to use
SV_RenderTargetArrayIndex. This was promoted in VK1.2:

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_EXT_shader_viewport_index_layer.html

Sadly, DXC didn't checked the target SPV environment, and always
requested the extension. This commit addresses this.

Fixes #4067

Signed-off-by: Nathan Gauër <brioche@google.com>

Signed-off-by: Nathan Gauër <brioche@google.com>
2022-09-15 21:17:30 +02:00
..
Unix Fix build failure caused by clang version 11.1.0 in Linux (#4191) 2022-01-18 16:34:06 -05:00
Windows Enable ChangeStdin/outToBinary for llvm-dis on Windows. (#4509) 2022-06-13 21:13:54 -04:00
APFloat.cpp [linux-port] Evade unused in LLVM code (#1327) 2018-06-05 14:07:51 -04:00
APInt.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
APSInt.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ARMBuildAttrs.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ARMWinEH.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Allocator.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Atomic.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BlockFrequency.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
BranchProbability.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
CMakeLists.txt Get LLVM Unit Tests Passing (#4021) 2021-10-29 17:07:27 -05:00
COM.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
COPYRIGHT.regex first commit 2016-12-28 11:52:27 -08:00
CommandLine.cpp Fix command line parsing on empty string. (#3848) 2021-07-12 10:59:47 -07:00
Compression.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConvertUTF.c Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ConvertUTFWrapper.cpp [linux-port] Introduce Windows "adapter" headers (#1314) 2018-06-17 11:31:21 -04:00
CrashRecoveryContext.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DAGDeltaAlgorithm.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DataExtractor.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DataStream.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Debug.cpp Fix buffer overflow in debug printing. (#2248) 2019-06-07 11:58:36 -07:00
DeltaAlgorithm.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Dwarf.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
DynamicLibrary.cpp [linux-port] Fix mising cast from const void* to void* in macro (#1496) 2018-08-10 06:53:31 -04:00
Errno.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ErrorHandling.cpp convert recoverable exceptions to c++ (#3636) 2021-03-26 19:56:42 -07:00
FileOutputBuffer.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
FileUtilities.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
FoldingSet.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
FormattedStream.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
GraphWriter.cpp [linux-port] Evade unused in LLVM code (#1327) 2018-06-05 14:07:51 -04:00
Hashing.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Host.cpp Fix build for ARM64EC dxilconv.dll, because _xgetbv is currently not a supported intrinsic for ARM64EC. (#3211) 2020-10-20 14:21:36 -07:00
IntEqClasses.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
IntervalMap.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
IntrusiveRefCntPtr.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LEB128.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LLVMBuild.txt Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LineIterator.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Locale.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
LockFileManager.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MD5.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MSFileSystemBasic.cpp Clean up debug preprocessor macros (#4305) 2022-03-02 14:55:24 -06:00
ManagedStatic.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MathExtras.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Memory.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
MemoryBuffer.cpp Fix Layer & ViewportIndex ext in 1.2+ (#4597) 2022-09-15 21:17:30 +02:00
MemoryObject.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Mutex.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Options.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Path.cpp Get LLVM Unit Tests Passing (#4021) 2021-10-29 17:07:27 -05:00
PluginLoader.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
PrettyStackTrace.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Process.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Program.cpp [linux-port] Introduce Windows "adapter" headers (#1314) 2018-06-17 11:31:21 -04:00
README.txt.system first commit 2016-12-28 11:52:27 -08:00
RWMutex.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
RandomNumberGenerator.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
Regex.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ScaledNumber.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
SearchForAddressOfSpecialSymbol.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Signals.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
SmallPtrSet.cpp Remove malloc usages in favor of operator new (#2150) 2019-04-30 10:26:36 -07:00
SmallVector.cpp Remove malloc usages in favor of operator new (#2150) 2019-04-30 10:26:36 -07:00
SourceMgr.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
SpecialCaseList.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Statistic.cpp Add support for custom allocators (#390) 2017-07-06 16:45:48 -07:00
StreamingMemoryObject.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
StringExtras.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
StringMap.cpp Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
StringPool.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
StringRef.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
StringSaver.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
SystemUtils.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
TargetParser.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
TargetRegistry.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
ThreadLocal.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Threading.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
TimeValue.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Timer.cpp [linux-port] Remove unused from HLSL code (#1315) 2018-06-17 08:03:25 -04:00
ToolOutputFile.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Triple.cpp Fix triple normailization (#4009) 2021-10-14 22:59:25 -05:00
Twine.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Unicode.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Valgrind.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
Watchdog.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
YAMLParser.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
YAMLTraits.cpp [spirv] Bring back accidentally deleted include. 2019-02-08 13:46:44 -05:00
assert.cpp [linux-port] Enable some code. Disable some code. (#1372) 2018-06-25 20:15:54 -04:00
circular_raw_ostream.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
raw_os_ostream.cpp Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
raw_ostream.cpp Restore LLVM Testing Infrastructure (#4012) 2021-10-19 15:24:11 -05:00
regcclass.h build: fix include in header files. (#4652) 2022-09-15 16:00:29 +02:00
regcname.h build: fix include in header files. (#4652) 2022-09-15 16:00:29 +02:00
regcomp.c Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
regengine.inc Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
regerror.c [macos-port] Allow dxc and tests to run on mac (#1383) 2018-06-27 13:42:23 -04:00
regex2.h build: fix include in header files. (#4652) 2022-09-15 16:00:29 +02:00
regex_impl.h [macos-port] Allow dxc and tests to run on mac (#1383) 2018-06-27 13:42:23 -04:00
regexec.c Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
regfree.c Re-enable a swath of DXIL tests for *nix builds (#3888) 2022-01-20 13:53:47 -08:00
regmalloc.cpp Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00
regstrlcpy.c Revert license text in banner comments to original llvm verbage (#33) 2017-01-24 17:54:00 -08:00
regutils.h Convert more mallocs/frees to news/deletes (#2157) 2019-05-07 07:46:09 -07:00

README.txt.system

Design Of lib/System
====================

The software in this directory is designed to completely shield LLVM from any
and all operating system specific functionality. It is not intended to be a
complete operating system wrapper (such as ACE), but only to provide the
functionality necessary to support LLVM.

The software located here, of necessity, has very specific and stringent design
rules. Violation of these rules means that cracks in the shield could form and
the primary goal of the library is defeated. By consistently using this library,
LLVM becomes more easily ported to new platforms since the only thing requiring
porting is this library.

Complete documentation for the library can be found in the file:
  llvm/docs/SystemLibrary.html
or at this URL:
  http://llvm.org/docs/SystemLibrary.html

While we recommend that you read the more detailed documentation, for the
impatient, here's a high level summary of the library's requirements.

 1. No system header files are to be exposed through the interface.
 2. Std C++ and Std C header files are okay to be exposed through the interface.
 3. No exposed system-specific functions.
 4. No exposed system-specific data.
 5. Data in lib/System classes must use only simple C++ intrinsic types.
 6. Errors are handled by returning "true" and setting an optional std::string
 7. Library must not throw any exceptions, period.
 8. Interface functions must not have throw() specifications.
 9. No duplicate function impementations are permitted within an operating
    system class.

To accomplish these requirements, the library has numerous design criteria that
must be satisfied. Here's a high level summary of the library's design criteria:

 1. No unused functionality (only what LLVM needs)
 2. High-Level Interfaces
 3. Use Opaque Classes
 4. Common Implementations
 5. Multiple Implementations
 6. Minimize Memory Allocation
 7. No Virtual Methods