Commit Graph

2168 Commits

Author SHA1 Message Date
Jiawei Shao a84acc4fcc Enable CompressedTextureZeroInitTest on Win/Intel/Vulkan
This patch enables all the tests in CompressedTextureZeroInitTest
on Windows/Intel/Vulkan after the upgrade of Dawn try bots.

BUG=dawn:601
TEST=dawn_end2end_tests

Change-Id: Ida4278ae50ef45b2347462be986e5490a921f988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36560
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-01-06 02:30:09 +00:00
Austin Eng ad0bec6c96 Revert "Update PrimitiveTopologyTests to use WGSL"
This reverts commit b9641b8225.

Reason for revert: Suspect causing Dawn roll to fail

Original change's description:
> Update PrimitiveTopologyTests to use WGSL
>
> A rebased fork of https://dawn-review.googlesource.com/c/dawn/+/33774
>
> Bug: dawn:572
> Change-Id: Icb24ac5b62984e9b093e61077155b9a1eafb344b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35801
> Commit-Queue: Ben Clayton <bclayton@google.com>
> Auto-Submit: Ben Clayton <bclayton@google.com>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,bclayton@google.com

Change-Id: Ib6fe527f28cf17f8f8e817c59121e357b9b65cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:572
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36520
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-06 00:07:21 +00:00
Austin Eng b9641b8225 Update PrimitiveTopologyTests to use WGSL
A rebased fork of https://dawn-review.googlesource.com/c/dawn/+/33774

Bug: dawn:572
Change-Id: Icb24ac5b62984e9b093e61077155b9a1eafb344b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35801
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-05 15:24:29 +00:00
Austin Eng 200941c797 dawn_wire: Return early in callbacks after the server is destroyed
After the server is destroyed, the server's can't do anything like
forward callbacks to the client. Track this with a weak_ptr and
return early if it has expired.

It also updates device destruction in dawn_native so the lost
callback is always called, even on graceful destruction. This
is consistent with the rest of WebGPU where all callbacks are
guaranteed to be called in finite time.

Bug: chromium:1147416, chromium:1161943
Change-Id: Ib80dea36517401a2b8eafb01ded255ebbe757aef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2021-01-05 08:37:08 +00:00
Austin Eng e3fd026108 Use a common helper for std::nothrow
It's come up multiple times that ASAN doesn't support
std::nothrow which leads to OOM bugs filed by the fuzzers.
Use a common helper to avoid this and return nullptr for large
allocations when ASAN is enabled.

Bug: none
Change-Id: I492b4ff4e498cf82d4ca08ba849671d3d16b9cfb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36280
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-05 07:40:48 +00:00
Hao Li c120b02dbe Remove internal resolve buffer from Timestamp compute shader
In timestamp compute shader, we will create an internal buffer for
resolving QuerySet and use it as input buffer in compute shader,
the user-provided resolve buffer is used as output buffer.

This will cause the buffer zero initialization to be called twice,
one is the internal buffer is zero initialized in ResolveQuerySet,
antoher is the user-provided buffer is tracked as pass resource
and need to be initialized. But for ResolveQuerySet(), we expect
there is only once.

We have no special requirements to have an internal buffer. It is
possible to directly use the user-provided buffer for read and
write becuase it will get STORAGE_INTERNAL usage.

Bug: dawn:434
Change-Id: Ia8c8ac6e9ba23fea31468a6d9b4580eece189be2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36201
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-05 04:49:08 +00:00
Hao Li cdbd295cc6 Get timestamp period from device
- Get timestamp period on each backend
  D3D12: Get GPU frequency(HZ) from queue and calculate the period in ns
  Vulkan: Get timestampPeriod from device properties
  Metal and others: don't need the period

