Commit Graph

1861 Commits

Author SHA1 Message Date
Jinho Bang 0b82671047 Rename PipelineStageDescriptor to ProgrammableStageDescriptor
This is to match the WebGPU's WebIDL[1].

[1] https://github.com/gpuweb/gpuweb/pull/359

Bug: dawn:22
Change-Id: Id0cf0a7a6605ea7ec474d0f0885685ed21875dce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-07 12:23:09 +00:00
Corentin Wallez 90a5595bbe dawn_wsi: Pass the Metal queue to the SwapChainImpl
If the swapchain creates its own queue, there can be races to determine
whether the submit of the present happens first. The didn't show up
in our samples but was an issue in real apps. Passing the queue to the
swapchain makes it simple to keep operations well ordered.

BUG=dawn:225

Change-Id: I9cc8e6e8140ad4a816373cffc9bda74ee826a41b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11640
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-10-07 08:18:09 +00:00
Ryan Harrison cc47878116 Adding missing reflection API sources to SPIRV-Cross targets
BUG=dawn:231

Change-Id: Id037b8c6179ff1582b05a4923447ab292a0e1258
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11820
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2019-10-04 15:55:42 +00:00
Bryan Bernhart 21dfc91954 Resource Management 7: Device memory sub-allocation using buddy allocator.
Uses a large buddy system to allocate binary sized heaps on-demand.

BUG=dawn:27

Change-Id: I72e425c23e601da6ee53827423bef7ff13be049c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10880
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2019-10-03 18:17:31 +00:00
François Beaufort 277d2e15d5 Add missing optional label member to descriptors
This CL adds missing optional label members to all descriptors. It is
not used yet but needed from the WebGPU side.

Bug: dawn:22
Change-Id: I103870f9207eed8168bc2245294888af4e1edd9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11720
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-10-03 14:56:49 +00:00
Austin Eng 3fd022ef60 Validate injected errors are not NoError
HandleError assumes that the error is not NoError. InjectError is
an untrusted wire command and needs to validate that NoError is not
passed.

Bug: chromium:1010703, chromium:1004368
Change-Id: Id48a877ded327a6e3a54fedb2be2c54eeca5cd3c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-10-03 14:40:09 +00:00
Bryan Bernhart 0da52f2d92 D3D12: Move resource allocators from device into manager.
Encapsulates resource allocation using a manager class.

BUG=dawn:27

Change-Id: I7a496261dcede647d32e44d96ed27237bf418fb2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11742
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2019-10-02 21:45:09 +00:00
Austin Eng 867f72058a Add missing "strlen" parameter for Device InjectError command.
This CL adds a StringMessageMatcher to the wire unittests harness
to validate that messages are not degenerate.

Bug: chromium:1004368
Change-Id: I121a259e67938b06ccc5e9829abfa3e25fffc003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11740
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-02 06:35:38 +00:00
Austin Eng 4379e8f34f dawn_wire: Only generate has_member for optional members
We were generating has_member for all pointer members which meant
it was possible to incorrectly pass nullptr for required arguments.

Bug: chromium:1009166
Change-Id: I5e32bab5ccae010468e55897ae9840ab8fda684f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11760
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-02 06:35:08 +00:00
Austin Eng dc9f1e6806 Add validation tests for WebGPU bind group "persistence"
A draw should be valid if the currently set bind groups match the
current pipeline layout, irrespective of changes in pipeline layout.
This is different from the descriptor set inheritance in Vulkan which
Dawn used to follow.

Bug: dawn:201
Change-Id: I1181ba80614ae40d665094f4ea742804565f6ed3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11641
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-02 06:27:58 +00:00
Ryan Harrison c15160f3ab Rolling 4 dependencies
Roll third_party/SPIRV-Tools/ 958f7e72a..9eb1c9a4c (20 commits)

958f7e72a7..9eb1c9a4c4

