Commit Graph

588 Commits

Author SHA1 Message Date
dan sinclair ff7cf21021 Rename StorageClass to AddressSpace.
This CL updates the internals to use AddressSpace instead of the old
StorageClass name.

Bug: tint:1404
Change-Id: Iecc208e839453437f4d630f65e0152206a52db7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104420
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
2022-10-03 14:05:23 +00:00
Brandon Jones da866181ab Don't advertise timestamp support on Qualcomm
The Android devices I've tested with Qualcomm GPUs (like the Pixel 4)
are exhibiting an issue where resolving timestamp queries after a
render pass is causing a crash. Until that issue can be resolved it's
safest to simply not advertise timestamp query support on these devices.

Bug: dawn:1559
Change-Id: Id76aa5095ffbb7f55579cc428388f55f4528581d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104441
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-30 23:46:48 +00:00
Yunchao He 7a4072e3e3 Add extra layers to work around array texture corruption issue
This change works around the array texture corruption issue for
some Windows Intel devices on some old drivers. The number of
extra layer for a given texture is precisely calculated according
to texture memory layout on these devices.

It also adds one more test: clearTexture.

Bug: dawn:949, dawn:1507

Change-Id: I0b2a6497c77f3edf45c49220517e13be76c6b608
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103120
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2022-09-30 17:57:38 +00:00
Corentin Wallez be4b8cb4d1 Remove suppressions for passing tests.
Fixed: dawn:966
Change-Id: I852d2098030014c7ec750800462df95be2cc0417
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104361
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-30 15:14:08 +00:00
Brandon Jones fdbc31f76b Fix Qualcomm render pass attachment bug
Works around a driver bug described in
https://developer.qualcomm.com/forum/qdn-forums/software/adreno-gpu-sdk/68949

Requires the pResolveAttachments member of a VkSubpassDescription to
explicitly be null if the number of color attachments is 0.

Allows the removal of multiple test suppressions related to
depth/stencil readback.

Bug: dawn:1558
Change-Id: Ia03c74a35cbb619b5968f649d41848f53378bf35
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104183
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-30 04:19:18 +00:00
Antonio Maiorano d909f2b9c5 dawn: Suppress tests that fail on ANGLE/SwiftShader
Fails roll of SwiftShader into Dawn. See crbug.com/dawn/1557 for
details.

Bug: dawn:1557
Change-Id: Ibe97f1c3083b1fe254dd935b4abfdfbea9e34050
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104260
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-29 20:39:17 +00:00
shrekshao d1a5f93630 Add maxBufferSize limit
Also emits a warning when create buffer size exceeds
the maxBufferSize limit during the deprecation period.

Bug: dawn:1525
Change-Id: I7b47ae5c85b116035fdcea8b68fb574c0a550729
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103660
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Shrek Shao <shrekshao@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-09-29 19:02:11 +00:00
Stephan Hartmann b764a15c23 libstdc++: replace bit_set::operator!= in ityp_bitset
C++20 removed the operator.

Bug: chromium:957519
Change-Id: Iba9c3fcdf4d7d3c4286b5f5dac86304faa6a0c02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104201
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-09-29 15:02:38 +00:00
Zhaoming Jiang 5e22e46a63 dawn E2E: Refactor and add non-struct-member tests in ComputeLayoutMemoryBufferTests
This CL refactor the end-to-end test suit ComputeLayoutMemoryBufferTests
and add tests for non-struct-member scalar, vector, matrix, and array of
vectors and matrices types. This test suit is also intend to test f16
buffer read/write after it is implemented.

Bug: tint:1673
Change-Id: Iea4d3f70897d196ea00e3a3e0189a0372afe0382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102800
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2022-09-29 04:02:48 +00:00
Brandon Jones f4faccbbbd Suppressions for Mali and Adreno Android devices
Adds suppressions for multiple failures in the end2end tests that are
showing up on Pixel devices I'm able to test. Majority (800+) affect
the devices with Qualcomm GPUs (Pixel 4, Pixel 2, etc) and 8 affect the
newer Tensor devices (Pixel 6).

Bug: dawn:1549
Bug: dawn:1550
Change-Id: Ia598734a1752e5f086e4e79c96a799156d84e448
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2022-09-28 19:17:18 +00:00
Shrek Shao 3a329f2209 Re-enable ValidationAfterOverrideStorageSize test
Also move Robustness transform to pipeline creation time on Vulkan
backend.

Bug: tint:1660, dawn:1041
Change-Id: I10220f34119d11f29be86fd29463a282175eccdd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103780
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-09-28 18:36:47 +00:00
Corentin Wallez 00aced1bbf Allow usage chromium_disable_uniformity_analysis
Only when unsafe APIs are allowed.