Bug: dawn:434
Change-Id: Ia5588a3dccadfe92d7384b9fdf1e6848c6e5c6e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-05 02:39:18 +00:00
Jiawei Shao 4110684aa0 Vulkan: Fix a bug in the impl of T2T copy with 2D array textures
This patch fixes a bug in the implementation of the toggle
UseTemporaryBufferInCompressedTextureToTextureCopy on Vulkan backend.
The previous implementation only considered the T2T one-layer copies,
which will cause the validation error by Vulkan validation layer. This
patch fixes this issue by adding the missing support of multi-layer
copies.

This patch also fixes the failures in the WebGPU CTS tests
color_textures,compressed,array,* on the Linux/Vulkan backends with
Vulkan validation layer enabled.

BUG=dawn:42, chromium:1161355
TEST=dawn_end2end_tests

Change-Id: Ic437919a843b8439d267b8d75b27ade3a9e7bcae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-01-05 00:40:30 +00:00
Corentin Wallez da2d927bb1 Add TypeTraits.h for Dawn's additional type traits.
Adds the first type trait that checks that the equality operator is
defined for two types.

Bug: dawn:441
Change-Id: Ied80c5d876739272c07d513727a3ee709a721eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35522
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-04 15:05:29 +00:00
Carl Woffenden 9f0b827df1 Minor fix to build with MSVC: Removes constructor ambiguity
Fixes error C2440: 'return': cannot convert from 'dawn_native::Aspect' to 'Result<dawn_native::Aspect,dawn_native::ErrorData>'

Change-Id: Ia63ced7fe9582c88a4173db008226733bdd06cac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36080
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-04 13:28:29 +00:00
shrekshao 86980018b3 Invalidate sampler with maxAnisotropy = 0
Bug: dawn:568
Change-Id: Ic0eee693a91153e2447c8f9830919f74c08fde48
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2020-12-30 19:47:33 +00:00
Austin Eng 9a38e5b60d Make HLSL cache key guard comment ASSERT more specific
SPIRV-Cross still emits some comments, so for now, just check that
the specific guard comments Dawn uses are not contained in the HLSL
output.

Bug: dawn:549
Change-Id: Ia6d32befa5ef983e56494542d46e9c3592b6480a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-29 22:22:22 +00:00
Jiawei Shao 0eb61724c8 Enable CompressedTextureFormatTests on Win/Intel/Vulkan
This patch enables CompressedTextureFormatTests on Win/Intel/Vulkan
after the upgrade of Windows try bots.

BUG=dawn:42

Change-Id: Ifad6634973ef30af7f416798973325a5fa7cbe67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35920
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-28 18:31:10 +00:00
Stephan Hartmann c8d5277e86 IWYU: add missing include for ceil
Bug: None
Change-Id: I345750e63c1d81d85c722055e193abe4625a2603
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36083
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-12-24 03:20:37 +00:00
shrekshao f8c5e4ab74 Add maxAnisotropy to GPUSamplerDescriptor
Adds some maxAnisotropy implementation.
Adds an end2end test, drawing a slanted plane with a texture of which each mipmap has a different color, with different maxAnisotropy values.
You can get an idea of what it does at https://jsfiddle.net/t64kpu81/85/
Needs further CTS.

Bug: dawn:568
Change-Id: I89ac56d8cf0fbb655358bf6effa016ddc1f8426f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35143
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-12-24 03:11:17 +00:00
Hao Li c08276644f Add maximum limitation for query count in CreateQuerySet
- Limit the maximum query count to 8192 to fit Metal restriction.
- Add unittest tests of query count and remove the test of buffer
size overflow validation on 32-bits.

Bug: dawn:434
Change-Id: Ie573b715cc3f67ec158996119a8b4a49e493680a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36021
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-24 02:57:07 +00:00
Austin Eng 700809a7f7 Update BindGroupTests to use WGSL
Bug: dawn:572
Change-Id: I1e7cd05ff184f7d26a75006d10b216aea28abb04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32513
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-23 19:54:30 +00:00
Austin Eng b3ab21e1e2 Update GpuMemorySynchronizationTests to use WGSL
Bug: dawn:572
Change-Id: Ie16558bc104557603df99c9976b744a685592247
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33765
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-23 19:42:00 +00:00
Jiawei Shao a4fb42ac92 Enable two dawn_end2end_tests on Win/Intel/Vulkan after bot upgrades
BUG=dawn:491