$ git log 958f7e72a..9eb1c9a4c --date=short --no-merges --format='%ad %ae %s'
2019-10-01 stevenperron Add continue construct analysis to struct cfg analysis (#2922)
2019-09-27 stevenperron Record trailing line dbg instructions (#2926)
2019-09-27 rharrison Add removing references to debug instructions when removing them (#2923)
2019-09-27 paulthomson spirv-fuzz: allow interestingness script arguments (#2925)
2019-09-27 ehsannas Add Kokoro bots for building with Bazel. (#2914)
2019-09-27 alanbaker Refactor the InstructionPass (#2924)
2019-09-26 afdx spirv-fuzz: do not allow a dead break to target an unreachable block (#2917)
2019-09-26 afdx spirv-fuzz: preserve some analyses when permuting blocks (#2918)
2019-09-25 alanbaker Only allow previously declared forward refs in structs (#2920)
2019-09-25 stevenperron Handle id overflow in wrap-opkill (#2916)
2019-09-25 afdx spirv-fuzz: do not replace struct indices with synonyms (#2915)
2019-09-25 afdx spirv-fuzz: Fixes to preconditions for adding dead break/continue edges (#2904)
2019-09-25 afdx spirv-fuzz: do not replace a pointer argument to a function call with a synonym (#2901)
2019-09-25 afdx spirv-fuzz: do not replace boolean constant argument to OpPhi instruction (#2903)
2019-09-24 alanbaker Remove validate_datarules.cpp (#2911)
2019-09-24 stevenperron Handle extract with no indexes (#2910)
2019-09-24 ehsannas Add Bazel build configuration. (#2891)
2019-09-24 stevenperron Handle id overflow in convert local access chains (#2908)
2019-09-24 dsinclair Add OpCopyMemory test to SVA. (#2885)
2019-09-23 dsinclair Add missing GN dependency (#2899)

Roll third_party/glslang/ 973d0e538..7bc047326 (1 commit)

973d0e5382..7bc047326e

$ git log 973d0e538..7bc047326 --date=short --no-merges --format='%ad %ae %s'
2019-09-18 laddoc Reflection will crash when the VS input symbol defines the same name with FS output symbol

Roll third_party/shaderc/ cb8b3fc5c..e849e6783 (4 commits)

cb8b3fc5ca..e849e6783d

$ git log cb8b3fc5c..e849e6783 --date=short --no-merges --format='%ad %ae %s'
2019-09-23 rharrison Add logging missing failures to spvc test script (#815)
2019-09-23 rharrison Add --update_known_failures to spvc test script (#813)
2019-09-23 rharrison Another round of cleaning the spvc test script (#811)
2019-09-23 rharrison Rolling 2 dependencies (#812)

Roll third_party/spirv-headers/ 601d73872..842ec9067 (4 commits)

601d738723..842ec90674

$ git log 601d73872..842ec9067 --date=short --no-merges --format='%ad %ae %s'
2019-09-24 ehsannas Improve the doc on using Bazel.
2019-09-24 rex.xu Bump the SPIR-V version to 1.5
2019-09-23 ehsannas Update documentation.
2019-09-18 ehsannas Add a Bazel build file.

Created with:
  roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers

Change-Id: If888854a1b123b01cd14169d9e2ac0cf2b0eec00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11741
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2019-10-01 17:16:53 +00:00
Jiawei Shao deb28ea45d D3D12: Implement ASSERT_SUCCESS as macro instead of function
This patch implements ASSERT_SUCCESS(hr) as a macro instead of a
function so that when hr fails Dawn can print out the line number of the
expression that causes the failure.

For example, previously we will always get the following error message
because ASSERT_SUCCESS is a function:
Assertion failure at ../../src/dawn_native/d3d12/DeviceD3D12.cpp:43
(ASSERT_SUCCESS): (((HRESULT)(hr)) >= 0)

Now we can get more details about where the failure occurs because now
ASSERT_SUCCESS is a macro:
Assertion failure at ../../src/dawn_native/d3d12/DeviceD3D12.cpp:59
(Initialize): (((HRESULT)(mD3d12Device->CreateCommandQueue(&queueDesc,
__uuidof(**(&mFence)), IID_PPV_ARGS_Helper(&mFence)))) >= 0)

BUG=dawn:178

Change-Id: I435ee2f418658bca276f439fcabfabbfecbff998
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11700
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-10-01 02:30:32 +00:00
Bryan Bernhart e6b93e8706 D3D12: Use ringbuffer allocator for descriptor heaps.
Enable descriptor heap re-use by using ringbuffer.

BUG=dawn:155

Change-Id: I72e3fb98a64dc1af671e185e2114868a577a0554
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9460
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2019-10-01 02:19:02 +00:00
Austin Eng e06f01be71 dawn_wire: Forward client-generated errors to the server
This fixes a problem where client-generated errors weren't properly
captured in error scopes.

Bug: chromium:1004368
Change-Id: Ic0f6e5bc5e281c676ea7154dd217cfc8dd51be5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11642
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-09-30 22:50:59 +00:00
Jiawei Shao 55a00c7a1f Set writemask to 0 when no fs output matches color state on Metal and Vulkan
This patch fixes an undefined behaviour on Metal and Vulkan when there
is a color state whose corresponding fragment output is not declared in
the fragment shader.

According to Vulkan SPEC (Chapter 14.3), the input values to blending or
color attachment writes are undefined for components which do not
correspond to a fragment shader output. Vulkan validation layer follows
the SPEC that it only allows the shader to not produce a matching output
if the writemask is 0, or it will report a warning when the application
is against this rule.

When no fragment output matches the color state in a render pipeline,
the output differs on different Metal devices. On some Metal devices the
fragment output will be (0, 0, 0, 0) even if it is not declared in the
shader, while on others there will be no fragment outputs and the content
in the color attachments is not changed.

This patch fixes this issue by setting the color write mask to 0 to
prevent the undefined values being written into the color attachments.

With this patch, the following end2end tests will not report warnings
any more when we enable the Vulkan validation layer:
ObjectCachingTest.RenderPipelineDeduplicationOnLayout/Vulkan
ObjectCachingTest.RenderPipelineDeduplicationOnVertexModule/Vulkan
ObjectCachingTest.RenderPipelineDeduplicationOnFragmentModule/Vulkan

BUG=dawn:209
TEST=dawn_end2end_tests

Change-Id: I5613daa1b9a45349ea1459fbdfe4a12d6149f0f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11581
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2019-09-30 07:27:57 +00:00
Bryan Bernhart 52bd6b7da6 Move kInvalidOffset to RingBufferAllocator namespace.
BUG=dawn:27

Change-Id: I1c580d8e41c4f9bb10b638297b4c3a3fa61a0d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11680
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-27 21:26:13 +00:00
François Beaufort f622a44750 Fix support for optional const char*
Optional labels were added to command buffer descriptor and compute pass
descriptor in https://dawn-review.googlesource.com/c/dawn/+/11601.
Sadly, the wire was not updated. This CL fixes support for optional
const char*.

Bug: dawn:22
Change-Id: I23211456f5e3d5f3c0344d8b8cc604bab20015f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11660
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-27 21:25:43 +00:00
Bryan Bernhart 86ac0b93c9 Rename INVALID_OFFSET to kInvalidOffset.
BUG=dawn:27

Change-Id: Ida590a2b3cf3da17bbedf6ef61d72eaaa443bc4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11561
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-27 15:11:52 +00:00
Jiawei Shao 64f4dd7127 Add check between color state format and fragment shader output
This patch adds the validation on the compatibility between the format
of the color states and the fragment shader output when we create a
render pipeline state object as is required in Vulkan (Vulkan SPEC
Chapter 14.3 "Fragment Output Interface"):
"if the type of the values written by the fragment shader do not match
the format of the corresponding color attachment, the resulting values
are undefined for those components".

BUG=dawn:202
TEST=dawn_unittests

Change-Id: I3a72baa11999bd07c69050c42b094720ef4708b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11461
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2019-09-26 00:12:41 +00:00
Mathieu-Andre Chiasson 09cc2b92c7 Fixed compilation issues when using libstdc++
Bug:dawn:229
Change-Id: I18ce6330bc4597db4f2c4548698b38ab2c826203
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-25 19:32:01 +00:00
François Beaufort 6ac5a9250d Add label to command buffer and compute pass descriptors
This CL adds an optional label to command buffer descriptor and compute
pass descriptor. It is not used yet but needed from the WebGPU side.

Bug: dawn:22
Change-Id: Id4247882a1e3cc63a007adf41c2539764f1be677
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11601
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2019-09-25 13:56:48 +00:00
Natasha Lee cf0e9d93f1 Add StoreOp::Clear
When storeOp is clear, texture subresource is set as not initialized

Bug: dawn:145
Change-Id: I364d7239a7ebdb9d5a28a4af559f3212be7ef15a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-25 13:08:28 +00:00
Jiawei Shao 05be0ff348 Validate fragment output location doesn't exceed kMaxColorAttachments
This patch adds the validation on the fragment shader output location to
ensure it will never exceed kMaxColorAttachments.

BUG=dawn:202
TEST=dawn_unittests

Change-Id: I4ac4463fd3dfb3c2e9ffecb370f9d9d59393c26d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11580
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-25 01:21:28 +00:00
François Beaufort c3b613296d Rename GPUBindGroupLayoutBinding dynamic to hasDynamicOffset
Following WebGPU change at  https://github.com/gpuweb/gpuweb/pull/427,
this CL renames GPUBindGroupLayoutBinding dynamic to hasDynamicOffset.

Bug: dawn:22
Change-Id: Ie1c2bf4b1f6764c83be7cfe04f4f1a1d2205f685
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11500
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-24 11:08:17 +00:00
Bryan Bernhart 41f8aa550b Return Dawn result upon submit.
Missing OOM error should submit fail to create a descriptor heap.

BUG=dawn:177

Change-Id: I6ccc10f3e0b8de0bd21caa9aca35f4f269ce51e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11540
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-23 21:21:10 +00:00
Ryan Harrison 27a35eb2a9 Rolling 3 dependencies
Roll third_party/SPIRV-Tools/ 08fcf8a4a..958f7e72a (10 commits)

08fcf8a4ab..958f7e72a7

$ git log 08fcf8a4a..958f7e72a --date=short --no-merges --format='%ad %ae %s'
2019-09-23 afdx Employ the "swarm testing" idea in spirv-fuzz (#2890)
2019-09-23 afdx Fix operand index in spirv-fuzz (#2895)
2019-09-23 dneto Update DEPS: effcee, re2, googletest (#2881)
2019-09-23 dneto Add method comment for opt::Function::WhileEachInst (#2867)
2019-09-20 stevenperron Use OpReturn* in wrap-opkill (#2886)
2019-09-20 afdx Fix to CMakeLists for spirv-fuzz tests (#2888)
2019-09-20 afdx Allow validation during spirv-fuzz replay (#2873)
2019-09-20 afdx Disable long-running fuzzer tests by default (#2887)
2019-09-19 stevenperron Revert "Use OpReturn* in wrap-opkill"
2019-09-19 stevenperron Use OpReturn* in wrap-opkill

Roll third_party/glslang/ f7a48b153..973d0e538 (1 commit)

f7a48b153f..973d0e5382

$ git log f7a48b153..973d0e538 --date=short --no-merges --format='%ad %ae %s'
2019-09-20 cepheus GLSL/SPV: Fix #1900: Drop const on literal when doing an object copy.

Roll third_party/shaderc/ 68b6857ac..cb8b3fc5c (1 commit)

68b6857ac0..cb8b3fc5ca

$ git log 68b6857ac..cb8b3fc5c --date=short --no-merges --format='%ad %ae %s'
2019-09-19 rharrison Rolling 6 dependencies and update known_failures (#809)

Created with:
  roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers

Change-Id: I2e18f0533a45b243521569194415706d418d8b54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11520
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2019-09-23 20:19:50 +00:00
Corentin Wallez d46cabd73f Fix the orientation of CubeReflection
BUG=dawn:224

Change-Id: I1a6c3509245cadd0c95256e4985dac6feee50829
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11441
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-20 23:53:27 +00:00
Corentin Wallez c81a717379 Remove indirection for colorStates
This is to match the work in progress webgpu.h header.

BUG=dawn:22

Change-Id: Ia1077fef95e6bda541cddbd2f6ce40b79138e960
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-20 23:22:27 +00:00
Corentin Wallez b8dbada76d Make ComboRenderPipelineDescriptor non copyable.
This causes subtle bugs in tests when pointers in combo render pipeline
descriptors point at other combo render pipeline descriptors.

BUG=dawn:22

Change-Id: I5234df26895986fd1d7a9b4e835598177581803a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11340
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-20 23:15:47 +00:00
Yunchao He 394553b02e Set y-axis up in normalized coordinate system.
BUG=dawn:224

Change-Id: I6bb4946e87b593f1d62a13b3b8ab38f21d3e9ffb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10201
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2019-09-20 23:04:47 +00:00
Corentin Wallez a838c7d497 Remove indirection for colorAttachments
This is to match the work in progress webgpu.h header.

BUG=dawn:22

Change-Id: I1371cda1b7666de8eb8283fa7e5da935d17e1d52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9381
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-20 22:59:47 +00:00
Brian Sheedy 0c4d75931a Disable BufferSetSubData.ManySetSubData on Metal
Disables ManySetSubData on Intel/Metal configurations, as it has started
failing on Mac 10.14.6.

Bug: dawn:228
Change-Id: Ia7d27a698deb9abc08cc04660903e5c6c93bbf50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11460
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-20 22:16:03 +00:00
Corentin Wallez 38b295de38 Fix availability check for MTLCopyAllDevices
This caused failure on macOS 10.11 because Dawn decided Metal is
supported but would go ahead and reach an UNREACHABLE() block.

BUG=chromium:1006181

Change-Id: I20739a058adaa60a71ec489e07b36ebf48ef871a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11420
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-20 17:40:53 +00:00
Corentin Wallez a9a84dfe1e BUILD.gn: Delete stale generated files in Dawn's gen dir.
This normalizes even more the directory structure of generated files in
Dawn and removes stale autogenerated files that could be included
wrongly using a GN action.

See comment on top of dawn_generator.gni in this commit for more
context.

BUG=dawn:22

Change-Id: I8ec038f949c048431b2b643af4462f98c4ae610b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11361
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-19 23:30:42 +00:00
Ryan Harrison f8c66c72c6 Rolling 4 dependencies
Roll third_party/SPIRV-Tools/ e2e95172d..08fcf8a4a (22 commits)

e2e95172df..08fcf8a4ab

$ git log e2e95172d..08fcf8a4a --date=short --no-merges --format='%ad %ae %s'
2019-09-19 ehsannas Fix header include syntax. (#2882)
2019-09-19 stevenperron Handle OpConstantNull in copy-prop-arrays. (#2870)
2019-09-19 dneto Fix comment typo found by protobufs linter (#2884)
2019-09-19 dsinclair Move docs into docs/ folder (#2872)
2019-09-18 dsinclair Add WebGPU SPIR-V Assembler in JavaScript. (#2876)
2019-09-18 dneto Android.mk: Add dependency from optimizer file to amd-shader-ballot-insts.inc (#2883)
2019-09-18 dneto Update SPIRV-Headers in DEPS (#2880)
2019-09-18 afdx  Fix detection of blocks bypassed by new edge (#2874)
2019-09-18 afdx Fix CMake issue related to spirv-fuzz (#2877)
2019-09-18 afdx Add fuzzer pass to replace ids with synonyms (#2857)
2019-09-18 alanbaker Relaxed bitcast with pointers (#2878)
2019-09-17 52076061+digit-google Fix Fuchsia build. (#2868)
2019-09-16 raun.krisch Adding valilidation checks for OpEntryPoint duplicate names and execution mode (#2862)
2019-09-16 alanbaker Extra resource interface validation (#2864)
2019-09-13 alanbaker Split capability tests (#2866)
2019-09-13 alanbaker SPIRV-Tools support for SPIR-V 1.5 (#2865)
2019-09-11 afdx Add fuzzer pass to copy objects (#2853)
2019-09-11 rharrison Handle another case where creating a constant can fail (#2854)
2019-09-11 stevenperron Don't inline function containing OpKill (#2842)
2019-09-11 stevenperron Handle id overflow in wrap op kill. (#2851)
2019-09-11 dneto Assembler: Can't set an ID in instruction without result ID (#2852)
2019-09-10 zoddicus Handle creating a new constant failing gracefully (#2848)

Roll third_party/glslang/ 664ad418f..f7a48b153 (14 commits)

664ad418f8..f7a48b153f

$ git log 664ad418f..f7a48b153 --date=short --no-merges --format='%ad %ae %s'
2019-09-17 cepheus SPV_KHR_physical_storage_buffer/SPV: Add GL_EXT_buffer_reference_uvec2
2019-09-16 digit Fix Fuchsia build.
2019-09-17 kainino use custom es6 modularization instead of MODULARIZE=1
2019-09-17 kainino Separate GLSLANG_WEB (min-size build) and Emscripten options
2019-09-18 cepheus README: Fix WASM typos.
2019-09-18 cepheus HLSL: Fix #1903 Catch 0-argument case to constructors.
2019-09-08 jbolz Add GL_EXT_shader_subgroup_extended_types support
2019-08-28 cepheus GLSL: Only require constant for subgroupBroadcast when SPV < 1.5.
2019-08-18 cepheus SPV: Support SPIR-V 1.5; five extensions no longer need OpExtension.
2019-09-09 laddoc Add flags for local size values ( compute shader )
2019-09-13 cepheus SPV 1.5: Switch to the 1.5 header, for SPIR-V 1.5.
2019-09-11 dsinclair Comment out params instead of removing
2019-09-10 dsinclair Remove unused params
2019-09-09 rex.xu Fix incorrect function prototypes of 64-bit findLSB/findMSB

Roll third_party/spirv-cross/ b32a1b415..5431e1da2 (7 commits)

b32a1b4150..5431e1da2d

$ git log b32a1b415..5431e1da2 --date=short --no-merges --format='%ad %ae %s'
2019-09-19 post Update SPIR-V headers.
2019-09-19 post MSL: Fix 16-bit integer literals.
2019-09-18 rharrison Update external/ to SPIR-V 1.5
2019-09-18 post CMake: Add option to force -fPIC.
2019-09-17 post Fix -Wshorten-64-to-32 warnings.
2019-09-16 post CMake: Add option to skip installation targets.
2019-09-12 post Consider discard and demote as impure statements.

Roll third_party/spirv-headers/ 38cafab37..601d73872 (2 commits)

38cafab379..601d738723

$ git log 38cafab37..601d73872 --date=short --no-merges --format='%ad %ae %s'
2019-09-18 cepheus Add SPV_KHR_physical_storage_buffer.
2019-09-13 cepheus SPIR-V 1.5.

Created with:
  roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers

Change-Id: I9a50caaec13661e60126b9d3e6b4fc63863d25f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11381
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-19 21:08:12 +00:00
Bryan Bernhart bdd88a7dc1 Check if allocation is valid before deallocating.
Ensure deallocate does not assert should allocation fail but still be used.

BUG=dawn:227

Change-Id: I5edd4c160bced7934970c5d59e541a3a8f7a8afb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11380
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-19 20:40:12 +00:00
Ryan Harrison ae4dbeb178 Roll ahead shaderc API and update API usage as needed
Roll third_party/shaderc/ 4baa46a5d..68b6857ac (2 commits)

4baa46a5d1..68b6857ac0

$ git log 4baa46a5d..68b6857ac --date=short --no-merges --format='%ad %ae %s'
2019-09-18 rharrison Code hygiene work for spvc (#808)
2019-09-10 stevenperron Have update_build_version.py new parameter (#805)

Change-Id: I06e0f62a1443741e8ac09a84ff63ddd100f6a656
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11341
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2019-09-19 14:20:46 +00:00
Corentin Wallez 05623df97f BUILD.gn: Add a check generated files are in allowed dirs.
This is important so that we know that the list of allowed directories
is in sync with other parts of the build in follow-up commits.

BUG=dawn:22

Change-Id: I202bec55b510989e43acf497956e2937c9a2f60a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11360
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-18 23:19:31 +00:00
Bryan Bernhart 450e212cf5 Remove device dependencies from ringbuffer.
Allows ringbuffer sub-allocator to be used for non-staging memory.

BUG=dawn:155

Change-Id: Id0021907f520909aaebaf79e992124a47797d38d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2019-09-18 22:06:41 +00:00
Austin Eng b11bd2dfe5 Fix leak of ErrorData after Device::ConsumedError
The code to delete this ErrorData* was lost in the error scope
refactor.

Bug: chromium:1002783, chromium:1002888, dawn:153
Change-Id: Iebe13c778079501193b942ebd97a559041516c3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-09-18 21:03:41 +00:00
Corentin Wallez 7dda7d0f2e Clarify disabled warning for Metal in BUILD.gn
BUG=

Change-Id: I7f0715bbaaae433d2f1a93c5a2496f28d466e150
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11220
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-18 04:40:32 +00:00
Corentin Wallez 897ebc7a71 Normalize generated file paths to match main tree.
Previously dawn_native files were in src/dawn_native/ while generated
files were in dawn_native/. This makes some things complicated when
integrating in other source trees so normalize all generated files to be
in paths that match the main tree.

BUG=dawn:225

Change-Id: I5b3e04d37a16251143578dfb7a31445b229fe4ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11300
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-18 04:33:12 +00:00
Corentin Wallez b495e48405 Support compilation of Dawn on iOS.
BUG=dawn:225

Change-Id: I618552c55c8472adc25625733b59d972d7297f57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11040
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-18 04:32:52 +00:00
Corentin Wallez 45f9185de5 generator_lib.py: correctly handle lack of --jinja2-path.
Python's list.index() method raises an exception when the item isn't
present in the list. Fix this check that was instead expecting a
negative index.

BUG=dawn:225

Change-Id: I8e67d71ff7384f49533a95d5cbe04da1cf7bb0bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11301
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-09-18 00:59:40 +00:00
Corentin Wallez 5e9082daa4 Add some missing headers in BUILD.gn files.
BUG=dawn:225

Change-Id: Ie1ebe62caea48353b6b3579c9405b5cc700fba66
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11302
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-17 21:36:15 +00:00
Corentin Wallez f7c263624b Add missing include in the Vulkan backend.
BUG=dawn:225

Change-Id: I8dc0c5c884d8130b98a849e0d675e29d80aa4de8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11303
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-17 21:28:45 +00:00
Austin Eng 519b16c4b0 Add README.md for the Dawn perf test harness
Bug: dawn:208
Change-Id: Ic9b4c83ab3c27851d149adb5986f3a5556d0548a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11283
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-17 21:02:38 +00:00
Austin Eng 7f3f331ce6 Support setting bind groups before pipeline for all backends
This is to match WebGPU semantics.

Bug: dawn:201
Change-Id: I2aab671fc389edf1d2765395814a9c831afc653e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11080
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-17 19:25:27 +00:00
Natasha Lee 617e356580 OpenGL: clear nonrenderable texture formats
Clears nonrenderable color formats and merges zero vs nonzero clears
to use the same code path.

Bug: dawn:145
Change-Id: I8f2f36134b56787e07231d82e37c36897ba1d4ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10820
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-17 18:54:47 +00:00
Austin Eng be990077f4 Support ErrorScopes for asynchronous GPU execution
This changes updates ErrorScopes so that scopes enclosing a
Queue::Submit or Queue::Signal resolve their callbacks asynchronously
after GPU execution is complete.

Bug: dawn:153
Change-Id: I0e0b8a9f19f3f29d1b6a3683938154b87f190a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10701
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-09-17 18:24:07 +00:00