Bug: None
Change-Id: Idbe0494bec29bb623c0af39d3fb65d4995bb1a9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-28 17:55:27 +00:00
Zhaoming Jiang f304f25e7d Dawn: fix default value of size in BindGroupEntry
This CL fix the missing default value WGPU_WHOLE_SIZE for
BindGroupEntry.size, and also add unit tests for using default offset
and size in BindGroupEntry when creating bind group.

Bug: dawn:1553
Change-Id: Ia9c426c0fff1eaea3a0b7c84e5528881199e2c4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-28 12:49:27 +00:00
Sunny Sachanandani 3194b4a31f d3d12: Signal fence after PIX Present
Calling ID3D12SharingContract::Present issues GPU work on the command
queue which needs to be synchronized with resource deallocation. This
seems to work now perhaps due to the keyed mutex semantics keeping the
D3D11 texture alive for longer than necessary. With fences, this missing
synchronization causes the validation layers to complain about early
deallocation of the ID3D12Resource.

Moving the Present to SynchronizeImportTextureBeforeUse ensures that it
happens before NextSerial and hence the signal fence that's recorded
will include any GPU work issued by Present. Also, resource deallocation
will happen after this work. However, this has the side-effect of PIX
seeing more frames, once per ExecuteCommandLists, but it could be argued
that's more accurate and useful.

Bug: dawn:1544
Change-Id: I1b417049045a812837f67072d7f09ac47bc18125
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103841
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
2022-09-28 00:58:46 +00:00
Corentin Wallez 03199c2b44 Protect against aspectReadOnly of unused DS attachements aspects
Unused aspects of depth-stencil attachments that are tagged as read-only
used to leak that read-only state to backends, even if the validation
made it seems like they always match (they only need to match if the
texture has both aspects). This confused backends like Vulkan which
checked for depthReadOnly || stencilReadOnly to choose between code
paths.

Instead reyify the depthStencilAttachement descriptor in the frontend to
protect against garbage values being passed for aspects that aren't
present in the texture.

Adds a regression test, with the caveat that a failure is only shown by
having the VVL output and error in stderr due to an unrelated issue.

Fixed: dawn:1512
Change-Id: I35d5581e46909b7f41ff4c7553d60c6ac844a56b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101121
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-26 11:13:35 +00:00
Corentin Wallez ab882c17a5 Vulkan: Fix incorrect barriers for T2T copies of DS.
T2T copies for depth-stencil formats where done one by one. Because
the two per-aspect copies where submitted with no barriers in between
them, incorrect synchronization could occur, making the end state of the
destination texture incorrect.

Fix this by using the combined aspects of the texture to perform copies,
such that depth stencil are copied in a single command instead of two
commands.

Unfortunately the VVLs don't catch this issue, but the reporter of the
issue confirmed that this commit fix the dawn_end2end_tests failures
they were seeing.

Fixed: dawn:1514
Change-Id: I2e1c5f8d9aabeb0119364d26c9d66d0763cfadcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103421
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2022-09-26 11:07:25 +00:00
Yunchao He ef6696089d D3D12 Intel: change the driver version for array texture corruption issue
The previous driver version I got from Intel driver team is
not correct. That driver does contain the fix but it is not the
first version with the fix.

Bug: dawn:949, dawn:1507

Change-Id: I0044a181e4266b50f77734bbbf9cc8755a8334d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103502
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-23 16:03:37 +00:00
Corentin Wallez 05e7332ac8 Rework how combined aspects are handled in TextureVk
At the moment the computations to decide whether aspects should be
combined are executed on every call related to aspect in TextureVk.
These computations never change and can be computed once at the creation
of TextureVk and reused at runtime.

This is meant to be a noop change as a slight rework prior to fixing
depth-stencil T2T copies no using the combined aspects.

Bug: dawn:1514

Change-Id: I1177cdcf42d072bb2bc2c3a2f149dc480fe79f2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103420
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-09-23 09:56:06 +00:00
Sunny Sachanandani 85e6337027 d3d12: Move NextSerial out of ExecuteCommandList
Reverts to the code flow before fences were implemented. NextSerial is
now the reponsibility of the caller of ExecutePendingCommandContext like
it was before. We now use GetPendingCommandSerial to store the signal
fence value instead of GetLastSubmittedCommandSerial and check that the
signal fence value was submitted in EndAccess.

