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

58 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang e142881084
[spirv] Update external dependencies (#1355) 2018-06-19 20:04:22 -04:00
Ehsan eb37d4ae2b
[spirv] Update SPIRV-Tools. (#1348) 2018-06-12 15:00:48 -04:00
Greg Roth f8fa9c92a0 [linux-port] disable covered-switch-default warning (#1332)
Defaults in switch statments can mask warnings that might
indicate that a new enum value was added and corresponding changes
to a switch statement that relies on that enum are missed. For this
reason, clang reports when switch statements that fully define case
statements for all possible enum values contain default: statements.

However, this is a warning of a potential problem that might arise
from future changes to the code rather than anything that might be
wrong now. Additionally, while unlikely that an enum switch might
be presented with a value that isn't valid for that enum, it isn't
impossible. So rather than respect this warning, we will silence it.
It's not included by default. LLVM wanted it. We don't, so it's
removed. This makes the earlier external cmake change unnecessary.
Ignores 34 clang warnings
2018-06-04 05:53:02 +08:00
Greg Roth 4aa0f706c8 [linux-port] Fix spirv test warnings (#1337)
clang-spirv-tests uses a lot of external projects that keep
themselves clean with different standards of warnings flags.
This alters the appropriate cmake files to disable flags that
the DXC build enables.
Fixes 72 gcc and 166 clang warnings.

Additionally catch some sign mismatch comparisons in tests
built as part of clang-spirv-tests.
Fixes 2 gcc and 2 clang warnings, but one of them has multiple sources
So it's kind of a lot more.
2018-06-02 04:16:29 -04:00
Ehsan fb581f6228
[spirv] Update SPIR-V Tools. (#1334) 2018-06-01 12:45:40 -04:00
Ehsan 37c35f2f6e
[linux-port] Update CMake files. prepare for Linux. (#1312)
This CL makes changes to CMake files in order to:
1- disable things that are not supported on non-Windows platforms.
2- make cross-platform compilation possible.

It also brings back LLVM's config.guess (mirrors:
https://github.com/llvm-mirror/llvm/blob/master/cmake/config.guess)
2018-05-29 15:19:37 -04:00
Lei Zhang 24dcc8c8bc
[spirv] Update external projects (#1303) 2018-05-23 15:23:17 -04:00
Lei Zhang d849dc2b86
[spirv] Support ViewportIndex & Layer in VS and DS (#1290)
Using SV_RenderTargetArrayIndex (translated into Layer builtin)
and SV_ViewportArrayIndex (translated into ViewportIndex builtin)
in VS and DS output requires the SPV_EXT_shader_viewport_index_layer
extension.
2018-05-16 15:01:46 -04:00
Lei Zhang f1a032e946
[spirv] Update external dependencies (#1286)
* ConstOffsets now requires ImageGatherExtended capability
* This reverts commit ea1bf8d24c.
2018-05-14 16:48:20 -04:00
Greg Roth e7973d1525 Match throws and use standard string exception (#1264)
Some compilers require function prototypes and bodies to match with
throw() attributes. This corrects them.

Additionally, it replaces thrown std::exceptions with a string
parameter with runtime_errors, which can take a string on any
system.

Finally, I moved GetPosition in FileIOHelper.cpp to its proper
place with the rest of the AbstractMemoryStream implementation
instead of grouping it with the IDxcBlob implementation

Nonfunctional change. Just inching toward cross platform compatibility
2018-05-08 15:06:07 -04:00
Lei Zhang 534609c016
[spirv] Refresh SPIRV-Tools (#1262) 2018-05-07 13:01:19 -04:00
Lei Zhang b999582c7b
[spirv] Update external projects (#1255) 2018-04-27 16:59:55 -04:00
Ehsan a532921034
[spirv] Update SPIR-V Tools. (#1252) 2018-04-26 16:04:32 -04:00
Ehsan ed3628ccd0
[spirv] Update SPIR-V Tools. (#1247) 2018-04-24 16:48:36 -04:00
Lei Zhang 72af488d75
[spirv] Update SPIRV-Tools for compilation speed improvements (#1240) 2018-04-18 18:39:36 -04:00
Lei Zhang c2993ddf37
[spirv] Stop emitting SPV_GOOGLE_decorate_string (#1229)
Its functionality is subsumed by SPV_GOOGLE_hlsl_functionality1.

See https://github.com/KhronosGroup/SPIRV-Registry/pull/4
2018-04-16 10:19:51 -04:00
Lei Zhang db417e9ad5
[spirv] Update external projects (#1205) 2018-04-09 10:10:49 -04:00
Lei Zhang 3a6c072fd1
[spirv] Refresh SPIRV-Tools (#1197)
* Canged to use max_digits10 for float precision
* Fixed bugs regarding OpImageTexelPointer

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1194
2018-04-05 12:41:26 -04:00
Ehsan 677eaa83cb
[spirv] Update SPIR-V Tools. (#1185) 2018-03-29 12:32:33 -04:00
Ehsan 4e5e56d0cd
[spirv] Update SPIR-V Tools and Fix Builtin usage. (#1183)
Support uint/uint2 for DispatchThreadID
Support uint/uint2 for GroupThreadID
Support uint/uint2 for GroupID

Also updated SPIR-V Tools.
2018-03-27 13:06:27 -04:00
Ehsan e2f2942a45
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#1163) 2018-03-21 13:54:56 -04:00
Lei Zhang 5a4987c664
[spirv] Update SPIRV-Headers & SPIRV-Tools (#1154)
* SPIRV-Tools now uses unified grammar tables.
* SPIRV-Tools merge return pass now can handle structured CFG.
2018-03-19 17:36:33 -04:00
Ehsan 3dea2cbcc4
[spirv] Update SPIRV-Tools and SPIRV-Headers. (#1143) 2018-03-15 14:00:41 -04:00
Lei Zhang cac1bd02a5
[spirv] Refresh external projects (#1139) 2018-03-13 17:17:03 -04:00
Lei Zhang 89bc301735
[spirv] Refresh external projects for SPIR-V 1.3 (#1117) 2018-03-07 14:07:48 -05:00
Lei Zhang 8bfb20d76d
[spirv] Update SPIRV-Tools (#1102) 2018-02-27 15:50:39 -05:00
Lei Zhang 5c4ca12efc
[spirv] Update doc and SPIRV-Tools (#1088)
Add explanation of legalization, optimization, validation in doc.
2018-02-21 14:12:01 -05:00
Lei Zhang 4221a698e1
[spirv] Support WaveGetLaneCount() and WaveGetLaneIndex() (#1077)
They are translated into SPIR-V builtin varibles. The translation
requires the SPV_KHR_shader_ballot extension.
2018-02-21 10:34:01 -05:00
Lei Zhang db62d63125
[spirv] Update SPIRV-Tools (#1084)
This is for both bugfixes and performace improvements.
2018-02-20 16:35:20 -05:00
Lei Zhang a19e61696e
[spirv] Update SPIRV-Tools to pull in fixes (#1076) 2018-02-15 13:20:05 -05:00
Lei Zhang ae8c5febf7
[spirv] Turn on legalization for invalid opcode (#1058)
Certain opcodes are not available in non-pixel stages.
Call the pass to replace them.
2018-02-06 15:32:53 -05:00
Lei Zhang 67770e37d4
[spirv] Use invalid instruction replacement legalization pass (#1051) 2018-02-02 12:20:34 -05:00
Lei Zhang 14c3c0d92c
[spirv] Add initial support for specialization constant (#1009)
This commit add support for generating OpSpecConstant* instructions
with SpecId decorations. Spec constants are only allowed to be of
scalar boolean/integer/float types. Using spec constant as the array
size does not work at the moment.
2018-01-22 15:36:14 -05:00
Jeff Noyle ad3e51b1dd
New pass for PIX "shader access tracking" (#998)
* py changes

* checkpoint

* wrong overloads for a couple ops

* Correct out-of-range checking

* test

* RTV

* Add shader access tracking and reportage of dynamically indexed registers

* Uniquify and encode proper register index!

* remove unncessary noise

* rename a var
2018-01-19 14:47:06 -08:00
Lei Zhang 8ba5715c81
[spirv] Use unified1 grammars and headers in SPIRV-Headers (#1007)
This requires us to regenerate the InstBuilder class and also
manually pin the SPIR-V version as 1.0 instead of relying on
spv::Version.

Also refreshed SPIRV-Tools
2018-01-18 15:14:05 -05:00
Lei Zhang 4b2cbf2167
[spirv] Legalization: associated counters in implicit objects (#1002)
An implicit object is translated into the first argument to the
method call. If the implicit object is of struct type and its
fields have associated counters, we need to assign its associated
counters accordingly like other normal arguments.

For each such method, we generate associated counters for its
implicit object. At a call site, we assign the associated counters
from the real object to the ones associated with the method implict
object.

Also refreshed SPIRV-Tools
2018-01-15 17:10:28 -05:00
Lei Zhang 6b2ad7fafb
[spirv] Fix array of non-matrix with -Zpr (#984)
Previously we will return defaultRowMajor as long as the type
is an array. That will hit an assertion failure in translateType()
for arrays of non-matrices.

Also refreshed SPIRV-Tools
2018-01-10 10:27:12 -05:00
Lei Zhang faf46e28be
[spirv] Fix bugs and re-enable CCP optimization pass (#977) 2018-01-08 17:37:31 -05:00
Lei Zhang 02bc6fae08
[spirv] Legalization: validate with relaxed logical pointer (#975)
We still want to make sure that the generated raw SPIR-V does not
have other validation errors except for allocating variables
containing pointers and returning pointers.
2018-01-08 14:08:48 -05:00
Lei Zhang 2387f691e2
[spirv] Pull in bug fixes and disable CCP in optimization (#971) 2018-01-05 20:21:13 -05:00
Lei Zhang 7ff9ae75e8
[spirv] Refresh dependencies and fix ldexp() translation (#962)
We cannot use GLSL extended instruction Ldexp for ldexp() since
they have different type requirements on the exponent parameter.
2018-01-04 14:34:36 -05:00
Lei Zhang 4bee20cac9
[spirv] Legalization: use CCP and enable on HS/DS/GS (#948) 2017-12-21 16:20:52 -05:00
Lei Zhang dfa66b6b9a
[spirv] Refresh SPIRV-Tools and update legalization pass recipe (#946) 2017-12-21 10:44:56 -05:00
Lei Zhang 674aa26115
[spirv] Refresh external dependency SPIRV-Tools (#910) 2017-12-12 13:34:32 -05:00
Lei Zhang ea1bf8d24c
[spirv] Silence GoogleTest std::tr1 deprecation warnings (#894) 2017-12-07 11:01:49 -05:00
Lei Zhang fb377afe5a
[spirv] Add missing capability for storage image read/write (#870)
Refreshed SPIRV-Tools and re-enabled all validations for texure/
buffer methods.

Also added support for -Cc to color the disassembly.
2017-12-01 17:28:56 -05:00
Lei Zhang 05057495e8
[spirv] Adopt new changes in SPIRV-Tools (#846)
Uses the legalization pass recipe from SPIRV-Tools.

Also change -fcgl to disable both legalization and optimization.

Validation on some tests are turned off because of new image
instruction checking in SPIRV-Tools. Enabling them is a TODO.
2017-11-23 22:30:49 -05:00
Lei Zhang ac8618ab07
[spirv] Update SPIRV-Tools and mark resource write legalization (#839) 2017-11-22 13:59:27 -05:00
Lei Zhang 3caadf5001
[spirv] Update external dependencies (#779) 2017-11-09 10:26:33 -05:00
Lei Zhang 4046ce318a [spirv] Update dependencies and use two new opt passes (#735) 2017-10-25 16:43:54 -04:00