Inlining these hot functions decreases CPU time in perf tests for
DrawCallPerf.Run/Vulkan by roughly 12% (55 to 47ns) and increases
binary size by about 0.16% (~4kB).
Bug: dawn:304
Change-Id: I84e5d011defe88d6f1492dcb54e421c3d1bf099f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Note that storage buffer and readonly storage buffer may not be
supported in vertex shader on OpenGL backend. In OpenGL Spec 4.6,
the minimum value of MAX_VERTEX_SHADER_STORAGE_BLOCKS is 0.
BUG=dawn:180, dawn:284
Change-Id: Ib637a61e4eee0a0996c0da33f492e075fd94e1e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14380
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This change implements D3D12 backend for readonly storage buffer.
It uses SRV in root signature at API side and ByteAddressBuffer at
shader side (has already been done in spirv-cross) for readonly
storage buffer.
BUG=dawn:180, dawn:284
Change-Id: Iafcd24835a75349ce719e9735752de50210a846f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14300
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
The LogMessage::LogMessage constructor was redefining a symbol that
exists in re2 inside of Chromium. So we namespace Log inside dawn:: to
avoid the conflict.
BUG=dawn:302
Change-Id: Ida349208e2c6fe9ac032e1bd8cd442dff0b3f6bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14320
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:301
Change-Id: Ia7982cfe40abb28ab786c8941e269bded11468ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14282
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:291
Change-Id: I0c467d1d7b213872ec0bc1e3924ab89f7786aeba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14281
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This change implements Vulkan backend for readonly storage buffer. It
also adds a few end2end tests to verify the implementation.
BUG=dawn:180
Change-Id: I0d680654fa490192c357eccdcdce8e56a8037bce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14200
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Roll third_party/SPIRV-Tools/ 85f3e93d1..e82a42860 (13 commits)
85f3e93d13..e82a428605
$ git log 85f3e93d1..e82a42860 --date=short --no-merges --format='%ad %ae %s'
2019-12-03 dneto WebGPU: Array size at most max signed int + 1 (#3077)
2019-12-03 9856269+sarahM0 Permit the debug instructions in WebGPU SPIR-V - remove from the optimizer (#3083)
2019-12-03 dneto graphics robust access: use signed clamp (#3073)
2019-12-02 stevenperron Folding: perform add and sub on mismatched integer types (#3084)
2019-11-29 afdx spirv-fuzz: Fix invalid tests (#3079)
2019-11-27 alanbaker Validate nested constructs (#3068)
2019-11-27 afdx spirv-fuzz: Improve debugging facilities (#3074)
2019-11-27 stevenperron Handle unreachable block when computing register pressure (#3070)
2019-11-27 greg Improve RegisterSizePasses (#3059)
2019-11-26 headlessclayton utils/vscode: Add install.bat (#3071)
2019-11-26 52076061+digit-google build: cmake: Add support for Fuchsia. (#3062)
2019-11-26 dneto Add test with explicit example of stripping reflection info (#3064)
2019-11-26 9856269+sarahM0 Permit the debug instructions in WebGPU SPIR-V (#3063)
Roll third_party/glslang/ 38b4db48f..0de87ee9a (6 commits)
38b4db48f9..0de87ee9a5
$ git log 38b4db48f..0de87ee9a --date=short --no-merges --format='%ad %ae %s'
2019-12-04 rnk Remove glslang::pool_allocator::setAllocator
2019-01-21 ian.d.romanick INTEL_shader_integer_functions2: Add SPIR-V generation
2018-09-20 ian.d.romanick INTEL_shader_integer_functions2: Add compiler front-end support
2018-09-20 ian.d.romanick INTEL_shader_integer_functions2: Add basic extension tracking
2019-12-02 ian.d.romanick Update README.md to include other test requirements
2019-11-27 malcolm.bechard Fix#1981
Roll third_party/shaderc/ efedd6739..f9278b9cb (4 commits)
efedd67396..f9278b9cb6
$ git log efedd6739..f9278b9cb --date=short --no-merges --format='%ad %ae %s'
2019-12-05 rharrison Change from old status type in the API (#927)
2019-12-04 rharrison Remove unused variable from C++ API (#926)
2019-12-04 9856269+sarahM0 spvc: Add missing APIs for HLSL support in Dawn - set_decoration (#924)
2019-12-03 rharrison Convert spvc return codes to their own enum (#923)
Roll third_party/spirv-cross/ fd5aa3ad5..15b860eb1 (15 commits)
fd5aa3ad51..15b860eb1c
$ git log fd5aa3ad5..15b860eb1 --date=short --no-merges --format='%ad %ae %s'
2019-12-04 post Remove obsolete use of AtomicCounterMemoryMask.
2019-12-04 post Don't emit memoryBarrierShared() in workgroup control barriers.
2019-12-03 dsinclair Update graphics robust access results
2019-12-03 post Fix MSVC warnings when building without exceptions.
2019-12-03 dsinclair Share test shader script
2019-12-03 post Update update_test_shaders.sh as well.
2019-12-02 dsinclair Roll SPIRV-Tools, SPIRV-Headers and GLSLang
2019-12-02 post Fix uninitialized memory issue.
2019-12-02 post MSL: Support ClipDistance as an input stage variable.
2019-11-28 post Fix sign handling for S/UToF.
2019-11-28 post MSL: Fix automatic binding allocation for image atomic buffers.
2019-11-27 agaule Added --msl-decoration-binding command line argument to enable binding decoration for Metal.
2019-11-26 sarahmashay Add licensing header to test_shaders.py
2019-11-26 post Mark loop headers as complex as early as possible.
2019-11-25 bill.hollings Expose as public Compiler::update_active_builtins() and has_active_builtin().
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I48bf11c85a723473d6d91eb40d1fa42e9b025e1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The Vulkan spec mandates support for only one or the other, which is
why we have the concept of a depth24plus format. This also adds a Toggle
to test both formats in DepthStencilStateTests.
Finally this renames ForceWorkarounds to ForceToggles because toggles
can be more than just workarounds.
BUG=dawn:286
Change-Id: I5b5dc582ffd4ee61c51e3e75563aec815c580511
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14103
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: David Turner <digit@google.com>
Missing links and bad formatting was found while adding a Toggle for
choosing which format to use for Depth24PlusStencil8 in the Vulkan
backend.
BUG=dawn:286
Change-Id: I7d9c964ed90988ac63563707afb86a27005ff1b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14180
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
On Android iostream doesn't appear in logcat, the system log that's
often used for printf debugging. Introduce Chromium/ANGLE like logging
that looks like the following:
InfoLog() << stuff << stuff;
This makes sure the message is put in logcat on Android and removes
static initializers from <iostream>
BUG=dawn:286
Change-Id: Ie0d018f49bcac1a7b740739a6e59d45ae6728638
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14102
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: David Turner <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:290
Change-Id: I6dca2120278be998ef342a24ac027c1aa60d3a78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14221
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
BUG=dawn:273
Change-Id: I4660f0f984b6fb0103eafca9d674dcb4ed02cee4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14220
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This is the first step for having a fully operational SPVC usage
path. This version of SPVC integration uses SPVC for setting up the
options to the compiler, but a lot of the actual interaction with
spirv-cross is done in Dawn, just via SPVC's compiler object.
Future CLs will migrate more of the spirv-cross interaction to using
the SPVC API, eventually removing the need for Dawn to know about
spirv-cross.
BUG=dawn:288
Change-Id: I68e0773f910d7fe967235b6987b3debe1d13883f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14143
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:287
Change-Id: If39e1211cedefa5d02f1ea2f3ae00f6195e1e916
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14141
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The change adds multiple write then multiple read tests for gpu memory
synchronization test. It covers all common usages: write into storage
buffers, then read the data as vertices, indices, and uniforms.
The different usages are done via separate buffers, and one mixed buffer
via two tests.
I added two uniform buffers/usages in these two tests. I will replace one
uniform buffer by readonly storage buffer later. Then all readonly usages
will be covered. So it is also useful to verify the upcoming implementation
on backend for readonly storage buffer.
BUG=dawn:275
Change-Id: Ifbe086f55064e7b26cfc42ebc9c56edaf7e9d5a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13940
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This will be used in the future to choose between Dawn directly
accessing spirv-cross, and using spvc to mediate that interation.
This also adds in the spvc library as a dependency. This is what cause
the rollback last time, but that issue should be resolved.
BUG=dawn:281
Change-Id: Ic0b02d136ca05e2fa71844ebc85586b8866d5712
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14122
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Switch over to using the rule for building spirv-cross from spvc. This
allows GN to avoid double symbol issues in future patches.
Roll third_party/shaderc/ 1d6155d86..30f0559dd (2 commits)
1d6155d867..30f0559dd2
$ git log 1d6155d86..30f0559dd --date=short --no-merges --format='%ad %ae %s'
2019-11-27 rharrison Remove spvc's dependency on shaderc's util library (#914)
2019-11-27 rharrison Clean up how include dirs are propegated for spirv_cross (#912)
Created with:
roll-dep third_party/shaderc
BUG=dawn:281
Change-Id: I49cf237dcab884e84180f83cbbb21acfa549fe61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14121
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Contrary to Linux, libvulkan.so on Android doesn't have the additional
.1 at the end (libvulkan.so.1 on Linux)
BUG=dawn:286
Change-Id: I22f06121b81e0fe08faae7d105a7c2094e788184
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14104
Reviewed-by: David Turner <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The Vulkan specification requires that GRAPHICS and COMPUTE queue
support transfer operations, but it doesn't require them to expose the
TRANSFER flag. Make Dawn not require that flag so it can find a
universal queue on Adreno drivers.
BUG=dawn:286
Change-Id: Id4811e2077b27aa7db5ce554a4fd919c3cdcdb96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14101
Reviewed-by: David Turner <digit@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Roll third_party/shaderc/ 24536bdd3..1d6155d86 (1 commit)
24536bdd3c..1d6155d867
$ git log 24536bdd3..1d6155d86 --date=short --no-merges --format='%ad %ae %s'
2019-11-27 rharrison Moving spirv-cross dep from Dawn into shaderc (#911)
Created with:
roll-dep third_party/shaderc
BUG=dawn:285
Change-Id: I47d202166f9e34c88e7aad75d6a3c8aa9a7d6499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14120
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Also update shaderc override to be the correct directory
BUG=dawn:285
Change-Id: I021755bbc8f50daa65b6964f3e42d395b51bb94a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This adds swiftshader as a dependency of Dawn, and when it is present
dawn_use_swiftshader=true will force usage of it. (due to a Vulkan
loader limitation we can't have both regular drivers and swiftshader in
the same VkInstance).
BUG=dawn:283
Change-Id: Ib94f4dcca652eb380e994f007cdcfb145b1a5102
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13440
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Disabling this while refactoring how dependencies are set up to avoid
breaking various builds and rolls.
BUG=dawn:285
Change-Id: Iaca2614fb73277a1ea850f90a487693cd4c54fcb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14040
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Roll third_party/SPIRV-Tools/ 2ee9aaa28..85f3e93d1 (2 commits)
2ee9aaa288..85f3e93d13
$ git log 2ee9aaa28..85f3e93d1 --date=short --no-merges --format='%ad %ae %s'
2019-11-22 mattst88 Respect CMAKE_INSTALL_LIBDIR in installed CMake files (#3054)
2019-11-20 rharrison Add missing dealloc (#3061)
Roll third_party/glslang/ f4d466852..38b4db48f (6 commits)
f4d4668529..38b4db48f9
$ git log f4d466852..38b4db48f --date=short --no-merges --format='%ad %ae %s'
2019-11-23 cepheus Fix#1983: __ is okay starting with ES 300, rather than 310.
2019-11-22 cepheus Fix#1987: Use large enough built-in buffer to hold vec4 of maxint-64.
2019-11-21 dsinclair Check for ENABLE_SPVREMAPPER flag in CMakeList files.
2019-11-18 Arfrever Respect CMAKE_INSTALL_LIBDIR in installed CMake files
2019-11-14 andreas.floejt Add a test for 8- and 16-bit construction.
2019-11-11 andreas.floejt Fix construction issue for 8 and 16 bit types.
Roll third_party/shaderc/ c7f5cfd07..da52fae11 (6 commits)
c7f5cfd07f..da52fae116
$ git log c7f5cfd07..da52fae11 --date=short --no-merges --format='%ad %ae %s'
2019-11-21 rharrison Revert "Convert to using standard spirv_cross deps in BUILD.gn (#902)" (#905)
2019-11-21 9856269+sarahM0 Add spvc parser support for OpTypeForwardPointer, OpTypeAccelerationStructureNV (#903)
2019-11-21 rharrison Convert to using standard spirv_cross deps in BUILD.gn (#902)
2019-11-21 rharrison Convert spvc parser flag from build time to runtime (#901)
2019-11-21 9856269+sarahM0 Add spvc parser support for OpGroupDecorate, OpGroupMemberGecorate, OpDecorateStringGOOGLE, and OpMemberDecorateStringGOOGLE (#899)
2019-11-20 9856269+sarahM0 Add spvc parser support for OpUndef, OpString, OpMemberDecorate, OpDecorationGroup, OpLine, and OpNoLine (#898)
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
Change-Id: I89de33e4bcee1d73e8ee91fcbe8984939fa8fe3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14034
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This change adds GPU memory synchronization tests for buffer. The tests cover
data flow from render pass to compute pass via storage buffer, and vice versa.
It is the last one for the series of memory sync tests for buffer.
BUG=dawn:275
Change-Id: Ic866161cadc0fa9df4c441f3970783077f3a9bd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13921
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>