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

71 Коммитов

Автор SHA1 Сообщение Дата
Lei Zhang de2736fe9a
[spirv] Enable loop unrolling in legalization (#1553) 2018-09-20 10:18:15 -04:00
Lei Zhang 1d850724c3
[spirv] Update external projects (#1546) 2018-09-18 15:47:41 -04:00
Lei Zhang 815c450f56
[spirv] Update SPIRV-Tools for bugfixes and workarounds (#1510) 2018-08-23 16:39:14 -04:00
Lei Zhang 4723ad416e
[spirv] Update SPIRV-Tools for fixes (#1507) 2018-08-21 14:11:02 -04:00
Lei Zhang 698dadd629
[spirv] Refresh dependencies & disable validation before optimization (#1504) 2018-08-20 16:48:54 -04:00
Lei Zhang b0366437d1
[spirv] Update SPIRV-Tools (#1482) 2018-08-02 14:44:00 -04:00
Ehsan 90103b38c2
[spirv] Expose -Oconfig for running custom optimizer recipes (#1466) 2018-07-31 13:49:19 -04:00
Lei Zhang 12c5b89389
[spirv] Fix constant type mismatch in SPIRV-Tools (#1427) 2018-07-16 15:15:41 -04:00
Lei Zhang 01aad25f44
[spirv] Pull in vector shuffle fixes in SPIRV-Tools (#1424) 2018-07-13 19:09:11 -04:00
Lei Zhang 56ffc8a239
[spirv] Fix Vulkan layout struct member alignment error (#1418)
For VK_HKR_relaxed_block_layout, a vector inside structs can have
its offset as a multiple of its base element type's alignment.
But the vector's alignment is unaffected, esp. when used for
calculating the alignment of the whole enclosing struct.

Also enables SPIRV-Tools validation on block layouts.
2018-07-12 11:50:16 -04:00
Lei Zhang a2dc672b9d
[spirv] Update SPIRV-Headers & SPIRV-Tools (#1404) 2018-07-05 15:28:32 -04:00
Lei Zhang f13e38579d
[spirv] Pull in optimization fix for un-merging struct types (#1395) 2018-06-29 17:10:23 -04:00
Lei Zhang f21c44400a
[spirv] Update SPIRV-Tools for not merging resource types (#1385)
Keeping the original struct type is important for some reflection
workflows.

The validation check for layout is alo included. But we disable
it for now and will re-enable it after fixing all the failures.

Fixes https://github.com/Microsoft/DirectXShaderCompiler/issues/1364
2018-06-27 20:54:38 -04:00
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