Change-Id: I94aef91200ad1a9f96abd19b00a04000b0595e2d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36240
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-23 19:07:30 +00:00
Austin Eng 33bf309c1d Update OpArrayLengthTests to use WGSL
Bug: dawn:572
Change-Id: Iba92adda4758fc91294f7c6d8b0be3065c786f71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33773
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 20:11:48 +00:00
Austin Eng 04e3078a64 Update DepthStencilSamplingTests to use WGSL
Bug: dawn:572
Change-Id: I8e90175e2201250ca7e67ec955226871bdb70a97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32514
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 20:03:48 +00:00
Austin Eng 600798bdb1 Update BufferZeroInitTests to use WGSL
Bug: dawn:572
Change-Id: Id194127831e54623df135b415ec2619016c6c6cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32512
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:56:49 +00:00
Austin Eng 84997c5ee9 Update ViewportOrientationTests to use WGSL
Bug: dawn:572
Change-Id: Ifef4f75dcfd0077e3361ea0854cddf3e78e84a02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33887
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:56:48 +00:00
Austin Eng 65ae78ef52 Update ViewportTests to use WGSL
Bug: dawn:572
Change-Id: I08672a402205d4bcac278a1bdcf5d1befa46015c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33771
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:50:18 +00:00
Austin Eng 6442400bdd Update CreateReadyPipelineTests to use WGSL
Bug: dawn:572
Change-Id: If9c35023a62a1506fe968b30d822ced86c8a1465
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32507
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:49:48 +00:00
Austin Eng 241cd0cd8e Update PrimitiveTopologyTests to use WGSL
Bug: dawn:572
Change-Id: I9275ad78e6222b33372f5640b07801b815670fa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33774
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-22 19:24:28 +00:00
Ben Clayton 58ce2745cd dawn_native/vulkan: Use EmitVertexPointSize transform
Fixes validation errors when drawing with point topologies, and without explicitly writing to the PointSize builtin.

Fixed: tint:321
Change-Id: I3c00c5ee56966a82d9e3024cb277eae8921a9af2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-22 18:10:58 +00:00
Jiawei Shao 03d0309255 Vulkan: Fix a typo in SwapChainVk.cpp
BUG=dawn:269

Change-Id: Iacda4d222a81a4ed9e4c623a73e59019cfd6a2c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36180
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-22 17:35:18 +00:00
Hao Li afcef3ee90 Query API: Test the accuracy of timestamp compute shader
Because the uint64 is not supported on all GPU drivers, we use uint32
and float to simulate the multiplication of uint64, but there is
accuracy loss between the results and the expected results computed by
uint64. This test checks that the accuracy loss is less than 0.2%.

Bug: dawn:434
Change-Id: I6f5c842b6915f101441886bdfa4f9feb2827d174
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34120
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 06:55:36 +00:00
Jiawei Shao 3272f9da37 GLES: Fix a bug in the impl of CopyBufferToTexture() with compressed formats
In OpenGL ES glPixelStorei() doesn't affect the execution of
glCompressedTexSubImage*D(), and GL_UNPACK_COMPRESSED_BLOCK_* is not
defined in OpenGL ES, so on the OpenGL ES backends, to implement
CopyBufferToTexture() with compressed texture formats, we can only copy
the compressed texture data once per compressed block row.