Bug: dawn:576
Change-Id: I616840a0932ec17f77fcab38058773006dfae32f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103501
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-23 00:52:56 +00:00
Jiawei Shao 5a0f8d32a2 Support optional query on adapter power preference
This patch adds DawnAdapterPropertiesPowerPreferenceDescriptor for
querying adapter power preference which is useful to distinguish
different logical adapters created on same physical device but with
different power preferences.

Bug: dawn:1516
Test: dawn_unittests
Change-Id: I12ed6e370f8b57c860520154565765f0ee894831
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102780
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-09-23 00:29:46 +00:00
Loko Kung 3354bf0d91 Add cleanup when encoding indirect draw validations.
- Cleanup is necessary because otherwise encoded render commands may be
  leaked if the validation encoding fails. (The leaked render commands
  can then trigger an assert in ~Device::Cache because the commands can
  hold a ref to an AttachmentState that was not destroyed, and hence
  still be in the device cache.
- Added explicit check in EncoderIndirectDrawValidationCommands for
  device 'alive-ness' since it may create new objects later and hit the
  same error later on anyways.
- Added regression test.

Fixed: chromium:1365011
Change-Id: I342479a4227fc43d82ea35f662d049e6db2b1740
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103340
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-22 23:45:36 +00:00
Austin Eng 534a198f88 Validate that the device is alive when wrapping external images
Will be tested in Chromium's webgpu_mailbox_unittest.cc

Bug: chromium:1359106
Change-Id: I8a9bf01cd593f2835e2876fa04139fd3afda9b2e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103462
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-09-22 22:10:56 +00:00
Takahiro d4dd547bae Implement "rg11b10ufloat-renderable" feature
Implement "rg11b10ufloat-renderable" feature that allows
the RENDER_ATTACHMENT usage on textures with format
"rg11b10ufloat", and also allows textures of that format
to be multisampled.

Bug: dawn:1518
Change-Id: I4109dc0e9d90f4c0803219292edea554927a187a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102000
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-22 16:38:06 +00:00
Li Hao cbd3ef4bb9 Suppress TimestampQueryTests.ResolveTwiceToSameBuffer/D3D12 on Intel Gen12
This is a D3D driver regression on Intel Gen12 GPUs, the test could pass
on old driver version and pass with disable_timestamp_query_conversion
toggle on latest driver.

Bug: dawn:1546
Change-Id: I8cf63824d5147bb78f53a284cada8efdc653a3ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103380
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-22 09:52:35 +00:00
Austin Eng 45a2c5193a Return false from IsTextureSubresourceInitialized for error textures
Otherwise, callers of this method will hit an ASSERT for error
textures.

Bug: chromium:1359106
Change-Id: I2602d209d837b3b27916221578f9ac4041f8848b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103281
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-21 20:18:30 +00:00
Ben Clayton f92830b623 dawn: Enable OpenGLBackend for ComputeLayoutMemoryBufferTests
The layout issues should now be fixed with the Std140 transform.

Bug: dawn:942
Change-Id: I714c2edb39f27b39f66c1e913f22232ad7908896
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2022-09-21 18:13:14 +00:00
Brandon Jones 773800b68d Reland "Implement maxBindingsPerBindGroup limit"
This is a reland of commit 4d67a883b6
Underlying issue fixed in https://dawn-review.googlesource.com/c/dawn/+/102461

Original change's description:
> Implement maxBindingsPerBindGroup limit
>
> Bug: dawn:1523
> Change-Id: Ifcf83f6836a5d7ed447080ccb033e4163970432e
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100706
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Brandon Jones <bajones@chromium.org>

Bug: dawn:1523
Change-Id: If0824b6f8fcb7c152feceb95a2709d0a3b8ce582
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103280
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-21 17:42:24 +00:00
Ben Clayton 4953dabab7 dawn/tests: Remove OverridesWithZeroDefault test
It's not invalid to have create a shader module using zero-defaulted `override`s as workgroup size parameters.
These can be initialized with non-zero pipeline override values.

Bug: dawn:1504
Change-Id: I2636cbe2d26a6604735b0c8b0f5526bbc14e8ce2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103220
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-21 16:42:34 +00:00
dan sinclair 1662f5578e Fixup some grammar.
This Cl updates some double negative grammar to be a bit more readable.

Change-Id: Id5d9c64acc1dd8422b8116d8a6c1bf149f99e592
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103260
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-09-21 14:44:33 +00:00
Corentin Wallez eebb7d5e52 Fix leak of the eager exportable VkSemaphore.
Exporting an exportable VkSemaphore doesn't implicitly destroy the
VkSemaphore object. So instead of Detach()ing the VkSemaphore when it is
first consumed, just let it go out of the scope and be destroyed with
RAII. This also fixes the RAII by not destroying the VkSemaphore
immediately and instead wait until it becomes unused.

Found by running dawn_end2end_tests with the VVLs.

Bug: chromium:1258986
Change-Id: I858839b3094eee0f575c07a8f18504680afb53e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103024
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-20 17:02:32 +00:00
Corentin Wallez 1d100e4270 Dedent OnDebugUtilsCallback
While trying to debug why VVL failures don't cause test failures I
reworked this code a little bit. There is not CL that fixes the
behavior, but the code is marginally better with less indentation so
here's a CL to check that in.

Bug: None
Change-Id: I6fc460c4b4b7959ae405219615a03230bfb9847a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103022
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-20 16:01:31 +00:00
Corentin Wallez 9a6ca2878e Fix deprecation warnings of module-scope lets
By promoting them to "const" as the deprecation warning suggests.

Bug: None
Change-Id: I7110b8d38754a0785d7fd56343c2c905dc491e1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103023
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-09-20 15:58:27 +00:00
Corentin Wallez 6270ea7675 Suppress unnecessary VVL warning.
WebGPU allows having fragment outputs that don't match any attachments
so suppress this warning from the VVLs.

Bug: None
Change-Id: I49d3d876fdbc9e25ff71fd763593c7d810cb248c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103021
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-09-20 14:40:22 +00:00
Corentin Wallez 19826c30c1 Update the matchers for skipped VVL messages
The casing of some of the messages was updates in the Vulkan Validation
Layers which made the suppression in the Vulkan backend not match
anymore.

Bug: dawn:1225
Change-Id: I58c23986dce96453ded5b573bccee0ec90dcad91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103020
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2022-09-20 14:05:42 +00:00
Austin Eng d41981b5cc Deprecate sampleType "float" with multisampled textures
Bug: dawn:1540
Change-Id: I27608cc88c677205a2a41a5b041d2360f43d14f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102620
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Shrek Shao <shrekshao@google.com>
2022-09-16 16:33:28 +00:00
Li Hao 92182412b8 Implement timestampWrites on Metal
Metal configures the query set and query index for the beginning and end
of passes in pass descriptor when beginning a pass encoder, so we need
to record all timestamp writes information in BeginXxxPassCmd. For the
platfroms that support timestamp query, it must support timestamp write
at command boundary or stage boundary, if the stage boundary is
supported, use sampleBufferAttachments API for Metal implementation,
otherwise simulate timestamp write using sampleCountersInBuffer API
after begining a pass and before ending a pass.

Bug: dawn:1250
Change-Id: I462cb05a0102521cd2df4db3ac6f71863419b933
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2022-09-16 15:00:19 +00:00
Austin Eng 505e1a9368 Revert "Make it invalid to use sampleType "float" with multisampled textures"
This reverts commit 9b2f273d36.

Reason for revert: Breaking change needs deprecation period.

Original change's description:
> Make it invalid to use sampleType "float" with multisampled textures
>
> Fixed: dawn:1540
> Change-Id: I31f197d802c20ed7e6ef2ae00d4e107ab6f94278
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102420
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,shrekshao@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I5ac4b5691b0c4fb0ce76223c1997855e1b3485f3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102500
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
2022-09-16 01:14:28 +00:00
Jiawei Shao 233d64066c Make the validation on inter-stage shader variables match latest WebGPU SPEC
This patch updates the validations on the inter-stage shader variables to
match the latest WebGPU SPEC (in chapter "validating-inter-stage-interfaces").

With this patch the below validation tests in WebGPU CTS will pass:
- render_pipeline,inter_stage:max_shader_variable_location:*
- render_pipeline,inter_stage:max_components_count,*

Fixed: dawn:1448
Test: dawn_unittests
Change-Id: I3e4d98f03ec18e5d1642a4d7ecd3eed1b7ae04d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102104
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-16 00:30:38 +00:00
Austin Eng 9b2f273d36 Make it invalid to use sampleType "float" with multisampled textures
Fixed: dawn:1540
Change-Id: I31f197d802c20ed7e6ef2ae00d4e107ab6f94278
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-09-15 23:03:38 +00:00
Loko Kung 18dfc4797c Track TextureViews in Textures so that they can be chain-destroyed.
- Adds Prepend function to LinkedList to avoid directly using the
  insert functions on the LinkNodes. (And tests for this as well.)
- Adds ApiObjectList class for tracking lists of objects for
  destruction.
- Renames and virtualizes some tracking interfaces so that they can be
  overriden for the TextureView/Texture cases.
- Removes explicit destroying of TextureViews from Device since
  destroying Textures will destroy TextureViews now.

Fixed: dawn:1355
Change-Id: I3522383ea7724d6e41ac0c805793a6c34d9bec27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101762
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-15 21:06:51 +00:00
Austin Eng 44754c529f Revert "Remove code to set Vulkan backend debug labels"
This reverts commit c1f5112462.

Reason for revert: underyling issue in crbug.com/dawn/1539 fixed

Original change's description:
> Remove code to set Vulkan backend debug labels
>
> This is hitting a memory corruption issue inside the NVIDIA driver.
> Speculatively delete the code in the Vulkan backend until further
> analysis finds the root cause.
>
> Bug: dawn:1539
> Change-Id: Ie7bf5bed31976da5f13325c81033e787c4d376b9
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102100
> Reviewed-by: Loko Kung <lokokung@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: dawn:1539
Change-Id: Ic1e4c4ad05abd6f2e244e4a5364bf54e6288cffb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102107
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
2022-09-14 18:36:18 +00:00
Austin Eng 945e2642d6 Fix race with FencedDeleter and VkShaderModule labels in async creation
FencedDeleter does not need to be used at all since we were deleting
a yet-to-be-used VkShaderModule.

Also, set the VkShaderModule label before cache deduplication since to
avoid a race where the VkShaderModule is in use by another thread.
The other thread may also be setting the label, or using it in a
pipeline creation.

Bug: dawn:1539
Change-Id: I5e3d7ce214c4c089c9cc3272f373aa8233017965
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102105
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
2022-09-14 18:13:17 +00:00
Jiawei Shao 060137a712 Replace NULL with nullptr
This patch replaces NULL with nullptr as nullptr is preferred as null
pointers in Chromium coding style.

Bug: None
Change-Id: Ie6ab9d606d791bad2c50001815062c22e9ec0d25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102102
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-09-14 14:39:37 +00:00
Wang Qing cd86adaf41 loongarch: Add ASSERT() breakpoint support on loongarch architecture.
Bug: dawn:1506
Change-Id: Icff59529676c1f2ad3b9e1779577cad467866797
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102146
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-09-14 13:31:37 +00:00
Shrek Shao b74ca3f8e0 Block NaN and Inf constants value as invalid
Bug: chromium:1362412
Change-Id: Ie3b8c447677ebb4bc12177a5dc4fd92d9033a359
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Shrek Shao <shrekshao@google.com>
2022-09-14 13:13:07 +00:00
Stephen White 05d8b02b0f GLSL: implement host-visible memory padding.
Since GLSL ES does not support the offset= attribute, struct members
with explicit @align or @size attributes require adding explicit
padding members.  This in turn requires rewriting any constructor
calls to initialize the new padding to zero, handled in the same
transform.

Note that this is currently overly-verbose, and will add padding where
GLSL doesn't technically need it (e.g., padding a vec3 out to 16 bytes).

Bug: tint:1415
Change-Id: Ia9ba513066a0e84f4c43247fcbbe02f5fadd6630
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101720
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-13 19:48:51 +00:00
Austin Eng c1f5112462 Remove code to set Vulkan backend debug labels
This is hitting a memory corruption issue inside the NVIDIA driver.
Speculatively delete the code in the Vulkan backend until further
analysis finds the root cause.

Bug: dawn:1539
Change-Id: Ie7bf5bed31976da5f13325c81033e787c4d376b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/102100
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-09-12 21:43:21 +00:00
Brian Sheedy 3ada731606 Expand Mac Metal Intel suppression
Expands a couple of existing suppressions to also apply to Mac 12.5, as
the issue still occurs after the upgrade from Mac 12.4 to 12.5.

Bug: dawn:1462
Change-Id: Iba0041fd0f9deafeb3fb770867ffa2e2e4d12553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101901
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-09-09 21:26:19 +00:00
shrekshao 14579b9da3 Add Overrides implementation for OpenGL/OpenGLES backend
As we are using SubstituteOverride, it is easy to add
overridable constants support for OpenGL/OpenGLES.

Also add validate workgroup size for null backend.

Bug: dawn:1537, dawn:1504
Change-Id: I293f10b9a6c606aee6c0ed25b1d966bc56a0b88d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101800
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-09-09 00:49:08 +00:00
Brandon Jones 7edef20bdd Add AHardwareBuffer support
Initial pass at adding AHardwareBufferSupport so that Dawn can display
content on Android. Confirmed that this will allow many WebGPU pages to
render when paired with
https://chromium-review.googlesource.com/c/chromium/src/+/3877262

Bug: dawn:286
Change-Id: I627fa2ab71f85bd3cb7ea21b0588dbd2089cdf5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101460
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-09-08 23:03:28 +00:00