With this patch CompressedTextureBCFormatTest/* can pass on Intel Mesa
OpenGL ES driver.

BUG=dawn:42, dawn:580
TEST=dawn_end2end_tests

Change-Id: Ied84a187beaf9105d3664c4e874b3b7ddda4e4b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-12-22 00:38:56 +00:00
Brandon Jones 3af532b8a8 Update BindingInfo to reflect new BindGroupLayoutEntry structure
Changes the internal BindingInfo structure and any references to it. The
BindGroupLayoutEntry information is normalized when converting it into
the internal representation, but still accepted as either the old or
new layout. A "bindingType" member is added to the BindingInfo that's
not present in the BindGroupLayoutEntry itself to indicate which of
buffer, sampler, texture, or storageTexture is populated. This proves
useful for a myriad of switch statements in the various backends.

Bug: dawn:527
Change-Id: I6ae65adae61d0005fc50ed6d1bc2ec9b2a1295ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35862
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
2020-12-21 20:14:26 +00:00
Jiawei Shao ec56b90cea Skip all the dawn_end2end_tests using glTextureView() on GLES
This patch skips all the dawn_end2end_tests using glTextureView() on the
OpenGL ES backend as glTextureView() is not available in OpenGL ES.

With this patch all the dawn_end2end_tests will be able to run on Intel
Mesa OpenGL ES drivers with no crash.

BUG=dawn:580

Change-Id: I420eebfd699edf745bd08cb941f3143aad2fbd06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36040
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-21 18:36:16 +00:00
Austin Eng 64c5d601f8 Update ComputeStorageBufferBarrierTests to use WGSL
Bug: dawn:572
Change-Id: I42e971b843807602ba91f5df0aa692569ec31521
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32511
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:44:07 +00:00
Austin Eng d10774c42f Update DynamicBufferOffsetTests to use WGSL
Bug: dawn:572
Change-Id: I73d987e8ab09120014d2d5c802bd08f08c33bdbd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33775
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:41:57 +00:00
Austin Eng ee977a0df8 Update MultisampledSamplingTests to use WGSL
Bug: dawn:572
Change-Id: Id488b3e08c57036508f4f0a5120d6bf020b4a782
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33884
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:23:27 +00:00
Austin Eng 02436022ae Update DepthStencilCopyTests to use WGSL - FragDepth
Bug: dawn:572
Change-Id: If21d9b7d85394d56f38b079370d9333d342c0b44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33885
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:20:27 +00:00
Austin Eng 8d38c0164c Autogenerate all of the wire callback mocks
This makes it less manual code and less error prone to
add new callbacks to the wire.

Bug: dawn:384
Change-Id: I8547af2dba8289d1badd41e53dd732c776fb5d06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35600
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-17 17:59:37 +00:00
Corentin Wallez 5ca12a825c Introduce SubresourceStorage (3/N): Inline data
This CL changes SubresourceStorage to have an inline storage for the
per-aspect compressed data and allocate the storage for decompressed
data lazily. This will avoid the large performance cost of allocations
in the happy case.

Bug: dawn:441

Change-Id: Iae1cab87b699cb0e60031abe7306cdff92fbd049
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35521
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-12-17 15:56:27 +00:00
Brandon Jones b31cd871ad Update majority of tests to use new BindGroupLayoutEntry format
Converts most of the tests to use the new layout, with the exception
of a few that are dependent on additional Dawn changes before the
conversion can happen. The deprecation warning is not enabled yet
due to these remaining changes.

Bug: dawn:527
Change-Id: Idcfd9fc873756f5a9f88de2ce9ab65c66b79bf39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35582
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 00:19:34 +00:00
Ben Clayton 307ece1630 end2end: Enable textureLoad() tint tests
These are fixed by:
https://dawn-review.googlesource.com/c/tint/+/35423

Fixed: tint:399
Change-Id: I81d6e88083afa07b31d4b4b750a221d2be31d942
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35722
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2020-12-16 18:37:10 +00:00
Kai Ninomiya cf820d79ef Rename STRIDE_UNDEFINED to COPY_STRIDE_UNDEFINED
Per https://github.com/webgpu-native/webgpu-headers/pull/71

Keeps but deprecates WGPU_STRIDE_UNDEFINED/wgpu::kStrideUndefined.

Bug: dawn:520
Change-Id: Ied162ec39454fac3d16a3782c9ed6d2f68c1d41d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34926
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
2020-12-16 07:53:30 +00:00
Ryan Harrison fea4c14580 Fix missing include that causes Skia builds to fail
One of the issues blocking Dawn->Skia rolls

Change-Id: Ia3c68edd2c2745586dfb6a778e3a493df20aa66d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35820
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-15 19:59:59 +00:00
Brandon Jones b35ae00239 Fix erroneous validation logic for BindGroupLayoutEntry
https://dawn-review.googlesource.com/c/dawn/+/34921 introduced a couple
of bugs. This CL fixes them and tests to ensure that the new validation
logic is working correctly.

BUG=dawn:527

Change-Id: Ief01dfda0b97a202bf12ff6aeb0e7a3b84b4b81c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35700
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-15 17:32:59 +00:00
Corentin Wallez e0a4d8f209 Fix comment that says "control case" when it isn't.
Bug:
Change-Id: I414bdabeeb12ed53c0620ead80d54a1448bb95bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35720
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-15 16:49:29 +00:00
Ben Clayton 56996023fe end2end: Enable DepthReplacing tint tests
These are fixed by:
https://dawn-review.googlesource.com/c/tint/+/35500

Fixed: tint:329
Change-Id: I33105e392c6dfbe75a4d716fe98805dbe696c2ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35721
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
2020-12-15 16:33:19 +00:00
Corentin Wallez 0faa66ab2b Introduce SubresourceStorage (2/N): Merge
This CL adds the Merge() operation to SubresourceStorage() that allows
modifying the content of a storage with another storage.

Bug: dawn:441

Change-Id: I28e3cd7bc967056eda2c387b2b6e164eb370a241
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-15 13:10:08 +00:00
Ryan Harrison 43c39a1ba4 Re-enable disabled unit tests
The issues causing these tests to fail with the Inspector enabled have
been resolved.

BUG=dawn:578

Change-Id: Ie0b7b4d6b2d1a3b432f4eed7542c64e31bf44fdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35680
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-14 20:45:08 +00:00
Brandon Jones 9c52c2997c Updating BindGroupLayoutEntry interface to match latest spec
Updates BindGroupLayoutEntry to allow for the newly split-up descriptors
that define each binding type in it's own member (buffer, texture, etc.)
The previous style of descriptor is still supported but is deprecated.

For the sake of keeping the scope reasonable, this change does not alter
the BindingInfo structure that's used internally by the various
backends. That will come as a followup.

Bug: dawn:527
Change-Id: I2f301f5f36fa2ce7ff15126ac90dc4c19d5e32ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34921
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-12 02:09:56 +00:00
Corentin Wallez 9229175811 Introduce SubresourceStorage (1/N)
This CL adds the start of the implementation of a SubresourceStorage<T>
container class that stores per-subresource state in a compressed
fashion. Only the getter methods and Update() modifying methods are
added because they are the first step necessary to test the behavior of
SubresourceStorage.

Subsequent CLs will:
 - add the Merge() operation
 - move the per-aspect storage to be inlined and avoid allocation of
mData and mLayerCompressed if possible
 - use the container where applicable in dawn_native
 - (maybe) move clear-state tracking in the backends as part of barrier
tracking

Bug: dawn:441

Change-Id: Ic93e5af16dd705b260424f05e4dc3e0c9f6fbd0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34464
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-12-09 15:38:27 +00:00
Austin Eng 30805557e6 Enable use_tint_generator w/ test suppressions for SPIR-V based backends
This runs dawn_end2end_tests both with/without use_tint_generator on
Vulkan, OpenGL, and OpenGL ES backends. This is a temporary solution
until we add an dawn_end2end_use_tint_generator_tests suite in the
bot configuration after all backends can support use_tint_generator or
have the appropriate test suppressions.

Bug: dawn:571
Change-Id: I44ab0ba7261160e34dbad512d98602427dc7e966
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35044
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-08 16:49:34 +00:00