Commit Graph

2550 Commits

Author SHA1 Message Date
Stephen White 8f0e6ce926 Skip SamplerFilterAnisotropicTest.SlantedPlaneMipmap on OpenGL ES.
Bug: dawn:648
Change-Id: I2f9c110bbe0041c881362cb2a40c4cdcf9b7b6af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38822
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 15:45:11 +00:00
Stephen White 032500baa3 Skip failing MultipleWriteThenMultipleReadTests.OneBuffer on OpenGL ES.
Bug: dawn:580 dawn:646
Change-Id: Id8238ab041b6bd969945d6581a1fd2808daf2cdc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38820
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 15:01:18 +00:00
Stephen White f9582c8aa5 Skip failing TextureFormat tests on SwANGLE.
Same underlying failure as SwiftShader.

Bug: dawn:580 dawn:147
Change-Id: I57c88ce6afaf7014f3cd4487b04ddab93b248d15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38783
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 13:05:14 +00:00
Stephen White d27ed11d0b Fix glFramebufferTextureLayer warnings generated by ANGLE
We shouldn't be using glFramebufferTextureLayer on 2D textures.
Also, the "attachment" was wrong (GL_COLOR vs GL_COLOR_ATTACHMENT0).

BUG: dawn:447

Change-Id: I1e47dfc4e8e88d70d9a1e6585b5d138b82ed3cfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38782
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-26 12:57:58 +00:00
Stephen White 0315c43517 Skip failing multisampling tests on SwANGLE.
Bug: dawn:580, dawn:644
Change-Id: I46d0baa308e2362f1c3c439b941138448c9f02a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38780
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 12:53:38 +00:00
Ben Clayton e0feccacaf Migrate from tint::ast::Module to tint::Program
Depends on: https://dawn-review.googlesource.com/c/tint/+/38556

Bug: tint:390
Change-Id: I12104d80370ddc1a3277770ca051cbd0992b758e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38522
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-26 12:24:48 +00:00
shrekshao b3177d418e Make SamplerDescriptor optional in CreateSampler
Use default SamplerDescriptor if not descriptor is passed in.
Change some createSampler calls to pass nothing in for testing.
The default values for SamplerDescriptor and that from
utils::GetDefaultSamplerDescriptor are different so we may still want to
keep it.

Bug: dawn:599
Change-Id: Ie75d9e1fde608cb19049b50f4613be63802c8719
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38621
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-01-26 02:22:58 +00:00
Stephen White 2a799fe3bf Enable all the tests which were blocked on WriteTexture.
Bug: dawn:483 dawn:643
Change-Id: Id6b6f0d1ff039eda3156bc371e6c722b3c72ac96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38580
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-25 19:42:18 +00:00
Stephen White 988f3daf6e Implement WriteTexture for OpenGL and OpenGL ES.
Bug: dawn:483, dawn:580
Change-Id: I83434211f25372f96b0babe6fbb851d7f114065c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-25 18:16:48 +00:00
Austin Eng 4d66fb2d61 dawn_wire: Implement device-related callbacks for multiple devices
Bug: dawn:565
Change-Id: Ic80a3bc1bbfd479af04e77afa0eb3f4ca3387ecd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38282
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-25 08:38:47 +00:00
Corentin Wallez f1f8394de0 dawn_native: Skip more validation if it is disabled.
Also cache the boolean for IsValidationEnabled in the
ProgrammablePassEncoder.

Bug: dawn:635
Change-Id: I5f095d003d28b84eacbc488a7f8f3c346c646187
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38521
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-23 00:07:46 +00:00
Corentin Wallez 045bb95973 Do not track global texture usage in PassResourceUsage.
The global resource usage was used for two things:
 - Validating that the texture had the required usage, but this was
removed in a previous commit in favor of checking the texture's usage at
the encoding entrypoint.
 - Skipping laz-clearing of the texture if it was used as
RenderAttachment. This was incorrect and would skip clearing of all of
the texture's subresource as long as one of them was used as
RenderAttachment.

This commit make PassTextureUsage exactly a
SubresourceStorage<TextureUsage> and fixes the logic for skipping
the clearing or RenderAttachment. It also adds a regression test for the
lazy clearing fix.

Bug: dawn:635
Change-Id: I5d984febb3e5a5f9ae15b632cac68e294555c4e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38382
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-22 19:53:46 +00:00
Corentin Wallez 49a1f72a4f Rename leftover references of output attachment to render attachment.
The CL doing the renaming didn't handle comments and the one string
where "output attachment" appeared.

Bug: None
Change-Id: Ie57159da8278970097271fa5706573444bcdaf61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-22 19:51:37 +00:00
Corentin Wallez 2c32fa6476 Make ComboVertexStateDescriptor non-copyable non-movable.
The VertexState tests were failing on MSVC debug x64 because the
ComboVertexStateDescriptor was copied but internal pointer to
itself weren't updated. This commit makes the structure non-movable and
non-copyable so the problem doesn't happen in the future and fixes
compilation errors.

Bug: dawn:602
Change-Id: Idd3a68933920eb47939217362e9e137dd7581014
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38400
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-22 17:51:45 +00:00
Austin Eng db1572102b d3d12/vulkan: Skip descriptor update/creation if resource is destroyed
Validation of resource destroy state does not happen on bind group
creation. It happens on queue submit. This means the Vulkan and D3D12
backends need to gracefully handle BindGroup creation with destroyed
resources by skipping the descriptor creation if the resource has
been destroyed.

Bug: dawn:319
Change-Id: I270afba86d1a961e1e4c39f2419d8c34ff889e46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38440
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-01-22 17:10:36 +00:00
Corentin Wallez 72cd1a5e89 dawn_native: Move beginRenderPass texture usage validation into the encoder
In a future CL the PassResourceUsage structure will become a
SyncScopeResourceUsage and will be used to validate at each
synchronization scope. For separation of concerns, the validation that
resource have the correct usage shouldn't be done at the sync scope
level but at each entrypoint that uses the resource.

The validation tests had missing coverage of usage validation for
BeginRenderPass so validation tests are added. (Storage and Sampled
are validated at bindgroup creation and already had validation tests)

Bug: dawn:635
Change-Id: I36488c2d0222c4799476adf06c1c734989b1a158
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38381
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-22 11:31:08 +00:00
Corentin Wallez 7479128589 Remove QueueWriteBufferTests.ManyWriteBuffer on Intel Vulkan
This issue has been fixed in the Mesa version that's on the bots.

TBR=enga@chromium.org
Bug: chromium:980737
Change-Id: I5e6ec58344fb065c12ba0ca6a3cad1468dd7df11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38520
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-22 10:13:07 +00:00
Corentin Wallez 310d86f4a0 dawn_native: Move pass validation of buffer usages into the encoder.
In a future CL the PassResourceUsage structure will become a
SyncScopeResourceUsage and will be used to validate at each
synchronization scope. For separation of concerns, the validation that
resource have the correct usage shouldn't be done at the sync scope
level but at each entrypoint that uses the resource.

The validation tests had no coverage of usage validation for pass usage
so validation tests are added for Indirct/Index/Vertex usages. (Uniform
and Storage are validated at bindgroup creation and already had
validation tests)

Bug: dawn:635
Change-Id: I5058ad30eb041809f0f60d9403f3cc2d5d7e7c96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38380
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-22 09:57:38 +00:00
Jiawei Shao db383498c5 Allow using DepthOnly aspect on the depth-only formats in T2T copies
This patch allows the use of DepthOnly as the parameter 'aspect' in the
command CopyTextureToTexture() on the depth-only formats (Depth24Plus
and Depth32Float) to match the latest WebGPU SPEC.

BUG=dawn:439
TEST=dawn_unittests

Change-Id: I73c4055bb0a90bed2b5751ce9dff5b319787efca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38340
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-22 01:36:43 +00:00
Austin Eng 45ce1fda88 dawn_wire: Add an API to reclaim reserved devices and textures
Dawn Wire has a way to reserve an ID and generation on the client side,
but if these reservations are never injected on the server, then
it will be impossible to reclaim the in-use ObjectIDs.

Bug: dawn:565
Change-Id: I751fce237c881e8cbdeaba18ad0ec1e124bd7ac2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38281
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-01-22 00:25:05 +00:00
Austin Eng cef68bc8b7 dawn_wire: Fix a bug with multiple injected devices
Device child objects were storing an *unstable* pointer to device
specific tracking information. Fix this by moving the tracking
information to a stable heap allocation.

Bug: dawn:565
Change-Id: I00ad72563ac66e29314603e77698718953fcbf15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38280
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-21 23:15:43 +00:00
Ryan Harrison 001b499275 Adding stage input/output reflection to inspector path
BUG=dawn:578

Change-Id: I15d0c9df81c606ea0def1a2d3fc550224f7dcfd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-01-21 16:17:31 +00:00
dan sinclair c2032ea637 Update vertex index decoration names.
This Cl updates the `vertex_idx` to the new `vertex_index` decoration
name.

Change-Id: Ic3688e1af87ed0d570b00ccb72d0e84ac920831b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38142
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-21 15:41:20 +00:00
Corentin Wallez 534517ca63 Vulkan: Enable barrier validation using VK_EXT_validation_features.
This found a couple issues with readonly storage textures and buffers
and will prevent regression in the correctness of barriers in the Vulkan
backend.

Bug: dawn:635

Change-Id: I99f77134eff62c466d010c4f301f7e79de0b4977
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38021
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-21 14:44:20 +00:00
Ben Clayton 7b615af00c TextureFormatUtils: Remove unused functions
GetColorTextureComponent[GLSL,WGSL]TypePrefix() are no longer used.

And also move the two remaining WGSL functions together, and rename for consistency's sake.

Change-Id: If70f195b7185fca9337ec5c12c74efa25ae6ce4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37901
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-21 14:18:19 +00:00
Ben Clayton 88f7f580bc Convert StorageTextureValidationTests to WGSL
Bug: tint:140
Bug: tint:368
Change-Id: I6593e40db5db4058bf6fdf3303ec7e99c0a3df12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37900
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-21 14:16:09 +00:00
Corentin Wallez 2231fcda56 Vulkan: Add support for layer extensions.
This commit generalizes the way layers are handled to be more like
extensions, and adds support for gathering and enabling layer
extensions.

This is in preparation for using the VK_EXT_validation_features
extension to enable barrier validation.

Also adds logic to use the Fuchsia swapchain layer when it is available.
It seems to have been removed by mistake some time ago.

Bug: dawn:635

Change-Id: I8e5776d546ddd7940238465c7b0f187d8dd3c5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38104
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-21 13:47:19 +00:00
Corentin Wallez e10e6b0db8 Vulkan: Fix layout of Sampled+ROStorage texture.
Vulkan requires that storage images be in the GENERAL layout, and requires
that we choose a layout at VkDescriptorSet creation. This means that
since Sampled+ROStorage texture may sometimes be used as both usages in
the same pass, they must always be in the GENERAL layout even for
SampledTexture bindings.

Fix this by looking at the texture's creation usage in VulkanImageLayout
for wgpu::TextureUsage::Sampled.

Also add a regression test that triggers a Vulkan Validation Layer error
without this fix.

Bug: dawn:635

Change-Id: I4a5b94e1af20839b3b8cc080d36fca59d79f09bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38107
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-21 12:44:09 +00:00
Corentin Wallez f091fb71f7 Vulkan: Use ityp::bitset for Instance/DeviceExtSet
ityp::bitset allows the creation of a bitset indexed by enums. Use this
instead of our custom wrapper around bitset that only supports .Set and
.Has.

Bug: dawn:635
Change-Id: I6680feb9b1741648d974cf1cef48cb1863aa20af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38103
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-21 12:12:59 +00:00
Corentin Wallez ef869c2d01 Use SubresourceStorage to track per-subresource state.
Using this container is a small performance regression in the simple
cases where all subresources are the same, or when the texture has few
subrsources. However it give better performance in the hard subresource
tracking cases of textures with many subresources.

Using SubresourceStorage also makes it easier to work with compressed
storage since the compression is mostly transparent. It reduces code
duplication and prevent bugs from appearing when a developer would
forget to handle compression.

This fixes a state tracking issue in ValidatePassResourceUsage where the
function didn't correctly handle the case where the PassResourceUsage
was compressed.

Also removes the unused vulkan::Texture::TransitionFullUsage.

Also makes SubresourceStorage<T> only require operator== on T and not
operator !=.

Also fixes the texture format's aspect being used to create pipeline
barriers instead of the range's aspects.

Bug: dawn:441

Change-Id: I234b8191f39a09b541c1c63a60cccd6cee970550
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37706
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-21 11:07:44 +00:00
Corentin Wallez 738aa17493 EnumMaskIterator: ASSERT when the mask is too big.
This will catch errors when someone updates an enum used with
EnumMaskIterator without updating EnumBitmaskSize. Previously it would
just ignore the extra bits, which produced super confusing bugs.

Bug: dawn:635
Change-Id: Ib0bf3f252db317a1bfdeb687b2426801a79b524d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-21 10:11:54 +00:00
Corentin Wallez 762814bd92 ityp_array: Allow using a T whose underlying type is signed.
When trying to use ityp_array with an enum class whose underlying
type is int, warnings were fired because of a comparison between signed
and unsigned integers. Fix this by explicitly casting Size to `I` using
a constructor cast.

Bug: dawn:635
Change-Id: I5ee0101684e5847ec5ec6f71a9657fcce839a2a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38106
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-20 20:01:08 +00:00
Corentin Wallez 25dc10cee7 Vulkan: Fix texture barriers for readonly storage.
One of the helper methods to compute texture barriers didn't handle the
kReadOnlyStorage usage, which made barriers issued too small.

Issue was caught by running
StorageTextureZeroInitTests.ReadonlyStorageTextureClearsToZeroInRenderPass
with the Vulkan barrier validation enabled.

Also renames kReadonlyStorageTexture to kReadOnlyStorageTexture for
consistency.

Bug: dawn:635
Change-Id: I6e6027c380672dcdaea789c811665536b446003e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38101
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-20 19:39:28 +00:00
Corentin Wallez 40422659d4 Vulkan: Fix buffer barriers for readonly storage.
Some of the helper methods to compute buffer barriers didn't handle the
kReadOnlyStorage usage, which made barriers issued too small.

Issue was caught by running the GpuMemorySynchronizationTests with the
Vulkan barrier validation enabled.

Bug: dawn:635
Change-Id: Ice76edd21b2fa1c25cf9922418f65cfa7d802bdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-20 19:29:38 +00:00
Corentin Wallez f83df90fae Vulkan: use VK_EXT_debug_utils instead of deprecated extensions.
The previous VK_EXT_debug_report and VK_EXT_debug_marker extensions were
both deprecated in favor of VK_EXT_debug_utils. This commit makes Dawn
follow the ecosystem and also adds more detailed reporting of why
vkCreateInstance fails that's now supported in VK_EXT_debug_utils.

Bug: dawn:635

Change-Id: I61c89da1fd55f26d7ccf91723feedfb354efbc16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38020
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-20 19:19:08 +00:00
Stephen White 55af59b47f Implement a glCopyImageSubData() workaround for OpenGL ES 3.1
This implementation uses glBlitFramebuffer().

Bug: dawn:638

Change-Id: I4ff62967c815a7e4b04348930539b27bddf44580
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38145
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-20 17:27:27 +00:00
Jiawei Shao 064f33e441 Implement WaitableEvent and WorkerTaskPool for multi-threaded tasks
This patch adds the basic implementation of WaitableEvent and
WorkerTaskPool for multi-threaded tasks in Dawn (for example, the
multi-threaded implementation of CreateReady*Pipeline()).

BUG=dawn:529
TEST=dawn_unittests

Change-Id: Ibf84348f4c0f0d26badc19ae94cd536cef89d084
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-01-20 08:56:07 +00:00
Enrico Galli 311a17a8fe D3D12: Add firstVertex/Instance to vertex/instance_index
Added root constants to emulate the behavior of other APIs under D3D12.
This patch only fixed Draw and DrawIndexed.

Bug: dawn:548
Change-Id: Ic759c22e0db1092f890d45c5db489697b1583827
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37620
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-19 20:29:22 +00:00
Austin Eng 8bcde8e394 dawn_wire: Add Reserve/InjectDevice
Now that the wire does enough tracking to prevent a malicious client
from freeing a device before its child objects, and the device is no
longer a "special" object with regard to reference/release, it is
safe to support multiple devices on the wire. The simplest way to
use this in WebGPU (to fix createReadyRenderPipeline validation)
is to add a reserve/inject device API similar to the one we use for
swapchain textures.

Bug: dawn:565
Change-Id: Ie956aff528c5610c9ecc5c189dab2d22185cb572
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-19 19:27:52 +00:00
Stephen White c053b905b5 Open GL ES: implement a fallback path for glClearTexSubImage().
Also enable the CopyTests on OpenGL ES, since they now pass on 3.2.
Enable all tests that are no longer failing due to crbug.com/dawn/581
and update bug references for bugs which are still failing.

Bug: dawn:581, dawn:636
Change-Id: I6b74143f11dd4e1824551720024be174f2eaa003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-19 18:34:22 +00:00
Ryan Harrison 1dee9164bf Use Tint to extract local workgroup size
BUG=dawn:578

Change-Id: I7526fdcc3ee96099d1487cd159a7bea9210f2b4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38143
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-19 18:09:31 +00:00
dan sinclair 0f9c2d7b78 Update Dawn tests to use group instead of set.
This Cl updates the WGSL used by Dawn to use the new `group` decoration
instead of the deprecated `set` decoration.

Change-Id: I145aaff7721dfafff986ddc429c9cdc9389c2110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38141
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-19 14:18:51 +00:00
Stephen White f09a67061e Suppress depth/stencil copy tests failing on ANGLE.
Also implement a way to check for ANGLE.

Bug: dawn:634, dawn:580
Change-Id: I4b361d02247f91250f1ce31cfbfdd0d74b3b3060
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-18 17:47:07 +00:00
Corentin Wallez 5c20f1ec9c Add the SubresourceTrackingPerf perf test.
This is a performance test in preparation of using SubresourceStorage
in dawn_native. On the Vulkan backend with Swiftshader it shows that
SubresourceStorage will bring a small perf regression for simple cases
(<= 10%) but it that complex cases are improved significantly (up to
twice faster).

Also renames a variable to follow the mMemberName convention.

Bug: dawn:441

Change-Id: I3fec80cba39b7d2aaba08fc8fbd8ea913ed5501c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37041
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-01-18 09:28:27 +00:00
Carl Woffenden 1c84a6b160 Missing header for VS1029 (for commit 8c58491d)
This recently broke in VS2019 (weak_ptr and shared_ptr aren't included).

Change-Id: I88edffa3e965c02d0db83e2efd0977cf86c96800
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38023
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 18:44:19 +00:00
Ben Clayton 8268dc3e43 StorageTextureTests: Use textureNumLayers()
Instead of hardcoding the number of array layers

Bug: tint:140
Bug: tint:437
Change-Id: Ic9ea6a0e2853d8dbc29a840deff0e6938ff5e4d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37849
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 17:36:39 +00:00
Ben Clayton be28fe6d99 StorageTextureTests: Use new access qualifiers
Instead of the old style texture_storage_[r,w]o_* forms.

Bug: tint:140
Bug: tint:368
Change-Id: If33733d1a45f106c052698b37ca6e4deca6b3c26
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37850
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-15 17:32:59 +00:00
Stephen White 54449966dd Workaround ANGLE hang with a glFlush().
Change-Id: Idce1b71bdb132a1b96836d270eb2ab53fd0086f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36700
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 16:35:49 +00:00
Ben Clayton 331b78a739 Convert StorageTextureTests to WGSL
Bug: tint:140
Fixed: tint:368
Change-Id: I339ff9546d21ea236a14dce9815d08fd13bbbbdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37080
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-14 17:07:06 +00:00
dan sinclair 1c6082149a Update texture storage syntax.
This CL updates the WGSL texture storage syntax to use the access
decoration.

Bug: tint:286
Change-Id: I0024a0682c6a6479eb7a8436f8df4c9a76ec5e2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37880
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-14 14:50:16 +00:00
Hao Li 6f833b7f78 Add internal compute pipeline in ResolveQuerySet for Timestamp Query
- Enable internal compute pipeline in ResolveQuerySet for Timestamp
  Query.
- Known issue:
  The user-provided resolve buffer cannot be used as binding resources
  due to missing STORAGE usage. Currently implictly add STORAGE usage
  if the buffer is created with QUERY_RESOLVE usage as a workaround.
  Next we will add STORAGE_INTERNAL usage instead.

Bug: dawn:434
Change-Id: Ie66090de38bc3a04a58986669cd2a128b528f960
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36222
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-14 03:26:08 +00:00
Austin Eng 8c58491d25 dawn_wire: Skip device inject error if the client drops the device
If the client drops the last reference to the device, it would
dereference an invalid pointer upon calling InjectError. So, skip the
call. We can't keep the device alive if the Buffer is still alive
because we intend to make all objects internally null if you delete
their device.

It is ok to skip error injection because if the client deletes the
device, it should not expect to receive any more error callbacks.

Bug: dawn:384
Change-Id: I4c694310e4395b06cd49603fc5d4cd846799decb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37580
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-14 00:51:58 +00:00
Ben Clayton 3639186e7e ShaderModule: Include extra information in shader errors
If the SPIR-V fails to validate, include the SPIR-V disassembly in the error.
If the shader fails to compile, include the shader source in the error.

Change-Id: I05f93b5dec7985c42ddf9cd14621af2a855ee640
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37282
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-13 22:27:08 +00:00
Brandon Jones 2f1278e68b Enabled BindGroupLayout deprecation warning and fixed tests it broke.
This should be the last change BindGroupLayout change needed to complete
the conversion to the new structure aside from removing the deprecated
code paths in the future.

Bug: dawn:527
Change-Id: I44f67de80f1b4e1b7b32909d70d74610f7a06d8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37560
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-01-13 22:25:58 +00:00
Austin Eng 8ba0a01d1e Ensure all wire child objects are destroyed before their device
Destroying a device will implicit destroy all its child objects.
Attempting to use a child object after results in a fatal error.

Bug: dawn:384
Change-Id: I43c27c92cacde759be83cca79ac890f41bac3927
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37002
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2021-01-13 20:58:18 +00:00
Ben Clayton cd9dc36d2e [wgsl]: s/texture_sampled_/texture_
These texture types were renamed in October 2020:
https://github.com/gpuweb/gpuweb/pull/1180

Tint has supported both forms since November 2020:
https://dawn-review.googlesource.com/c/tint/+/31380

Finally migrate to the new form so we can drop support for the old.

Bug: tint:286
Change-Id: Id19b79be28152b3de163f9cce75eefff1ae31d76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37702
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-13 20:29:08 +00:00
Austin Eng 5ad5557667 Remove special-casing of device reference/release in the wire
The wire's device is externally owned so reference/release were no-ops.
To unify the code paths, remove the special casing and instead
take an extra ref on the device the wire server is created with. This
is functionally equivalent and will allow both the current wire code,
and the incoming change to allow multiple device/adapter creation to
both work.

This CL also makes it possible for the client to destroy the device
before child objects.
A follow-up CL will mitigate this on the server side.

Bug: dawn:384
Change-Id: Ic5427074469012dccf8689ec95a848e6ba2c1fc2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37001
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 19:23:48 +00:00
Austin Eng f0d7cc4f5a dawn_wire: Make all objects owned by the client
This removes the logic where the Client owns the Device and the
Device owns all other objects. Ownership should be tracked in
dawn_native either with refcounting or validation to disallow
operations after an object's parent has been destroyed.

This simplifies the wire client code in that the client only
tracks allocated handles and does not manage parent/child lifetimes.
This is an important simplification so we can support multiple WebGPU
instances, adapters, and devices on a single wire.

Bug: dawn:384
Change-Id: I8ecc7c368130b8917202150c467b5f0e7d4b753e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 18:31:47 +00:00
Austin Eng f6ef7530ab Make the Device ref the Instance
This is needed before supporting instances, adapters, and devices on
the wire so that the client cannot free the instance before the device.

In Dawn native, the developer still needs to make sure the device is not
freed before all child objects.

Bug: dawn:384
Change-Id: I863d44c6a8acecc7b8ea0cc0ac483f7a864162fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37003
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 17:54:37 +00:00
Austin Eng 8ef94f1684 Don't forward device lost errors to the uncaptured error callback
This issue was discovered in http://crrev.com/c/2613517 where a
device lost error on page teardown was bubbling up to the Renderer's
uncaptured error callback.

Bug: chromium:1160459
Change-Id: I64b8c7779f4808d5a4b87c131aaf2e041c512bb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36960
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-13 17:53:29 +00:00
Carl Woffenden 558599fc9a Further fixes to build with with VS2019 (end2end tests)
These fix the tests so that the entire of Dawn can now be built with
VS2019. Some details:

Multiples of "error C3493: 'X' cannot be implicitly captured because no
default capture mode has been specified" in BufferTests.cpp. This
appears to be a bug in VS whereby the constexprs need capturing; the
workaround, rather than explicitly name them and change the function
signature, is to make the vars also static.

In DepthStencilSamplingTests.cpp we get "warning C4310: cast truncates
constant value" for uint8_t(256). Rather than try to silence the
warning the test was removed, since the cast will *always* result in
zero, which is also the first in the test values.

To successfully build two further third-party dependencies also require
updating:

https://dawn-review.googlesource.com/c/tint/+/37700
https://chromium-review.googlesource.com/c/angle/angle/+/2624888

Note: whilst this now builds the entire of Dawn with VS not yet all of
the build arguments are supported. Yet to investigate is turning on
optimisations (with is_official_build=true) which attempts to combine
"/INCREMENTAL" with "/OPT:REF" and fails (to be addressed next).

Bug: dawn:602
Change-Id: I37202992f16b999d5627022eeeb6b9fff0d4b60b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37701
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-13 12:25:45 +00:00
Corentin Wallez 111ba65a5e D3D12: Use Texture::Create pattern for swapchain textures
Bug: dawn:269
Change-Id: Ia4b48126c153ddff2feefc1bf04dcc9adc783bd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37421
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-13 08:53:34 +00:00
Mark Sibly 9f9a9785f2 Reset scissor reset before presenting in opengl
The opengl backend uses glBlitFramebuffer to present frames which
is affected by the opengl scissor rect.

Bug: dawn:616
Change-Id: I0b8c3eb7139ab22a98eeb60e3ad16678e3afad5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37101
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mark Sibly <marksibly@gmail.com>
2021-01-13 05:09:24 +00:00
Austin Eng 424fd82889 Update DepthStencilStateTests to use WGSL
Bug: dawn:572
Change-Id: Ia0bc64304cfa91e3c5f0179781eeef0eab21323a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-13 03:10:54 +00:00
shrekshao 7faa362ea9 Fix SamplerFilterAnisotropicTests mipmap
Fix a bug about mipmap level in SamplerFilterAnisotropicTests.
Sizes of the 3 miplevels should be 4,2,1.
The old code allocates 8,4,2 (which don't have a 1x1 level)
Expected rendered pixel values have to change.
The render result now fits the webgl demo at https://jsfiddle.net/t8k7c95o/5/
(Thanks Kai for the enlarged pixelated canvas)

ComputeBoids.cpp and DawnTest.cpp change is due to git cl format

Bug: dawn:568
Change-Id: I9069732208a16be285be13b8cd1ab19b211995a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37380
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-01-12 23:56:54 +00:00
dan sinclair e6ca254c72 Convert WGSL comments to //
This CL updates the tests with WGSL sources to use // for comments
instead of #. This matches the current WGSL spec.

Change-Id: I04e1a18630a16b794955cace7e55a89221c964fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37520
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-12 22:11:14 +00:00
Carl Woffenden 22eff1eb8c Fixes to build with MSVC 2019
When building with MSVC (using 'is_clang=false') various errors are
encountered. This fixes:

- multiple tests/end2end/ColorStateTests.cpp(309): error C2039:
  'transform': is not a member of 'std'

- dawn_wire/server/Server.h(171): error C2248:
  'dawn_wire::server::MapUserdata::MapUserdata': cannot access private
  member declared in class 'dawn_wire::server::MapUserdata'

- variants of the above in Server.h for all the other CallbackUserdata
  subclasses

Bug: dawn:602

Change-Id: I01b1db3fbf67ae170b21a7d890af6162b82a1725
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37420
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-12 19:47:13 +00:00
Corentin Wallez 4b30f93762 Add the correct rpath to use Swiftshader / Vulkan on macOS
Previously the @executable_path rpath was only added when doing
component builds and non-component builds failed to find Vulkan and
Swiftshader on macOS.

Bug: None
Change-Id: I0277566e4bf181703dff26bb1bf3e57858864009
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37442
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-12 19:01:04 +00:00
Bryan Bernhart f600666866 D3D12: Add HLSL compiler version to key
BUG=dawn:529

Change-Id: I84d8edc6022564cda084a0f0de384a4e15e0e1a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-01-12 18:21:33 +00:00
Ben Clayton 64275742e0 ShaderModule: Enable the prettier tint diagnostic formatter
Includes code snippits and squiggles of the offending line(s)

Bug: none
Change-Id: If704b5d1118d0246c16f6e729a10d16363a1169b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-12 08:55:57 +00:00
Carl Woffenden ede229f313 Minor fix to build with MSVC: Removes switch with only default case
Fixes warning C4065: switch statement contains 'default' but no 'case' labels

Change-Id: If9a8f20eaeb2499f71bc25a69e545b3e8b21be4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36081
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-12 08:55:27 +00:00
Ben Clayton 4c5ab90452 ShaderModule: Refactor ParseWGSL() to take a File*
The tint::ast::Module holds a diagnostic list (tint::diag::List) which references the source tint::Source::File.
If you try to enable any of the more pretty diagnostic printing functionality, and attempt to print these after ParseWGSL() has returned, you'll then dereference a pointer to the now stack unwound `tint::Source::File`.
Promote the file up one callstack level to fix this.

Bug: none. Only exposed when using pretty printing.
Change-Id: I9432dd9d668fd1d92efa228bb5ed31278fd3ddfc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-12 08:50:31 +00:00
Hao Li 9ff83f6c95 Query API: Non-precise occlusion query on D3D12
- Implement begin/endOcclusionQuery on D3D12, the query result is binary
  (0/1), so we don't need compute shader on D3D12.
- Add end2end tests with depth/stencil/scissor tests enable/disable

Bug: dawn:434
Change-Id: I7b58987a9bc3e7f9cbcdee83f630aaa166582f5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-12 01:44:01 +00:00
Carl Woffenden e650b38aa6 Minor fix to build with MSVC: Gets content address instead of iterator
Fixes error C2679: binary '-': no operator found which takes a right-hand operand of type 'std::_Array_iterator<_Ty,23>' (or there is no acceptable conversion)

Change-Id: I566b05032da5f68674156eae2901a3f3e7a8acbb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36082
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 20:02:21 +00:00
Yunchao He 0325e4503b Add more constants for max texture sizes
Currently we only implemented 2D and 2DArray texture. kMaxTextureSize
is actually for 2D texture only. This patch adds a few more constants
for texture size for 1D and 3D textures, and changes kMaxTextureSize
to kMaxTextureDimension2D.

Bug: dawn:558

Change-Id: I9088dd7c060dc096a65abea37c7fb01f760524e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-01-11 18:04:12 +00:00
Stephen White 77fcdf7eaa Add ANGLE to Dawn build.
Bug: dawn:447, dawn:580
Change-Id: I77726651ca00d64768bddc0bb476fd920e11851f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35081
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 15:52:12 +00:00
Stephan Hartmann 1670c5184b IWYU: add missing include for size_t
Bug: None
Change-Id: Idbb024aa136da5327caae796876ee80222d46a39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 08:20:02 +00:00
Hao Li c9a22bcb93 Disable timestamp query extension on Metal
Currently it's not clear how to convert timestamps to nanoseconds on
Metal, disable timestamp query extension on Metal until we know how to
do that. WebGPU issue: https://github.com/gpuweb/gpuweb/issues/1325

Bug: dawn:434
Change-Id: If63bd5fe9dccc1fff16a42cddf63e9d8265e65c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37020
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-08 22:56:05 +00:00
Corentin Wallez a2e02836a2 Suppress EntryPointTests.FragAndVertexSameModule on GL
The test is failing because it seems that SPIRV-Cross is outputing some
of the builtins for the vertex in the fragment shader and vice-versa.

Bug: chromium:1163767
TBR=senorblanco@chromium.org

Change-Id: Iefbc1beb9065a92f1d61776d12c903d4e80648d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-08 12:26:05 +00:00
Corentin Wallez 00fcab636a Fix default viewDimension in deprecated BGLEntry path.
The handling of the default view dimension in the deprecated bind group
layout entry path was checking the viewDimension of the new
sub-descriptor instead of the deprecated viewDimension member. This
meant that viewDimension was always defaulted and "2D".

This commit fixes the issue by looking at the correct viewDimension member
and adds a regression deprecation test.

Bug: dawn:620

Change-Id: Icc133b6d80ba3d88bae30dc9138f1d74e14d12c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36841
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-07 17:33:44 +00:00
Ben Clayton 3f5c01ae92 Reland "Update PrimitiveTopologyTests to use WGSL"
This reverts commit ad0bec6c96.

Reason for revert: The change was incorrectly blamed for a autoroll failure and reverted unnecessarily.

Original change's description:
> 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>

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

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

Bug: dawn:572
Change-Id: I2e8859c9b9f12c005bef1309c7bad98f61af2ac7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36842
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-07 16:04:24 +00:00
Ryan Harrison fac169113d Remove HLSL & MSL SPIRV-Cross Fuzzers
The plan of record is to use Tint for back end generation on these
platforms for launch, so there is no need to fuzz SPIRV-Cross on them.

The GLSL fuzzer will remain for now, since the PoR has native support
for GLSL using SPRIV-Cross.

Change-Id: I8d6bf76b2b81e9bbc158fa8c5a63b119060abbe5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36701
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-01-07 01:36:11 +00:00
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
Ryan Harrison 0824188672 Fix issues with roll into Skia
Specifically there are build failures due to size_t not being defined
in CachedObject.h, as well as unused functions in ShaderModule.cpp

Change-Id: Ie9bd903660e3563fdf797e716bf55f6fa8627e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35103
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-08 16:32:34 +00:00
Corentin Wallez 2093157afe Rename TryConvertAspect to better reflect what it does.
Bug: dawn:441
Change-Id: I51d28102926fb00a7c6225bc3b84324fe8f1f6fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34902
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-08 15:56:44 +00:00
Stephan Hartmann 0b0e6e0579 use cstring instead of string.h
dawn codebase uses c-prefixed headers.
Follow up for https://dawn-review.googlesource.com/c/dawn/+/35001

Bug: None
Change-Id: I65b18f3ec8b2222f9a683c2cf81b710435dcf55c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35017
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-08 14:14:53 +00:00
Stephan Hartmann 36cd254bbd GCC: fix template specialization in ObjectContentHasher
GCC complains that explicit specialization in non-namespace scope
is happening for ObjectContentHasher.

In file included from
../../third_party/dawn/src/dawn_native/ShaderModule.cpp:19:
../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:56:19:
error: explicit specialization in non-namespace scope 'class
dawn_native::ObjectContentHasher'
   56 |         template <>
      |                   ^

Additionally make RecordIterable constexpr, because it is called
from constexpr methods. GCC complains about this as well:

../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:76:50:

error: call to non-'constexpr' function 'void
dawn_native::ObjectContentHasher::RecordIterable(const IteratorT&) [with
IteratorT = std::__cxx11::basic_string<char>]'
   76 |             recorder->RecordIterable<std::string>(str);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Bug: None
Change-Id: I535f5f5e0beded09f105f9871759b617c7384ae0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35003
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
2020-12-08 13:52:03 +00:00
Corentin Wallez 61355d416d Change SubresourceRange to be hierarchical.
Initializing SubresourceRange with {x, y, z} type of constructor
was error prone because it was going from the smallest concept
to the larger one instead of being hierarchical.

This CL changes the order of the structure and more importantly
adds a constructor that's in hierarchical order and groups related
members together. For example:

  SubresourceRange range(Aspect::Color, {layerStart, layerCount}, {0, mipCount});

It also adds a rename of SingleMipAndLayer in hierarchical order as
SubresourceRange::Single and a helper that gives a full range as
SubresourceRange::Full (it will be used in follow-up CLs).

Bug: dawn:441

Change-Id: I8e71bae1129a96222f7779014575b24b31f5ef7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-08 12:39:03 +00:00
Austin Eng 8a73e1876d Add MSL support for UseTintGenerator toggle
Turns on Tint generation of MSL if UseTintGenerator is on

Bug: dawn:571
Change-Id: Icfa523c36a509baf5da3b2a54152a7fb462c86f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 22:04:23 +00:00
Stephen White 042184128e Widen color state support on ES.
Indexed draw buffer (color state) support on ES is not core until 3.2.
Previously, we were failing (asserting) if color state was changed for
a non-zero attachment. This CL compares the state, and only asserts if the
color state actually differs per-attachment.

It also implements a disable_indexed_draw_buffers toggle, which allows a
test to check for the functionality in a platform-independent manner.

BUG=dawn:580, dawn:582

Change-Id: I11c67b0dd72f73e7302c06cad24e8a268fb37a76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-07 19:31:03 +00:00
Austin Eng 1ae024ce56 Add SPIR-V support for UseTintGenerator toggle
Turns on Tint generation of SPIR-V if UseTintGenerator is on.
This affects SPIR-V generation for Vulkan, and SPIR-V passed
into SPIRV-Cross to produce GLSL.

It enables DrawTests use_tint_generator for Vulkan/GL where it
should have at least basic support.

Bug: dawn:571
Change-Id: I5df1435bee17572259f5aa3605c4bf19c0136cbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32302
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 19:05:33 +00:00
Austin Eng 0d948f7752 Produce tint::ast::Module in the frontend if UseTintGenerator
This factors code to move parsing of tint::ast::Module to the
frontend. All backends will use this code path when
UseTintGenerator is enabled for both SPIR-V and WGSL ingestion.

To avoid too much code explosion, parsing and validating the
shader is moved into ValidateShaderModuleDescriptor which
returns a result struct that gets passed into creation.

Bug: dawn:571
Change-Id: I598693ef36954fd0056a0744a2a0ebd7cc7d40a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32301
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 18:12:13 +00:00
Brandon Jones 224a3a4ab5 Fix Emulated OOB Index In Primitive Restart Tests
Recognizes an OOB vertex index to show consistent behavior when trying
to emulate an OOB index across backends.

Bug: dawn:575
Change-Id: Ie06d6706614843c75c217f7b3b144dc25996cd0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34924
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-12-07 17:29:43 +00:00
Stephan Hartmann d63d562d1b IWYU: include string.h for memcpy
Bug: None
Change-Id: I978f49febf7e9e9e961957f62efd3ff9a166b81b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-05 20:37:01 +00:00
Natasha Lee c532048062 Add testing and implementation for lazy init compressed textures
Bug: dawn:145
Change-Id: I176ac2fb4c7db708bb147e2ad0118538907b43d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33040
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-04 19:31:40 +00:00
Stephen White 8c813311f0 Fix base vertex toggle.
Use the correct toggle when checking for support.

Also disable a test which tests it unconditionally.

Change-Id: I5f98004865df5e1f4dd6cf6eaa4769444b90e9c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-04 19:24:00 +00:00
Stephen White f31b78e90e Enable all remaining end2end tests on OpenGL ES backend.
This enables all the tests which pass on ES 3.2.

BUG=dawn:580

Change-Id: I56fde768a917d74f24e53cd2f7367aa165c4ac4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34720
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-04 15:59:29 +00:00
Ben Clayton 5816894706 Remove legacy tint::transform API codepaths
https://dawn-review.googlesource.com/c/tint/+/34800 has been merged, and rolled into Dawn and Chromium.

Bug: tint:390
Bug: tint:389
Change-Id: Ibbbb7f664b2c0e132c5ac25f24bc8f7cb24fc460
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-04 12:55:09 +00:00
Austin Eng f731a81c74 Fix DawnTest HasToggleEnabled referencing the wrong device
It should reference the backendDevice as the |device| points to
the wire client device when the wire is used.

Bug: none
Change-Id: Iac6399df96ea0226d8b9ba8f6196185e43c41adb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34923
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-04 02:07:20 +00:00
Brandon Jones 3a915a67f5 Set D3D12 IBStripCutValue
Sets IBStripCutValue on the D3D12 render pipeline to the appropriate
value when an index buffer is used. Revises primitive restart tests to
catch when IBStripCutValue is not set.

Bug: dawn:575
Change-Id: I77058d8fe62a52c09641b82d3383a404b7ac6d4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34340
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 21:45:09 +00:00
Ben Clayton 80baa39ffc Add codepaths for new tint::transform API
These are guarded by `#if DAWN_USE_NEW_TINT_TRANSFORM_API` preprocessor conditionals, this define will be added to the tint `transform.h` file, atomically switching code paths when the new API lands.

See https://dawn-review.googlesource.com/c/tint/+/34800 for the tint change.

Bug: tint:390
Bug: tint:389
Change-Id: I0f397550f921a46c5bb29b1e71aacfee19ec5dd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34880
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-03 21:25:59 +00:00
Stephen White 00cda4f719 OpenGL ES: enable StorageTextureTests.
Disable 32-bit-per-component RG* format tests, since those formats are
unsupported on OpenGL ES.

BUG=dawn:580, dawn:595

Change-Id: I0bc3b03c65bbf15c7c38937ed84629c61201ff76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34780
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-03 19:07:33 +00:00
Austin Eng 1229110f9c Update TextureFormatTests to use WGSL
Bug: dawn:572
Change-Id: I104465bfaf3056e0546cdf08b0aebfb43d84b488
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33886
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-03 18:51:53 +00:00
Bryan Bernhart 24bf7a4fbb Pipeline caching: refactor object hashing
Dawn's object-based cache creates keys from memory
addresses. These keys cannot be used in a persistent
cache. This change modifies the keys to only
use hashes so they can be re-used for caching
pipelines.

BUG=dawn:549

Change-Id: Ica64d58ae6a3c6266435cfc3f776c820190f7895
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2020-12-03 18:42:13 +00:00
Corentin Wallez fe129405cf Move Subresource-related datatypes to their own file.
Aspect and SubresourceRange will be used by the SubresourceStorage
container that will itself be used by TextureBase. Avoid cyclic header
dependencies by moving SubresourceRange and Aspect to their own header.

Also refactors the handling of Aspect to aspect index in preparation for
using it in SubresourceStorage (each Aspect will have a fixed index).

Bug: dawn:441

Change-Id: I66c60f899d236a233ef30a287227610f8b469f88
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34463
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 17:55:03 +00:00
Stephen White c34bb0c3c4 Enable viewport tests on OpenGL ES.
Also implement a workaround for missing glViewportIndexedf().

BUG=dawn:580,dawn:597

Change-Id: I618161ae9750925c1c892123607db84563f0869c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34721
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 17:00:33 +00:00
Austin Eng 600f6f55db Specify mip level and array layer in TextureMTL lazy clear
These were accidentally left out in the original code and fixes
WebGPU CTS zero init tests with renderable formats on Mac.

Bug: dawn:145
Change-Id: Ied886098408a749c094addb2ceaeb7e8c14938d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34726
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-03 16:55:53 +00:00
Ryan Harrison 10cb17e079 Disable unit tests with KI when Tint Inspector is being used
dawn_unittests --enable-toggles=use_tint_inspector now passes.

Bug: tint:578
Change-Id: I1e764fd99a145542fe6b7c6e651b0dec1fb4785f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34722
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2020-12-03 16:34:27 +00:00
dan sinclair 0d1c17363d Remove tint context.
This CL removes all references to the tint context object which is going
away.

Bug: None
Change-Id: I3b74a8a65b89ba2236cfa71e7551756c8624e2a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34725
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 15:46:17 +00:00
Corentin Wallez 5d8a071433 Suppress all end2end tests on Intel D3D12 with validation layers
After a driver upgrade a lot of these tests started hanging, to unblock
the CQ and fix various builder, we skip all the tests on this
configuration.

Bug: dawn:598
TBR=enga@chromium.org

Change-Id: Ic5e47bb6e84be1104e8a511c087d3386bf025c90
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34468
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 11:21:57 +00:00
Bryan Bernhart a0ca2cc7ef Fix WindowsDebugLogger hang on release builds
Removes ASSERT checking the status of the exit
handle so it cannot ever be optimized out.

BUG=dawn:592

Change-Id: Ib88a058abd0597668ba3c272cf0e304f4aa19c4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 10:53:04 +00:00
Ryan Harrison b17fe99e8b Do not assert in work thread during tests
If there is an issue with the shader, i.e. validation failing, the
former ASSERT_EQs will kill the thread that is running the lambda.

Since the main thread is waiting for a state change, if this assert
kills the thread, the test will hang forever.

This change allows the test to complete and fail correctly in the case
that the test condition fails.

Bug: tint:578
Change-Id: I6f5cc636193bf01c2d5e5d77a883fab7ec591c3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34700
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-02 18:06:30 +00:00
Austin Eng 2395ff5be1 OpenGL: Bind a dummy sampler for OpImageFetch if not present
In WGSL, textureLoad translates to an OpImageFetch without the
combined sampler. In OpenGL, we need to use SPIRV-Cross to insert
a dummy nearest filtering sampler and bind that in the backend.

Bug: dawn:585
Change-Id: I92ae6ad35263d3720e59fa93688ca914a9495a81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34401
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-02 16:51:19 +00:00
Corentin Wallez 0bc6128d4b Reenable BufferMappedAtCreationOOM on Windows
It was suppressed because PartitionAlloc didn't support new
(std::nothrow). Reenable the test now that ParitionAlloc
supports it.

Fixed: dawn:579
Change-Id: I4d3879ae78ee869d08bb249857af7782a6f7f443
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34465
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2020-12-02 16:22:29 +00:00
Yan, Shaobo bb913a94da CopyTextureForBrowser: Support flipY option
This CL enable CopyTextureForBrowser to accept options. The first
supported option is flipY, which can be implemented through scale and
offset uniforms.

BUG=dawn:465

Change-Id: Ia90153ee63a50e0e40beb1c13c63764d19a0b809
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34402
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-02 08:13:09 +00:00
Stephen White 6f5151f657 Enable D* end-to-end tests on OpenGL ES backend.
This is mostly the set of tests which are enabled on Desktop GL,
with the exception of tests which use glTextureView() (unsupported
on GLES).

BUG=dawn:580

Change-Id: I1dbefa394298f7dd31d65e920f1f4efeaebe90ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34520
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-01 21:52:37 +00:00
Stephen White 26ea8b728c Disable some further C* end2end tests on GLES.
BUG=dawn:580

Change-Id: Ie5d58ebfa2773899d29ed4279478b9a44d8c266f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 20:35:27 +00:00
Stephen White ab59a10f2c Enable most C* end-to-end tests on OpenGL ES.
This enables all the C* tests which are also enabled on desktop GL.

BUG=dawn:580

Change-Id: I71cf500a19fc4f81e0de47483d9b1de49df9bf76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34500
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 18:37:19 +00:00
Stephen White f995e4adc1 Enable BufferTests on OpenGL ES.
Skip those which currently do not pass (same as GL backend).

BUG=dawn:580

Change-Id: Id307cfb998c981d65621eb98761c22d73e5b0f81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34403
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 18:33:27 +00:00
Stephen White 7bf553c467 Fix SSBO bindings in GLES backend.
OpenGL ES doesn't have the glShaderStorageBlockBinding() call, so we
modify the binding decorations set in the shader instead. This requires
plumbing through some more pipeline state at shader translation time.

BUG=dawn:584
Change-Id: Ib7fdb6a7ad1eff1a99d44d55e9d923214affe702
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 17:42:57 +00:00
Ryan Harrison c3830d436c Add support for using Tint Inspector
Adds in a toggle to control using Tint or SPIRV Cross for reflection.
The current implementation only gets name and stage information via Tint,
backfilling the rest from SPIRV Cross.
Future CLs will fill in the rest of the entry point metadata.

Bug: dawn:578
Change-Id: Iee16b9dbb9a17d4aaa68e5e52e4aa91ee0a62624
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33500
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-01 14:53:07 +00:00
Corentin Wallez a92f0d2b61 CommandBufferMTL: Address review comments
Renames indexTypeSize to indexFormatSize. I forgot to add the changes
prior to pushing the commit.

Bug: dawn:502
Change-Id: I38f19edc021141c5a5ab57c6220978b7c88b116e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33923
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-01 14:06:47 +00:00
Yan, Shaobo a6a7e46e54 Enable CopyTextureForBrowserTests on Vulkan/Metal Backend
CopyTextureForBrowser end2end tests had been skipped on Vulkan/Metal
backends due to crbug.com/tint/63.

Because this issue has been fixed, enable CopyTextureForBrowserTests on
Vulkan/Metal backends.

However, D3D12 backend with validation layer still stucks. Raise issue
crbug.com/dawn/592 and keep tests skip.

BUG=dawn:465

Change-Id: I819b3608d07ea7467b33263004e9e19158e73eff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34440
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-01 07:57:47 +00:00
Yan, Shaobo a827aa2c29 CopyTextureForBrowser: Use large triangle to avoid arithmetic precision
In previous internal shader, we draw a just fit-in rectangle to do the
copy. But there is arithmetic precision issues in border pixels when
copy from a large texture.

ANGLE handle the same issue by drawing a large triangle. Dawn adopte the
same idea here

BUG=dawn:465

Change-Id: I2366e28b1e96e7a33116a170023a5138d8c9f770
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33900
Reviewed-by: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
2020-12-01 03:37:37 +00:00
Austin Eng 70b9db3ffc Update RenderPassLoadOpTests to use WGSL
Bug: dawn:572
Change-Id: Ib955b4cff1a43dfa42a6cebfcbd88bf128e22644
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33770
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:48:21 +00:00
Austin Eng 564bea9da1 Update ScissorTests to use WGSL
Bug: dawn:572
Change-Id: Id083979bf24360d4db25eb5afa0e60eb0151d750
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33768
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:36:31 +00:00
Austin Eng 84e1dca464 Update DepthStencilCopyTests to use WGSL
Note: some shaders blocked on crbug.com/tint/329

Bug: dawn:572
Change-Id: I31e745fa5f0b5b698432442da0e6c00586fe062f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33760
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:33:50 +00:00
Austin Eng 054d85366a Update ObjectCachingTests to use WGSL
Bug: dawn:572
Change-Id: I64ebc3f0aabf806dd10b6b90cd7352707643ee58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33880
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:06:50 +00:00
Jiawei Shao 5fc12c314a Use FilterMode::Nearest in TextureFormatSamplingTests
Currently TextureFormatTest.R8Uint fails on the Vulkan backend with
Vulkan validation layer enabled because we wrongly use a Linear filter
on a texture with R8Uint format.

This patch fixes this issue by using the Nearest filter in that test
instead.

BUG=dawn:588
TEST=dawn_end2end_tests/TextureFormatTest.R8Uint

Change-Id: I39714784c8f2db25923b50eb2e07b7aa111cb4c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34280
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-30 17:54:50 +00:00
Jiawei Shao 2fe7335d34 Skip two MultisampledRenderingTest tests on D3D12 with debug layer
This patch skips the following two dawn_end2end_tests on all D3D12
backends when the D3D12 debug layer is enabled as they started to fail
after the upgrade of Windows try bots.
- MultisampledRenderingTest.ResolveOneMultisampledTextureTwice
- MultisampledRenderingTest.ResolveInto2DArrayTexture

See dawn:462 for more details.

BUG=dawn:462

Change-Id: I99c65ce250ba5b405a2143e6f866fd21ae33d63a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34281
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-30 13:50:49 +00:00
Corentin Wallez e60f506bdd Roll spirv-headers right before the ray tracing breakage.
The next commit in spirv-headers contains breaking changes that removes
the provisional ray-tracing extension and add the final version of it.
To ease the roll past that, we first roll just before the breaking
changes.

It required a roll of SPIRV-Tools and SPIRV-Cross to handle
smaller-scale breaking changes.

Also fixes a compilation issue with spirv-headers and SPIRV-Cross having
conflictin SPV_VERSION macros.

Roll third_party/spirv-headers/ 060627f0b..5ab5c9619 (7 commits)

060627f0b0..5ab5c96198

$ git log 060627f0b..5ab5c9619 --date=short --no-merges --format='%ad %ae %s'
2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175)
2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174)
2020-10-23 john Bump revision to 4, for SPIR-V 1.5.
2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170)
2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172)
2020-10-12 hwguy.siplus  Register the Xenia emulator as a generator (#171)
2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169)

Created with:
  roll-dep third_party/spirv-headers

Roll third_party/spirv-cross/ 8891bd351..be527632a (67 commits)

8891bd3512..be527632a6

$ git log 8891bd351..be527632a --date=short --no-merges --format='%ad %ae %s'
2020-11-25 comexk spirv_msl: Don't add fixup hooks for builtin variables if they're unused.
2020-11-23 cdavis MSL: Don't mask off inactive bits in ballot masks.
2020-11-20 cdavis MSL: Adjust FragCoord for sample-rate shading.
2020-11-23 post GLSL: Fix buffer_reference with aliased names.
2020-11-23 post GLSL: Emit storage qualifiers for buffer_reference.
2020-11-23 post HLSL: Fix validation with FXC for test.
2020-11-23 post Normalize all internal workaround methods to use spv prefix.
2020-11-21 scribam CMake: Set minimum required version to 3.0
2020-11-18 cdavis MSL: Expand subgroup support.
2020-11-12 git GLSL: Require GL_ARB_vertex_attrib_64bit for double input in pre-4.10
2020-11-14 cdavis MSL: Expose some more features on iOS.
2020-11-11 post MSL: Add missing reference file.
2020-11-11 post Fix switch fallthrough
2020-11-09 git GLSL: Legacy / extension fallbacks for textureSize and texelFetch
2020-10-29 jsikorski MSL: extract global variables from subgroup ballot operations
2020-11-08 post Run format_all.sh.
2020-11-08 post Update texture gather test result.
2020-11-07 git GLSL: Add error checking and extension fallback for textureGather
2020-11-07 git GLSL: Remove unused `lod` argument from legacy_tex_op()
2020-11-05 git GLSL: implement transpose() in GLSL 1.10 / ES 1.00
2020-11-06 git GLSL: Fix round/roundEven for legacy GLSL.
2020-11-05 git GLSL: Fix support for textureLod in legacy vertex shaders
2020-11-06 post MSL: Fix regression in image gather handling.
2020-11-02 cdavis MSL: Support pull-model interpolation on MSL 2.3+.
2020-11-03 git HLSL: Support roundEven() in HLSL SM 4.0 and above
2020-11-03 git HLSL: Add regression test for SM3.0 texture samplers
2020-10-31 git HLSL: Support depth comparison texture sampling in SM 2/3.
2020-11-03 post HLSL: Add option to flatten matrix vertex input semantics.
2020-11-03 post Parser: Don't assume OpTypePointer will always take a SPIRType.
2020-11-02 bill.hollings Syntax and format updates from code review.
2020-11-02 crisserpl2 Updated ref file for subgroups_basicvoteballot.vk.comp
2020-10-31 devsh.graphicsprogramming Fix some bad assumptions about emulating `subgroupBarrier`
2020-10-30 bill.hollings Minor format and typo updates from code review.
2020-10-27 cdavis MSL: Allow Bias and Grad arguments with comparison on Mac in MSL 2.3.
2020-10-30 post GLSL: Fix nonuniformEXT injection.
2020-10-30 atyuwen fixed compile error with -std=c++20
2020-10-30 atyuwen added metal keyworld: "level" (#1501)
2020-10-29 bill.hollings MSL: Support run-time sized image and sampler arrays (GL_EXT_nonuniform_qualifier/SPV_EXT_descriptor_indexing).
2020-10-27 cdavis MSL: Allow framebuffer fetch on Mac in MSL 2.3.
2020-10-27 cdavis MSL: Allow post-depth coverage on Mac in MSL 2.3.
2020-10-27 post Handle case where block is loop header, continue AND break block.
2020-10-14 post GLSL: Support a workaround for loading row-major matrices.
2020-10-20 cdavis MSL: For 2.1+, don't disable rasterization for vertex writes.
2020-10-26 post MSL: Do not use component::x gather for depth2d textures.
2020-10-26 post Update TravisCI python reference.
2020-10-21 cdavis MSL: Cast broadcast booleans to ushort.
2020-10-20 cdavis MSL: Mask ballots passed to Ballot bit ops.
2020-10-20 cdavis MSL: Support vectors with OpGroupNonUniformAllEqual.
2020-10-20 cdavis MSL: Correct definitions of subgroup ballot mask variables.
2020-10-20 cdavis MSL: Don't remove periods from swizzle buffer index exprs.
2020-10-14 cdavis MSL: Handle Offset and Grad operands for 1D-as-2D textures.
2020-10-14 cdavis MSL: Don't use a bitcast for tessellation levels in tesc shaders.
2020-10-14 post GLSL: Use need_transpose when checking for non-native matrix.
2020-10-14 post MSL: Support querying and modifying generated combined sampler suffix.
2020-10-13 cdavis MSL: Fix calculation of atomic image buffer address.
2020-10-13 cdavis MSL: Add missing interlock handling to atomic image buffers.
2020-10-13 cdavis MSL: Support atomic access to images from argument buffers.
2020-09-28 cdavis MSL: Support SPV_EXT_demote_to_helper_invocation for MSL 2.3.
2020-10-08 post Style nits for GL subgroup implementation.
2020-10-08 post Add missing VK variant of the test file.
2020-10-08 post Update GL subgroup test file.
2020-10-08 crisserpl2 Resolved issues 1350, 1351, 1352
2020-09-30 post GLSL: Add support for transform_feedback3 geometry streams.
2020-09-30 post GLSL: Use literal array size for cull/clip array sizes.
2020-09-28 post Work around MSVC warning.
2020-09-28 post Allow flip_vert_y in all relevant stages.
2020-09-22 dsinclair Roll dependencies.

Created with:
  roll-dep third_party/spirv-cross

Roll third_party/SPIRV-Tools/ 60ce96e2f..671914c28 (115 commits)

60ce96e2ff..671914c28e

$ git log 60ce96e2f..671914c28 --date=short --no-merges --format='%ad %ae %s'
2020-11-18 greg Fix buffer oob instrumentation for matrix refs (#4025)
2020-11-13 afdx spirv-opt: Set parent when adding basic block (#4021)
2020-11-13 jaebaek spirv-opt: properly preserve DebugValue indexes operand (#4022)
2020-11-11 dneto Use less stack space when validating Vulkan builtins (#4019)
2020-11-05 46493288+sfricke-samsung spirv-val: Fix SPV_KHR_fragment_shading_rate VUID label (#4014)
2020-11-05 46493288+sfricke-samsung spirv-val: Label Layer and ViewportIndex VUIDs (#4013)
2020-11-05 alanbaker Add dead function elimination to -O (#4015)
2020-11-04 jaebaek Add DebugValue for invisible store in single_store_elim (#4002)
2020-11-04 dnovillo Fix SSA re-writing in the presence of variable pointers. (#4010)
2020-11-04 afdx spirv-fuzz: Fixes to pass management (#4011)
2020-11-03 afdx spirv-fuzz: Add support for reining in rogue fuzzer passes (#3987)
2020-11-03 vasniktel spirv-fuzz: Fix assertion failure in FuzzerPassAddCompositeExtract (#3995)
2020-11-03 vasniktel spirv-fuzz: Fix invalid equation facts (#4009)
2020-11-03 vasniktel spirv-fuzz: Fix bugs in TransformationFlattenConditionalBranch (#4006)
2020-11-03 andreperezmaselco.developer spirv-fuzz: Fix bug related to transformation applicability (#3990)
2020-10-30 jaebaek Temporarily add EmptyPass to prevent glslang from failing (#4004)
2020-10-30 Junda.Liu spirv-opt: Add support to prevent functions from being inlined if they have DontInline flag (#3858)
2020-10-29 jaebaek Propagate OpLine to all applied instructions in spirv-opt (#3951)
2020-10-29 bclayton CMake: Add SPIRV_TOOLS_BUILD_STATIC flag (#3910)
2020-10-29 dneto Avoid copying a ref in a loop (#4000)
2020-10-28 justsid spirv-val: Allow the ViewportIndex and Layer built-ins on SPIR-V 1.5 (#3986)
2020-10-28 dnovillo Simplify logic to decide whether CCP modified the IR (#3997)
2020-10-27 jaebaek Add DebugValue for DebugDecl invisible to value assignment (#3973)
2020-10-26 greg Fix bounds check instrumentation to handle 16-bit values (#3983)
2020-10-23 andreperezmaselco.developer spirv-fuzz: Add expand vector reduction transformation (#3869)
2020-10-23 vasniktel spirv-fuzz: Don't replace irrelevant indices in OpAccessChain (#3988)
2020-10-23 vasniktel spirv-fuzz: Add FuzzerPassAddCompositeExtract (#3904)
2020-10-22 afdx spirv-fuzz: Fix mismatch with shrinker step limit (#3985)
2020-10-22 afdx spirv-fuzz: Fix off-by-one error in replayer (#3982)
2020-10-22 afdx spirv-fuzz: Get order right for OpSelect arguments (#3974)
2020-10-22 afdx spirv-fuzz: Do not add synonym-creating loops in dead blocks (#3975)
2020-10-22 afdx spirv-fuzz: Skip OpTypeSampledImage when propagating up (#3976)
2020-10-22 afdx spirv-fuzz: Pass OpUndef in function call if needed (#3978)
2020-10-22 afdx spirv-fuzz: Fix off-by-one in TransformationCompositeConstruct (#3979)
2020-10-22 afdx spirv-fuzz: Tolerate absent ids in data synonym fact management (#3966)
2020-10-21 afdx spirv-fuzz: Fix to id availability (#3971)
2020-10-21 afdx spirv-fuzz: Fix operand types (#3962)
2020-10-21 8729214+jonahryandavis Update SPIRV-Headers revision in DEPS file (#3961)
2020-10-21 afdx spirv-fuzz: Don't flatten conditional if condition is irrelevant (#3944)
2020-10-21 afdx spirv-fuzz: Do not produce OpPhis of type OpTypeSampledImage (#3964)
2020-10-21 afdx spirv-fuzz: Restrict fuzzer pass to reachable blocks (#3970)
2020-10-21 afdx spirv-fuzz: Handle more types when extending OpPhi instructions (#3969)
2020-10-21 afdx spirv-fuzz: Skip early terminator wrappers when merging returns (#3968)
2020-10-21 afdx spirv-fuzz: Avoid irrelevant constants in synonym-creating loops (#3967)
2020-10-21 afdx spirv-fuzz: Skip dead blocks in FuzzerPassAddOpPhiSynonyms (#3965)
2020-10-21 afdx spirv-fuzz: Avoid the type manager when looking for struct types (#3963)
2020-10-20 afdx spirv-fuzz: Fix to TransformationDuplicateRegionWithSelection (#3941)
2020-10-20 afdx spirv-fuzz: Skip OpFunction when replacing irrelevant ids (#3932)
2020-10-20 afdx spirv-fuzz: Use component-wise selectors when flattening conditional branches (#3921)
2020-10-20 TobyHector Add SPV_EXT_shader_image_int64 (#3852)
(...)
2020-10-13 afdx spirv-fuzz: Do not allow creation of constants of block-decorated structs (#3903)
2020-10-13 afdx spirv-fuzz: Fixes related to irrelevant ids (#3901)
2020-10-13 afdx spirv-fuzz: Fix to transformation that adds a synonym via a loop (#3898)
2020-10-13 afdx spirv-fuzz: Fix to duplicate region with selection (#3896)
2020-10-09 afdx spirv-fuzz: Do not expose synonym facts for non-existent ids (#3891)
2020-10-08 afdx spirv-fuzz: Do not add synonyms involving irrelevant ids (#3890)
2020-10-08 afdx spirv-fuzz: Do not replace irrelevant ids that are not in blocks (#3892)
2020-10-08 afdx spirv-fuzz: Wrap OpKill and similar in function calls (#3884)
2020-10-08 dj2 Update val to handle reversed instruction sections. (#3887)
2020-10-06 afdx spirv-fuzz: Replace dead-block terminators with OpKill etc. (#3882)
2020-10-06 vasniktel spirv-fuzz: TransformationPropagateInstructionDown (#3692)
2020-10-06 afdx spirv-fuzz: Transformation to add wrappers for OpKill and similar (#3881)
2020-10-06 afdx spirv-fuzz: Use overflow ids when duplicating regions (#3878)
2020-10-06 vasniktel spirv-fuzz: Fix rvalue references (#3883)
2020-10-02 afdx spirv-fuzz: Avoid using block-decorated structs in transformations (#3877)
2020-10-02 afdx spirv-fuzz: Use overflow ids when inlining functions (#3880)
2020-10-02 jaebaek Debug info preservation in convert-local-access-chains pass (#3835)
2020-10-02 vasniktel spirv-fuzz: Refactor fact manager tests (#3879)
2020-10-02 afdx spirv-fuzz: Integrate spirv-reduce with shrinker (#3849)
2020-10-02 afdx spirv-fuzz: Only recommend passes when a pass had an effect (#3863)
2020-10-02 stefano.milizia00 spirv-fuzz: Merge the return instructions in a function (#3838)
2020-10-01 jaebaek Debug info preservation in redundancy-elimination pass (#3839)
2020-10-01 jaebaek Debug info preservation in if-conversion pass (#3861)
2020-10-01 vasniktel spirv-fuzz: Refactor conditions in the fact manager (#3867)
2020-10-01 vasniktel spirv-fuzz: TransformationWrapRegionInSelection (#3674)
2020-10-01 afdx spirv-fuzz: Enable some passes with high probability (#3860)
2020-10-01 afdx spirv-fuzz: Do not add constants for Block-decorated structs (#3862)
2020-10-01 vasniktel spirv-fuzz: Fix to FuzzerPassFlattenConditionalBranches (#3865)
2020-09-30 vasniktel spirv-fuzz: Fix TransformationRecordSynonymousConstants (#3868)
2020-09-30 afdx spirv-fuzz: Fix flatten conditional branch transformation (#3859)
2020-09-29 afdx spirv-fuzz: Report fresh ids in transformations (#3856)
2020-09-28 dj2 [spirv-dis] Add some context comments to disassembly. (#3847)
2020-09-28 emaxx Fix use-after-move in val/validate.cpp (#3848)
2020-09-26 antonikarp spirv-fuzz: Fix bug in TransformationDuplicateRegionWithSelection (#3819)
2020-09-26 andreperezmaselco.developer spirv-fuzz: Support OpNot bit instruction case (#3841)
2020-09-25 afdx spirv-fuzz: Return IR and transformation context after replay (#3846)
2020-09-24 paulthomson spirv-fuzz: fix test (#3845)
2020-09-24 afdx spirv-fuzz: Use unique_ptr<FactManager> in TransformationContext (#3844)
2020-09-24 ehsannas Start SPIRV-Tools v2020.6
2020-09-24 ehsannas Finalize SPIRV-Tools v2020.5
2020-09-24 ehsannas Update CHANGES
2020-09-24 vasniktel spirv-fuzz: Support dead blocks in TransformationAddSynonym (#3832)
2020-09-24 vasniktel spirv-fuzz: Move IRContext parameter into constructor (#3837)
2020-09-24 Simran-B Add missing backticks around <result-id> (#3840)
2020-09-23 rharrison Validate SPIRV Version number when parsing binary header (#3834)
2020-09-23 stefanomil spirv-fuzz: Create synonym of int constant using a loop (#3790)
2020-09-22 58573781+richard-lunarg Fix compiler error on macOS with XCode12 (#3836)
2020-09-22 vasniktel spirv-fuzz: Handle OpPhis in TransformationInlineFunction (#3833)
2020-09-22 stevenperron Update CHANGES
2020-09-22 afdx spirv-fuzz: Refactor fuzzer, replayer and shrinker (#3818)

Created with:
  roll-dep third_party/SPIRV-Tools

Bug: chromium:1153258

Change-Id: I3502579aa3b334a7addaac148e6ec3a8e636150b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34141
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-27 15:36:57 +00:00
Austin Eng 303c5c2d29 Update RenderPassTests to use WGSL
Bug: dawn:572
Change-Id: I4a892249dfcb1b1badffd8fb7bd6e509eb654234
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33767
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:36:56 +00:00
Austin Eng d7f4e808e7 Update RenderBundleTests to use WGSL
Bug: dawn:572
Change-Id: Ide2ec5c70cc4f0abe8374bd9262ef9da02c9a4ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33881
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:36:26 +00:00
Austin Eng a3e7e69dd7 Update IndexFormatTests to use WGSL
Bug: dawn:572
Change-Id: I7d4647cd90416f07596e86dda71e43db43fffff4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33766
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:34:16 +00:00
Corentin Wallez fe22ba525d Port BindGroupValidationTests to WGSL
Bug: dawn:572
Change-Id: Ifccb349e756c5b2ca9f8ce2ab64f431d53856e6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33823
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2020-11-26 15:23:56 +00:00
Corentin Wallez 218a3d71c3 Port GetBindGroupLayoutValidationTests to WGSL
Bug: dawn:572
Change-Id: I132644a2dc9efecaacf7a7a23818d5eba8bc4ded
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33927
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 15:05:36 +00:00
Austin Eng b92c375560 Update DestroyTests to use WGSL
Bug: dawn:572
Change-Id: Ia4ffacad9740fc49aac4333a6e7a1a83a5002491
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33762
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:55:55 +00:00
Austin Eng 69afcb41e7 Update SamplerTests to use WGSL
Bug: dawn:572
Change-Id: I008d142c61a09e5453cb51e38b1dfaee17a4e81a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33882
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:41:55 +00:00
Corentin Wallez db197d7b6f Partially port StorageTextureValidationTests to WGSL
The rest of the port is blocked on support for the textureStore
intrinsic to write to storage textures.

Bug: dawn:572
Change-Id: I6b719642522080842cc1ae297546ffc4fda86a11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33935
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:33:15 +00:00
Corentin Wallez 419f102f4d Port RenderPipelineValidationTests to WGSL
Bug: dawn:572
Change-Id: I0306c51c1e141f9e1452d2c1e8d688c014af2d78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33929
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 13:28:45 +00:00
Corentin Wallez de56b07e61 Port VertexBufferValidationTests to WGSL
Bug: dawn:572
Change-Id: I5e626b4e8784cd87f2e29c0cb232f21447958865
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33934
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 13:24:36 +00:00
Austin Eng 21c1e5f623 Update DeviceLostTests to use WGSL
Bug: dawn:572
Change-Id: I0555f88baa42c6fdd236478ab2ad4d7ba59448ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33763
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:23:55 +00:00
Austin Eng 225074a74a Update TextureSubresourceTests to use WGSL
Bug: dawn:572
Change-Id: I7a008c4c52c7e42cd73c4591854f8910d1a04dc7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33769
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:22:15 +00:00
Austin Eng 4f5cfd2319 Update IOSurfaceWrappingTests to use WGSL
Bug: dawn:572
Change-Id: I806873e1b2af2c5582e49c47592f891ec69146e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33772
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:10:16 +00:00
Austin Eng 1dc64736c4 Update Draw(Indexed)?(Indirect)?Tests to use WGSL
Bug: dawn:572
Change-Id: I8c5e89588d0794e7716d0e8db76634ffa477bf78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33764
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:05:35 +00:00
Corentin Wallez e433709e6e Port ComputeIndirectValidationTests to WGSL
Bug: dawn:572
Change-Id: I0db11c2416ca430b026cd2293061e99d35b18973
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33924
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 12:57:45 +00:00
Corentin Wallez 261d261fd1 Port ResourceUsageTrackingTests to WGSL
Bug: dawn:572
Change-Id: I945aa6720a4dd1cacb4b2a74d40482ffadde5b55
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33930
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:56:45 +00:00
Austin Eng 6edd993c47 Update SwapChainValidationTests to use WGSL
Bug: dawn:572
Change-Id: I30fbe6930bee0badc9ce36d16f3fc43f4d4f6731
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 12:43:15 +00:00
Corentin Wallez 435da1c2dc Port VertexStateValidationTests to WGSL
Bug: dawn:572
Change-Id: I904f032125797de53d4e85f8670ea36887749ac8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33933
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:30:37 +00:00
Corentin Wallez 7e8c35df46 Port DrawIndirectValidationTests to WGSL
Bug: dawn:572
Change-Id: Ifb434a262c8ccc563e22afae4378c53aa9aecdca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33925
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:25:15 +00:00
Corentin Wallez 41c0874c3b Port ShaderModuleValidationTests to WGSL
Bug: dawn:572
Change-Id: I112a8f5805e6b673aa51ac00d2471a74c4a5ea92
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33931
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:23:45 +00:00
Corentin Wallez 71279dcde7 Port UnsafeAPIValidationTests to WGSL
Bug: dawn:572
Change-Id: I5d86e36d3bfc29c0f27e64aa86b0a662e490f1e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33932
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:22:55 +00:00
Corentin Wallez 8fc755b716 Port IndexBufferValidationTests to WGSL
Bug: dawn:572
Change-Id: If9deb74d334d0f2d5fbc7f78b6ceb646beb45826
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33926
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:22:35 +00:00
Corentin Wallez b7eb1e15fa Port RenderBundleValidationTests to WGSL
Bug: dawn:572
Change-Id: Id71f2d49c60238939c70bb1d7c93a45b25ca3dcb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33928
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 11:30:55 +00:00
Austin Eng 9175f00eec Update WGSL vertex_idx i32 -> u32
Bug: dawn:572
Change-Id: I7d477481d06ffdfde6590c2297f2c3f5e704b044
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-26 00:02:35 +00:00
Austin Eng 2b606e9297 Unify WGSL syntax to put stage decoration on same line
Bug: dawn:572
Change-Id: Ic7baba88bcff9cdb42e0507be58f84c824b62d25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33980
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-25 17:31:15 +00:00
Stephen White d45ab07775 Enable testing on GLES backend.
Add support for the OpenGL ES backend to DawnTest.
Enable its use in BasicTests.

BUG=dawn:580

Change-Id: I920f3a8107928d3ecd5b1506fde5242bec4eef31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-11-25 16:45:04 +00:00
Corentin Wallez a66263753a dawn_native: Make CreateView's descriptor default to nullptr
This matches the defaults of webgpu.h and allows its use from inside
dawn_native for the implementations of SwapChain.

Bug: dawn:269
Change-Id: Icfe15f1775e78690fe4fb7b871bd0c0365d444e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33783
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 09:39:44 +00:00
Corentin Wallez ce74d8256e Improve the dynamic binding OOB error message when binding.size is defaulted.
A common error when using dynamic offset bindings is to forget to set
the size of the binding, which causes all offsets != 0 to produce an
error. Make the error more explicit when that happens to guide
developers.

Bug: dawn:583
Change-Id: I38a5dfaf3f6756765c7e50cd470ac205b567d00c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33784
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 09:16:14 +00:00
Corentin Wallez 441f10a4db Remove deprecated BindGroupLayout options.
Bug: dawn:527
Change-Id: I169dd0b80b006a326f5d8f121a49de6d6ac7b768
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32024
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 08:57:44 +00:00
Corentin Wallez 5fad85bbd9 Remove deprecated SetIndexBuffer (without format).
This also simplifies a bunch of code in backends that was used to handle
getting the indexFormat from the pipeline "late".

Bug: dawn:502

Change-Id: Ibae50c8df21323fd391515f6036552e9fb868d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 08:54:14 +00:00
Austin Eng 33f29ea9b2 Skip ShaderFloat16Tests on Intel D3D12
Bug: dawn:586
Change-Id: Ic5bd9cfe80dfee8f2eac6b87344b2db92ef98a3f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33888
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-25 01:00:34 +00:00
Stephen White 70102b7190 Add preliminary OpenGL ES and EGL support to Dawn.
This is enough to get all of the sample apps running on a conformant ES 3.1 implementation, such as ANGLE/Vk or NVidia's OpenGL ES Linux driver.

Implements a new opengl::AdapterDiscoveryOptionsES subclass to specify its creation at adapter discovery time.
Adds a "-b opengles" command-line flag to the code samples.
Asserts on a call to glShaderStorageBlockBinding() on ES.
Works around missing indexed draw buffers support by asserting when a non-0 color attachment is specified.
Works around missing glClearTexSubImage() by asserting. :/
These will likely require front-end validation.

BUG=dawn:580
Change-Id: I4a4240ca695a22388c55073fd2aee0323cd4afc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31000
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-11-24 20:57:23 +00:00
Stephen White 03badec5d7 Refactor OpenGLVersion out of OpenGLFunctions.
We need the ability to parse the GL version irrespective of
GL extension handling, so pull it out into its own class.

BUG=dawn:580
Change-Id: I620267146159ba8e4fa8cba5f6ebff57e981add0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33540
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-11-23 18:50:42 +00:00
Corentin Wallez 3cd31e647c Metal: Prevent data race on mLastSubmittedCommands
There was a data-race between getting and using the pointer to
mLastSubmittedCommands in WaitForCommandsToBeScheduled and setting it
inside the scheduling handler.

Lock the mutex before calling waitUntilScheduled so that the object
doesn't get destroyed from underneath us.

Bug: chromium:1142024
Change-Id: Iadbf473530342de6d108d39285d723815452ac7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-23 16:16:00 +00:00
Bryan Bernhart 41b3f9c1e4 D3D12: Support caching DX shaders.
This change is a prerequisite to D3D pipeline caching.

This change introduces:
- Caching interface which enables the cache.
- Helper for backends to load/store blobs to be cached.
- Ability to cache HLSL shaders.

Bug:dawn:549
Change-Id: I2af759882d18b3f45dc63e49dcb6a3caa1be3485
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32305
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-20 20:38:37 +00:00
Corentin Wallez d2953cff41 Suppress BufferMappedAtCreationOOM on Windows
With the recent enabling of PartitionAlloc on Windows this test is
crashing because PartitionAlloc raises an exception on OOM instead of
returning nullptr.

Bug: dawn:579
Change-Id: I07577ef96272dc7ed26f6922c67ed09f1e5ca97d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-20 10:05:07 +00:00
Ivan Murashov 75a1f5234e Remove storage class specifier for the explicit template specialization
According to the http://www.eel.is/c++draft/temp.expl.spec:
An explicit specialization shall not use a storage-class-specifier
other than thread_local.
Clang doesn't claims about it, but GCC does.
An error example for GCC 8.4.0:
gen/third_party/dawn/src/dawn_wire/client/ApiObjects_autogen.h:25:5:
error: explicit template specialization cannot have a storage class

Bug: dawn:384
Change-Id: Iaf86722a943d19c9796a7f112885666ac88f20ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33480
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-20 09:38:56 +00:00
Jiawei Shao b6e141afb8 D3D12: Search the default path of Windows SDK for DXC DLLs
This patch adds another way to get DXC DLLs (dxcompiler.dll and
dxil.dll) by searching the default installation path of Windows x64
SDK (C:\Program Files (x86)\Windows Kits\10\\bin\10.0.[version].0\x64)
so that now Dawn can find these two DLLs when Windows SDK is correctly
installed at the default location.

This patch also forces enabling the "use_dxc" toggle when Dawn can
find DXC DLLs and the device is created with "ShaderFloat16" extension
enabled because currently the HLSL shaders with float16_t can only be
compiled with DXC DLLs.

BUG=dawn:402

Change-Id: I410195d9e079f54faebbca71fff77a71f489f08e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33180
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-20 08:27:29 +00:00
Jiawei Shao dad44f4d82 Skip SwapchainTests/SwitchPresentMode on Linux Intel Vulkan drivers
This patch skips the dawn_end2end_test SwapchainTests/SwitchPresentMode
as it may sometimes hang on the latest Linux Intel Vulkan drivers.

BUG=dawn:269

Change-Id: Ieaf658b2cded8edbf6159d6d5d6bd09af7baa391
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33380
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-19 09:19:43 +00:00
Ryan Harrison ce207be41f Use the transform manager instead of invoking the transform directly
This will allow us on the Tint side to refactor the transform code to
correctly run the type determiner at the end of transforms, instead of
hacking it into the transform itself.

Bug: tint:308

Change-Id: I4fd5693ec700b2165ce8c08028b09df6cd8591e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33123
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2020-11-18 17:07:42 +00:00
Hao Li 01e4450729 Query API: Non Precise Occlusion Query
- Add BeginOcclusionQuery and EndOcclusionQuery in frontend
- Set occlusion query as unsafe APIs
- Add validation tests

Bug: dawn:434
Change-Id: I3d1cefed780812dd62fb082287ff71530b76ebee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31321
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-18 09:47:52 +00:00
Corentin Wallez 55f251dffe RefBase: remove implicit conversion to bool.
This helps push for comparing against nullptr more consistently.

Also replaces .Get() == nullptr and .Get() != nullptr with just ==
nullptr and != nullptr.

Bug: dawn:89
Change-Id: I884a4819f97305a73c11bad84391d1d2113ab7e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32922
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-18 09:10:22 +00:00
Jiawei Shao a0758a1aef D3D12: Only enable toggle 'use_dxc' when Dawn can load DXC DLLs
This patch adds an additional check in the initialization of device
on D3D12 backend to ensure that 'use_dxc' is enabled only when Dawn
can load DXC DLLs (dxil.dll and dxcompiler.dll).

BUG=dawn:402

Change-Id: I85bc8698cf54b612244efc3673241f60a9cee209
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-11-18 00:14:31 +00:00
Corentin Wallez d98e8b70bb Use smart Refs for IOKit and CoreFoundation objects.
Bug: dawn:89
Change-Id: Idea634bcc65ab4ec017f4e4c2431e95915f533df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32661
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-17 11:35:11 +00:00
Austin Eng f2bc3b3edd Print warning if errors occur and no error callback has been set
Bug: none
Change-Id: Ibbd6f90be5192ad3975bb8b24f9b3053f7f9d74f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32744
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-16 23:32:36 +00:00
Corentin Wallez 0055d95fa7 Metal: Wrap NS classes and protocols in NSRef.
This makes refcounting of these objects more automatic to try and
prevent leaks or use-after-frees in the future.

Also removes operator* from RefBase (and Ref) because it is never used
and cannot work in a normal way for ObjectiveC protocols that cannot be
dereferenced.

Bug: dawn:89

Change-Id: I2e3fbfd638e2ba76d8c563f30bc489a384152552
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32161
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-16 23:07:56 +00:00
Austin Eng 1805e46a15 Remove --skip-validation test flag from Dawn tests
--enable-toggles=skip_validation is now the correct way to set
the toggle.

Bug: dawn:571
Change-Id: Ia05f542693fdd0eaadb0d87682a2f4b122e2ccb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32743
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-16 22:41:36 +00:00
Robert Sesek dd6b36e880 Use the correct GN variable for the Mac deployment target.
The GN files were incorrectly using mac_min_system_version to refer to
the deployment target. The right variable is mac_deployment_target, and
using mac_min_system_version breaks Chrome's ability to update the
minimum system version without needing to update the deployment target.

Bug: chromium:1148931
Change-Id: I4c49bb24cb6c4293249c5cb26dd8971b863d260c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32720
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-16 14:53:59 +00:00
Hao Li 575729e8dd Add query availability tracking in render pass encoder
The same query cannot be written twice in same render pass, so each
render pass also need to have its own query availability map.

Update timestamp query to only check the same query overwrite in same
render pass.

Bug: dawn:434
Change-Id: Icb070adf79a3d76c25367675f7432666eb0dd84f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2020-11-16 02:24:06 +00:00
Austin Eng 464aaeb558 Add InjectValidationError to command encoder
Needed to implement bytesPerRow/rowsPerImage validation
in Blink.

Bug: dawn:566
Change-Id: I60e9ebd57e40d5043e7277cdc560cbf673bc2576
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32582
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-14 01:24:03 +00:00
Austin Eng b38a9c3ee7 Add end2end tests flags --enable-toggles and --disable-toggles
Also changes test helpers to use a generic HasToggleEnabled instead
of a helper function per-toggle.

Bug: dawn:571
Change-Id: Ifd2e787a733382dcd5ad08222616c12cb42fb62b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32300
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-14 01:09:23 +00:00
Austin Eng da1f66c8ce Update DepthBiasTests to use WGSL
Bug: dawn:572
Change-Id: Ie221813162792229bf53f4123c262be929256f39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32509
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 18:41:32 +00:00
Austin Eng b1cdcffef4 Update CullingTests to use WGSL
Bug: dawn:572
Change-Id: Iacaec3b0a56b357159c8beff26229812538c68b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32508
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 18:18:22 +00:00
Austin Eng 53c5cbeaf5 Update ComputeIndirectTests to use WGSL
Bug: dawn:572
Change-Id: Ib117cd2ea2a7a536c6990cc1481e179340fab4d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32506
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 18:03:52 +00:00
Austin Eng c2eb8653ac Update CompressedTextureFormatTests to use WGSL
Bug: dawn:572
Change-Id: Ie2fbe2c24ee5ec93e145018a1251f8a11f457ee9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32504
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 17:47:29 +00:00
Austin Eng e08776ae09 Update ColorStateTests to use WGSL
Bug: dawn:572
Change-Id: Id94d249c76098bcce0351fb8cca06879db75d638
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32503
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 17:30:59 +00:00
Austin Eng f6958ff783 Update ClipSpaceTests to use WGSL
Bug: dawn:572
Change-Id: Iad55df4f39dfa91ef4554908acb9e2bb45703124
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32502
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 17:15:59 +00:00
Brandon Jones b6f4d53126 Only Increment Serials When Necessary On D3D12
Only increments last submitted and last completed serials from the D3D12
backend when commands were submitted to the GPU.

Bug: dawn:119
Change-Id: I01748b7f4ac90443adac4cdef29016184f992e9c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32162
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-13 02:11:12 +00:00
Austin Eng bc6a700bf5 dawn_wire: Protect against large allocations in ChunkedCommandHandler
Use std::nothrow on the allocation to catch failed allocations. Enforce
a max allocation limit a bit lower than ASAN's max 2GB allocation.

Bug: chromium:1145204
Change-Id: I91f2ddd5b58da6c39d4ab8bc447f7d9b7af8615f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32340
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-13 01:49:12 +00:00
Austin Eng 8d69298d9b Rename DepthSamplingTests to DepthStencilSamplingTests
Bug: none
Change-Id: I2d1fc8bfd35ddb80f34724639ff14ad3fd1ed4d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32581
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-12 20:57:42 +00:00
Ryan Harrison 2b4609bb02 Use remapped entry point name in D3D12
Tint may remap entry point names when translating a shader, so need to
use the Inspector to get the remapped name for calling into DXC/FXC.

Roll third_party/tint/ 1995ddf87..1980095da (1 commit)

https://dawn.googlesource.com/tint/+log/1995ddf876ef..1980095da7f4

$ git log 1995ddf87..1980095da --date=short --no-merges --format='%ad %ae%s'
2020-11-12 rharrison [inspector] Convert GetRemapped to be a pass through

Created with:
  roll-dep third_party/tint

BUG=tint:273

Change-Id: I62cdd78334d4b3dacfdd7cf5668917622bc22ea2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32540
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-12 19:30:32 +00:00
Austin Eng 7ceffe8511 dawn_wire: Reject new callbacks if the client is disconnected
If the wire client is disconnected, it will not receive any
messages from the server. Reject all callbacks that are created.

Bug: dawn:556
Change-Id: I2eb2c449b1ca6c8ea3e74040ef095abfc46a9061
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31161
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-12 18:03:42 +00:00
Corentin Wallez 2089adc62a Move most of Ref's functionality in RefBase for reuse.
This will allow using the same logic for other kinds of smartpointers,
like NSRef<>

Bug: dawn:89
Change-Id: Idbe08208fdb38b236f52635bc913162e60baf0f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32160
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-12 11:47:59 +00:00
Austin Eng b70a5b02e9 Reject all callbacks with DeviceLost on wire client disconnect
When the wire is disconnected, the client will not receive any
messages from the server. We need to manually reject all callbacks.

Bug: dawn:556
Change-Id: Ia03456b3209dbe0e1e54543d344180d11d4c6f1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31162
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-11 21:01:18 +00:00
Austin Eng 3120d5ea0d Track and destroy all child objects on wire client destruction
This is needed so that:
 1. We can support multiple devices in the wire. The device will need
    to know how to destroy its child objects.
 2. The wire needs to be aware of all objects and their in-flight
    callbacks so that it can reject them if the wire is disconnnected.
    A future change will handle this.
 3. Fix leaks of objects on page teardown. When the page is torn down,
    the wire client is destroyed, and we skip calling release() for all
    objects since the object holding the proc table was also destroyed.

Bug: dawn:384, dawn:556

Change-Id: Ie23afe4e515b02e924fcfc2db92b749fd2257c9c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31160
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-11-11 19:46:18 +00:00
Corentin Wallez c04a0132be Remove deprecated Device::CreateQueue.
Bug: dawn:22
Change-Id: I0b2c9fec3440808c9a481fe215a4e25a604c79f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32022
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-09 22:32:35 +00:00
Corentin Wallez 3317374395 Use IsSubset in more places.
This helper function makes the code easier to read because the name
encodes the semantic of the operation compared to the bit-twiddling that
it replaces.

Bug: None
Change-Id: Iab587e04a91cf60acf8920de1f20bb55f3ea3816
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31668
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-06 17:11:50 +00:00
Corentin Wallez a701961ad3 SwapChainVK: Handle transform, imageCount, alphaMode.
This removes outstanding TODOs in the creation of the VkSwapChain
by correctly handling imageCount and validation that the surface
supports identity transform and opaque alpha mode.

Bug: dawn:269

Change-Id: Ifbc30a9832a6853731be0460928ddcd4966a1e6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31560
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-06 16:41:20 +00:00
Kai Ninomiya 16036cf206 Add WGPU_STRIDE_UNDEFINED and update bytesPerRow/rowsPerImage validation
This makes a nearly one-to-one mapping between the JS and C APIs, which
benefits projects like Blink and Emscripten.

- JavaScript's `undefined` is equivalent to C `WGPU_STRIDE_UNDEFINED`.
- JavaScript's `0` is equivalent to C `0`.
- To implement the API correctly, Blink must special-case an actual
  value coming in from JS that is equal to WGPU_STRIDE_UNDEFINED
  (0xFFFF'FFFF), and inject an error.

Keeps but deprecates a reasonable approximation of the old behavior.

Bug: dawn:520
Change-Id: Ie9c992ffab82830090d0dfc3120731e89cd9691c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-06 13:41:50 +00:00
Corentin Wallez 973d145df8 Make dawn_platform a component.
Bug: None
Change-Id: I29c20cd3dac759afee23bdaf5a4391081e29cbaa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31900
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2020-11-06 09:02:30 +00:00
Enrico Galli 2b6b0f45ff Add support for Tint's HLSL writer as a Toggle
This commit adds a Toggle that switches SPIRV-cross's HLSL generator for
Tint's HLSL writer. New Toggle currently defaults to false.

Bug: dawn:548
Change-Id: I37e238c6ba887efd65727809c8a6919df515a35e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31640
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
2020-11-05 18:52:49 +00:00
Corentin Wallez d42713de7a Remove support for multiple entrypoints with the same name
Previsouly having a ShaderModule with multiple entrypoints with the same
name and different stages was valid in Dawn. However it is disallowed by
the WGSL specification so change Dawn to index the ShaderModule's
entrypoints only by their name (instead of name and stage).

Bug: dawn:216
Change-Id: Id6fc80a03436b008c2f057bd30c70fdf240919e8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31665
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-05 13:25:16 +00:00
Jiawei Shao e87a8c466f DawnTest: only choose one adapter from those with same name and backendType
When running Dawn end2end tests on latest Windows 10 (20H2) in a Remote
Desktop session there can be multiple adapters with same name and type,
which will cause the crash of Dawn end2end tests as the GTest framework
doesn't allow two cases having the same name.

This patch fixes this issue by only choosing one adapter from the ones
with same name and backendType in DawnTests.

BUG=dawn:396
TEST=dawn_end2end_tests

Change-Id: I42de7fc1f3e9f8919af251c047cd873ba84d7190
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31583
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-05 08:38:46 +00:00
Corentin Wallez fb367e32c6 Reenable DepthBias tests on Swiftshader
The fix in Swiftshader has been rolled into Dawn so they pass.

Bug: dawn:524
Change-Id: I0328672f6cdb829cb28799160d9f584ebed2e422
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31666
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-04 15:59:11 +00:00
Austin Eng a0f1725c4f Support sampling depth and stencil of combined d/s formats
This CL adds sampling of depth-only and stencil-only texture
views on all backends. However, Metal on macOS <= 10.11 will
need a workaround to use separate depth/stencil textures for
each aspect since it is impossible to sample the stencil
aspect of a combined depth/stencil texture.

Also fixes sampling of depth24plus on D3D12 which had an
incomplete check for determining if a TYPELESS format is
necessary.

Bug: dawn:439, dawn:553
Change-Id: Id4991c565f822add200054296714e2dcd330119a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30725
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-04 15:27:11 +00:00
Corentin Wallez bf1e9532c4 Rolling 7 dependencies
Roll build/ c10077be5..787a783b9 (444 commits)

c10077be58..787a783b96

$ git log c10077be5..787a783b9 --date=short --no-merges --format='%ad %ae %s'
2020-11-02 sdefresne [ios] Add Swift compatibility library directory to lib_dirs
2020-11-02 chromium-autoroll Roll Fuchsia SDK from 0.20201101.3.1 to 0.20201102.1.1
2020-11-02 benmason Revert "Android: Enable use_debug_fission for official builds"
2020-11-02 chromium-autoroll Roll Fuchsia SDK from 0.20201101.2.1 to 0.20201101.3.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201101.1.1 to 0.20201101.2.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201031.3.1 to 0.20201101.1.1
2020-11-01 chromium-autoroll Roll Fuchsia SDK from 0.20201031.2.1 to 0.20201031.3.1
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201031.0.1 to 0.20201031.2.1
2020-10-31 dpranke Win tooling fixes for Python 3 compatibility.
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201030.2.1 to 0.20201031.0.1
2020-10-31 bjoyce Run junit tests on multiple threads.
2020-10-31 chromium-autoroll Roll Fuchsia SDK from 0.20201030.1.1 to 0.20201030.2.1
2020-10-30 dpranke Fix incorrect path in python2 GN templates.
2020-10-30 wenbinzhang Revert "Re-enabling aar .info file checker"
2020-10-30 thakis android+chromeos: Make sure 32-bit android arm builds use -mfloat-abi=softfp.
2020-10-30 agrieve Android: Add logging to proguard.py build step
2020-10-30 smaier Re-enabling aar .info file checker
2020-10-30 bjoyce Add option to print classpath to script.
2020-10-30 thakis ios: Pass -Wextra-semi to ObjC files with Xcode clang too.
2020-10-30 thakis ios: Disable -Wgnu-folding-constant for .m files.
2020-10-30 chromium-autoroll Roll Fuchsia SDK from 0.20201029.3.1 to 0.20201030.1.1
2020-10-30 agrieve Android: Enable use_debug_fission for official builds
2020-10-30 chromium-autoroll Roll Fuchsia SDK from 0.20201029.2.1 to 0.20201029.3.1
2020-10-30 agrieve Android: Fix use_debug_fission logic.
2020-10-30 agrieve Reland "Android: Enable vertical class merging in R8"
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201029.0.1 to 0.20201029.2.1
2020-10-29 smaier Using R8's built-in -checkdiscard ignoring
2020-10-29 agrieve Revert "Reland "Enable JDK library desugaring by default""
2020-10-29 sdefresne [ios] Fix a typo in variable name
2020-10-29 sdefresne [ios] Add support for toolchain using 14.0 deployment target
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201028.4.1 to 0.20201029.0.1
2020-10-29 dpranke Have Android bin/run_ wrappers call test_env.py  directly.
2020-10-29 bjoyce Fix comment.
2020-10-29 dpranke Have ChromeOS bin/run wrappers call test_env.py directly
2020-10-29 chromium-autoroll Roll Fuchsia SDK from 0.20201028.1.1 to 0.20201028.4.1
2020-10-28 dpranke Have fuchsia bin/run wrappers call test_env.py directly
2020-10-28 bpastene chromeos: Add basic RDB integration for all Tast results.
2020-10-28 sdefresne [ios] Update packaging rules to support "catalyst" environment
2020-10-28 dpranke Change test wrapper script arg handling.
2020-10-28 bpastene android: Allow custom artifacts to be passed to result_sink.Post().
2020-10-28 sdefresne [ios] Fix compiler and linker flags for "catalyst" environment
2020-10-28 sdefresne [ios] Remove ios_sdk_platform_abs_path gn variable
2020-10-28 ythjkt Lacros: Define BUILDFLAG(IS_CHROMSOS_ASH|LACROS).
2020-10-28 chromium-autoroll Roll Fuchsia SDK from 0.20201027.3.1 to 0.20201028.1.1
2020-10-28 thakis build: Disallow explicitly setting concurrent_links in lto builds.
2020-10-28 ganesh midl.py remove legacy |dynamic_guid|, replace with new |dynamic_guids|.
2020-10-28 chromium-autoroll Roll Fuchsia SDK from 0.20201027.1.1 to 0.20201027.3.1
2020-10-27 ganesh midl.py multiple guid substitution enhancements.
2020-10-27 chonggu [Fuchsia] Change result and filter file locations
2020-10-27 harringtond Allow -check directives that R8 ignores
(...)
2020-09-11 dpranke Reland "Rename wrapper_scripts for generated_script tests in MB."
2020-09-11 svenzheng [lacros] Runner retry for gsutil copy
2020-09-11 chromium-autoroll Roll Fuchsia SDK from 0.20200911.0.1 to 0.20200911.1.1
2020-09-11 chromium-autoroll Roll Fuchsia SDK from 0.20200910.2.2 to 0.20200911.0.1
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200910.1.1 to 0.20200910.2.2
2020-09-10 svenzheng Adds android_sync_integration_tests to CI
2020-09-10 daniel.l Improve support for Python3 in Mac, iOS build
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200910.0.1 to 0.20200910.1.1
2020-09-10 chromium-autoroll Roll Fuchsia SDK from 0.20200909.2.1 to 0.20200910.0.1
2020-09-10 agrieve Add GN assert for enable_resource_allowlist_generation
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200909.1.1 to 0.20200909.2.1
2020-09-09 agrieve Revert "Increase android32_ndk_api_level 16 -> 21"
2020-09-09 liaoyuke [lacros] Retry starting ash-chrome
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200909.0.1 to 0.20200909.1.1
2020-09-09 chromium-autoroll Roll Fuchsia SDK from 0.20200908.2.1 to 0.20200909.0.1
2020-09-09 pkotwicz [Build] Make remaining targets compatible with 'enforce_resource_overlays'
2020-09-08 benmason Fix build_vars.txt
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200908.1.1 to 0.20200908.2.1
2020-09-08 sokcevic Update codesearch links
2020-09-08 mheikal android_resources targets can no longer create srcjars
2020-09-08 agrieve Increase android32_ndk_api_level 16 -> 21
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200908.0.1 to 0.20200908.1.1
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200907.2.1 to 0.20200908.0.1
2020-09-08 chromium-autoroll Roll Fuchsia SDK from 0.20200907.1.1 to 0.20200907.2.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200907.0.1 to 0.20200907.1.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200906.3.1 to 0.20200907.0.1
2020-09-07 chromium-autoroll Roll Fuchsia SDK from 0.20200906.2.1 to 0.20200906.3.1
2020-09-06 chromium-autoroll Roll Fuchsia SDK from 0.20200902.0.1 to 0.20200906.2.1
2020-09-04 agrieve Roll bundletool 0.13.3 -> 1.2.0
2020-09-03 hidehiko lacros: Migrate chromeos/chromeos_buildflags.h to build/chromeos_buildflags.h
2020-09-03 agrieve Grit: whitelist -> allowlist
2020-09-03 hidehiko lacros: Renamed build/lacros_buildflags.h to build/chromeos_buildflags.h
2020-09-03 aeubanks Re-enable -Wstring-concatenation
2020-09-03 bsheedy Fix handling of missing Gold links
2020-09-02 huangs [Lacros] Size dashboard: Track total and total compressed sizes.
2020-09-02 bjoyce Add summary html to test results.
2020-09-02 benmason Allow "optimize_for" param for bundletool.
2020-09-02 sdefresne [ios] Fix build/config/ios/hardlink.py when output exists
2020-09-02 huangs [Lacros] Suppress ignored params in lacros_resource_sizes.py.
2020-09-02 chromium-autoroll Roll Fuchsia SDK from 0.20200901.3.1 to 0.20200902.0.1
2020-09-02 pkotwicz [Android] Make build style more strict about resource overriding
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200901.1.1 to 0.20200901.3.1
2020-09-01 yngve Specify GN not_needed() for lint deps
2020-09-01 jbudorick Use denylist throughout //build/android.
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200831.3.1 to 0.20200901.1.1
2020-09-01 msisov Reland "Reland "Reland "X11 and Ozone: enable use_x11 and use_ozone"""
2020-09-01 chromium-autoroll Roll Fuchsia SDK from 0.20200831.2.1 to 0.20200831.3.1
2020-08-31 mikenichols install-build-deps: Remove redundant dev_list
2020-08-31 bjoyce Remove need for flag option.
2020-08-31 chromium-autoroll Roll Fuchsia SDK from 0.20200831.1.1 to 0.20200831.2.1

Roll buildtools/ ff93f3ea1..98881a129 (5 commits)

ff93f3ea1a..98881a1297

$ git log ff93f3ea1..98881a129 --date=short --no-merges --format='%ad %ae %s'
2020-10-26 pnoland Revert "Roll GN from e002e68a..f5f465b5"
2020-10-26 rjascani Roll GN from e002e68a..f5f465b5
2020-09-29 normando [buildtools] Add DIR_METADATA files.
2020-09-14 sdefresne [apple] Use `!is_apple` gn variable when appropriate
2020-09-09 sdefresne Roll GN from 6f13aaac..e002e68a

Roll testing/ e5ced5141..3e2640a32 (1534 commits)

e5ced51413..3e2640a325

$ git log e5ced5141..3e2640a32 --date=short --no-merges --format='%ad %ae %s'
2020-11-02 yekuang Translate '--swarming' Py arg to '--server' Go arg in trigger scripts
2020-11-01 javierrobles [iOS][Biometric-Auth] Enable by default
2020-11-01 caitlinfischer Remove Windows occlusion studies from the testing config.
2020-11-01 le.hoang.q Use multiple shards for dEQP GLES3 tests on Metal
2020-10-31 ynovikov Start running tests on "Mac FYI Release (Intel UHD 630)"
2020-10-31 enga Run WebGL conformance with V8 FastCalls enabled
2020-10-30 wenbinzhang [benchmarking] Add similar time log for gtests
2020-10-30 rmhasan weblayer, skew tests: Add pie tester that runs skew tests
2020-10-30 bsheedy Retry minidump tests
2020-10-30 kdillon Remove field trial config for PrioritizeCompositingUntilBeginMainFrame.
2020-10-30 ssilkin Disable CanSetupH264VideoCallOnSupportedDevice on Android WebRTC FYI dbg.
2020-10-30 jonahr Test dEQP GLES3 on ANGLE's Metal backend
2020-10-30 andzaytsev Privacy elevated on Android: cleaned up the flag and the codepath since this the feature fully launched
2020-10-30 snijhara Delete all users through update required screen
2020-10-30 blundell [Android] Add support for overriding user data dir in Java browsertests
2020-10-30 thakis Add more test binaries to the memory bots.
2020-10-30 yekuang Reland "Add --use-swarming-go to the custom trigger scripts"
2020-10-29 lpz Make it possible to have a default --isolated-script-test-output arg.
2020-10-29 bdea Create a fieldtrial for EnhancedProtectionPromoCard.
2020-10-29 holte MetricsDownsampleConsistently trial config
2020-10-29 rockot Remove Storage Service test suites from bots
2020-10-29 meacer [Lookalikes] Fully launch punycode interstitial
2020-10-29 michaelbai ContentCapture: Implement constant streaming
2020-10-29 manukh [omnibox] [rich-autocompletion] Add fieldtrial_testing_config.json entry
2020-10-29 svenzheng [lacros] Remove all experimental flags from lacros FYI builder
2020-10-29 ynovikov Add Windows and Linux AMD RX 5500 XT GPU.FYI CI and try bots
2020-10-29 jdeblasio [Lookalikes] Enable target embedding by default on ToT.
2020-10-28 dpranke Have fuchsia bin/run wrappers call test_env.py directly
2020-10-28 wenbinzhang [benchmarking] remove shading environment variables before running gtests
2020-10-28 wanderview URLPattern: Add BUILD.gn and initial unittest.
2020-10-28 chonggu Add --isolate-map-file Flag to generate_buildbot_json.py script.
2020-10-28 dpranke Change test wrapper script arg handling.
2020-10-28 drott Revert "Add --use-swarming-go to the custom trigger scripts"
2020-10-28 tasak Added "Enabled_V3" to PartitionAllocGigaCage.
2020-10-28 yekuang Add --use-swarming-go to the custom trigger scripts
2020-10-28 hypan Add LUCI+mb+test configs for the CI and trybot win10-inverse-fieldtrials-fyi-rel
2020-10-28 jomag Revert "Custom builder for EA SWA"
2020-10-28 zhaoyangli [iOS] Roll iOS14 beta bots to Xcode 12.2 beta 3 (12b5035g)
2020-10-28 ynovikov Add "Mac FYI Release (Intel UHD 630)" GPU.FYI CI bot and trybot
2020-10-28 cassew Update field trial config for TurnOffStreamingMediaCaching experiment
2020-10-27 leszeks [v8] Add off-thread finalization field trial
2020-10-27 zhaoyangli [code coverage] Add 2 coverage try builders mirroring iOS CQ builders
2020-10-27 kmilka Add share features to testing config
2020-10-27 johnchen Roll Catapult from 4f6c1bb4191b to a01dd2af4292 (1 revision)
2020-10-27 harrisonsean [iOS][Safety Check] Add fieldtrial for safety check ios
2020-10-27 smcgruer [wptrunner] Enable status=test features for run_wpt_tests.py
2020-10-27 rushans Add the experiment to fieldtrial_testing_config
2020-10-27 caitlinfischer Remove DialMediaRouteProvider from testing config.
2020-10-27 thestig Fix field trial testing config for PDFViewerUpdate.
2020-10-27 shaktisahu Query Tiles : Updated finch config to match the launch group
(...)
2020-04-23 svenzheng Revert "Re-enable TwoClientDictionarySyncTest.Sanity_E2ETest test"
2020-04-23 agable Use linux hosts for all mac triggered testers
2020-04-22 xinghuilu [Android] Add real time check for all devices in field trial config.
2020-04-22 hypan android: add an alternative dimension for kitkat mixins
2020-04-22 lindsayw [ios] Add optional dimensions for MacOS10.15 in ios upstream waterfall
2020-04-22 steveroe [fuchsia] Save the fuchsia system log by default.
2020-04-22 msramek Add the PasswordCheck study to fieldtrial_testing_config.json
2020-04-22 agable Don't restrict Mac10.15 Tests to non-gpu testers
2020-04-22 xiaochengh Add field trial entry for FontPreloadingDelaysRendering
2020-04-22 bsheedy Make Win Intel Exp mixin have 2 GPUs
2020-04-22 bsheedy Switch service account for -dev swarming
2020-04-22 anastasiian Add fieldtrial testing config for EduCoexistence
2020-04-22 agable Only run Mac non-isolated scripts in compile tasks
2020-04-22 eseckler infra: Add CI+trybot configuration for linux-perfetto-rel
2020-04-22 pmarko sheriff: Add two shards to browser_tests on Linux ChromiumOS MSan Tests bot
2020-04-22 svenzheng Re-enable TwoClientDictionarySyncTest.Sanity_E2ETest test
2020-04-22 rogerta Create a field trial testing config for Webprotect alpha.
2020-04-22 chonggu [Fuchsia] Enable media_blink and gin unittests on Fuchsia FYI bots.
2020-04-22 agable Run FYI Mac non-isolated scripts in compile task
2020-04-21 agable Don't run non-isolated scripts on Mac10.15 Tests
2020-04-21 bpastene Add a note to //testing/buildbot/OWNERS regarding CQ changes.
2020-04-21 liaoyuke Set up win64-chrome official ci and try bots
2020-04-21 wez Revert "[Fuchsia] Enable cc_unittests on Fuchsia x64 CI bot."
2020-04-21 boliu Add weblayer_unittests to main ci/cq
2020-04-20 jeffyoon [pgo] system_health.common_desktop benchmark for PGO builders
2020-04-20 chonggu [Fuchsia] Add stable unittests to Fuchsia CI bots.
2020-04-20 mvanouwerkerk Add RemoteCopy to testing config.
2020-04-20 chonggu [Fuchsia] Enable cc_unittests on Fuchsia x64 CI bot.
2020-04-20 bsheedy Switch Win10 Intel Exp builder to single pool
2020-04-20 guidou [AudioService] Update field trial config.
2020-04-19 hypan Revert "android: Add AR test to android-10-arm64-rel builder"
2020-04-18 hypan android: Add AR test to android-10-arm64-rel builder
2020-04-18 bpastene Strip chrome before deploying it when running disk-usage Tast test.
2020-04-17 mmenke Update PartitionConnectionsByNetworkIsolationKey field trial config.
2020-04-17 chouinard Disable RenderTests on Android CFI bot
2020-04-17 bsheedy Switch Win10 Intel Exp to 2 pools
2020-04-17 xinghuilu Add SafeBrowsingRealTimeUrlLookupEnabledWithToken in field trial config.
2020-04-17 caitlinfischer Enable demographics features by default on iOS.
2020-04-17 olivierrobin Add PRODUCT_BUNDLE_IDENTIFIER in xcode attributes
2020-04-17 michaelbai Add components_junit_tests target
2020-04-17 sophiechang Add fieldtrial testing config for Client-Side Reactive Preconnect
2020-04-16 estaab Add weblayer skew tests to android-weblayer-pie-x86-fyi-rel.
2020-04-16 jessemckenna Add SlowDCTimerInterruptsWin field-trial config
2020-04-16 bsheedy Remove Gold service account from -dev bots
2020-04-16 treib Add "ios" to fieldtrial testing config for SyncInstanceIDTokenTTL
2020-04-15 jeffreycohen [ShareButtonInTopToolbar] match finch experiment params.
2020-04-15 bsheedy Allow Skia Gold Use In Android Tests
2020-04-15 jeffreycohen [ShareButtonInToolbar] add field trial for android experiment
2020-04-15 jeffyoon [ios/infra] ios13-sdk-simulator missed an iPhone X 13.3->13.4
2020-04-15 lpz Copy wpt output to full_results.json, which allows hooking into legacy results viewer.

Roll third_party/googletest/ a09ea700d..282877317 (132 commits)

a09ea700d3..2828773179

$ git log a09ea700d..282877317 --date=short --no-merges --format='%ad %ae %s'
2020-10-27 absl-team Googletest export
2020-10-26 absl-team Googletest export
2020-10-20 sonzogniarthur Fix typo "definedin in" => "defined in"
2020-10-15 absl-team Googletest export
2020-10-15 absl-team Googletest export
2020-10-15 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-14 dmauro Googletest export
2020-10-14 absl-team Googletest export
2020-10-13 dmauro Googletest export
2020-10-13 dmauro Googletest export
2020-10-13 absl-team Googletest export
2020-10-13 absl-team Googletest export
2020-10-09 ofats Googletest export
2020-10-09 absl-team Googletest export
2020-10-08 absl-team Googletest export
2020-10-12 peternewman Fix a typo
2020-10-07 manavrion Improve FilePath::Normalize method
2020-10-07 pravin1992 Issue 2135: Change template args in NiceMock, NaggyMock and StrictMock from A1, A2, ... to TArg1, TArg2,... to avoid clash with legacy header files
2020-09-29 absl-team Googletest export
2020-10-01 63450189+ranodeepbanerjee A slight Gramatical change.
2020-09-29 dmauro Googletest export
2020-09-29 absl-team Googletest export
2020-09-25 absl-team Googletest export
2020-09-27 56075233+keshavgbpecdelhi Update cook_book.md
2020-09-23 absl-team Googletest export
2020-09-23 absl-team Googletest export
2020-09-21 absl-team Googletest export
2020-09-24 thomas.barbier Fix warning maybe-uninitialized
2020-09-18 absl-team Googletest export
2020-09-17 absl-team Googletest export
2020-09-18 63900998+JethroSama Update README.md, added missing 'a'
2020-09-08 absl-team Googletest export
2020-09-02 dmauro Googletest export
2020-09-01 absl-team Googletest export
2020-09-01 absl-team Googletest export
2020-08-26 absl-team Googletest export
2020-08-25 27jf Add timestamp to in old method mock macro guide
2020-08-20 absl-team Googletest export
2020-08-17 absl-team Googletest export
2020-08-12 krzysio Googletest export
2020-08-12 robert.earhart Export LICENSE
2020-08-11 absl-team Googletest export
2020-08-11 dmauro Googletest export
2020-08-10 absl-team Googletest export
2020-08-05 absl-team Googletest export
2020-08-03 absl-team Googletest export
(...)
2020-06-19 amatanhead Make EXPECT_THROW and EXPECT_NO_THROW macros more informative
2020-06-19 mayur.shingote Updated googletest issue tracker url.
2020-06-17 absl-team Googletest export
2020-06-15 absl-team Googletest export
2018-05-01 lantw44 Avoid using environ on FreeBSD
2020-06-12 dmauro Googletest export
2020-06-10 absl-team Googletest export
2020-06-08 absl-team Googletest export
2020-06-08 absl-team Googletest export
2020-06-05 dmauro Googletest export
2020-06-10 rharrison Fix build issue for MinGW
2020-06-04 dmauro Googletest export
2020-06-03 absl-team Googletest export
2020-06-02 absl-team Googletest export
2020-06-01 absl-team Googletest export
2020-05-30 eli fix compilation on OpenBSD 6.7
2020-03-07 krystian.kuzniarek make UniversalPrinter<std::any> support RTTI
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::any (without support for RTTI)
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::optional
2020-03-07 krystian.kuzniarek specialize UniversalPrinter<> for std::variant
2020-05-28 dmauro Googletest export
2020-05-28 dmauro Googletest export
2020-05-27 absl-team Googletest export
2020-05-27 dmauro Googletest export
2020-05-19 absl-team Googletest export
2020-05-18 absl-team Googletest export
2020-05-18 durandal Googletest export
2020-05-18 absl-team Googletest export
2020-05-14 absl-team Googletest export
2020-05-25 invalid_ms_user Use count function instead of handwritten loop
2020-05-10 mate.pek README.dm: Renamed related open source project name: Catch2 and Google Test Explorer -> C++ TestMate
2020-05-13 absl-team Googletest export
2020-05-13 absl-team Googletest export
2020-05-11 absl-team Googletest export
2020-05-08 martin Remove an explicit include of debugapi.h
2020-05-08 martin Revert "Googletest export"
2020-05-05 igor.n.nazarenko Detect proto messages based on presense of DebugString.
2020-03-26 mvoorsluys Fix test with stack.
2020-03-29 verdoialaurent Fix --gtest_print_time coloring
2020-03-26 mvoorsluys Fixed xml unit-tests and added extra tests
2020-03-26 mvoorsluys Fix multiple \n characters in xml file when using GTEST_SKIP.
2020-03-26 mvoorsluys Only write ">\n" once when there is failure and skipped tests.
2020-03-26 mvoorsluys Output skipped information in the xml file.
2020-03-21 ngompa13 Set the version for the libraries
2020-02-21 nini16041988-gitbucket Add missing call for gtest_list_output_unittest_ unitTest. Add unitTest for fixed TEST_P line number. Use CodeLocation TestInfo struct.
2020-02-18 nini16041988-gitbucket Fix: shadow member
2020-02-18 nini16041988-gitbucket Add correct line number to TEST_P test cases for gtest_output.
2020-02-06 59134746+aribibek fix a link to documentation
2020-01-17 hgsilverman Fix always false condition and clean function body
2020-01-22 mjvk Fixes extensions missing for QNX

Roll third_party/jinja2/ b41863e42..a82a4944a (4 commits)

b41863e426..a82a4944a7

$ git log b41863e42..a82a4944a --date=short --no-merges --format='%ad %ae %s'
2020-09-18 keishi Update COMPONENT for jinja2 and mako
2020-04-03 adetaylor remove copybara initialization artifacts
2020-04-03 adetaylor Copybara Service Migration Initialization.
2020-04-03 adetaylor Adding CPEPrefixes for more dependencies.

Roll third_party/markupsafe/ 8f45f5cfa..0944e71f4 (3 commits)

8f45f5cfa0..0944e71f4b

$ git log 8f45f5cfa..0944e71f4 --date=short --no-merges --format='%ad %ae %s'
2020-10-22 ehmaldonado Add DIR_METADATA files to directories under //third_party
2017-01-19 ymzhang remove copybara initialization artifacts
2017-01-19 ymzhang Copybara Service Migration Initialization.

Roll tools/clang/ fcef86e30..eb065289a (42 commits)

fcef86e30a..eb065289a4

$ git log fcef86e30..eb065289a --date=short --no-merges --format='%ad %ae %s'
2020-11-02 bartekn Update class name for ClassPropertyValueSetter::property_
2020-11-02 bartekn Add SockaddrStorage::addr to ignore list
2020-10-31 bartekn Ignore iovec::iov_base that requires .get() in a different repository
2020-10-31 bartekn Update manual-paths-to-ignore.txt
2020-10-31 bartekn Remove no longer needed fields
2020-10-30 bartekn Un-ignore UnretainedWrapper::ptr_
2020-10-30 lukasza Go back to unconditionally skipping fields in generated files.
2020-10-30 bartekn Add to and fix TRACE_EVENT/EXPECT_THAT section
2020-10-30 thakis clang upload script: Try again to not run tricium.
2020-10-29 thakis Tell tricium to not run clang-tidy on clang rolls.
2020-10-27 lukasza Remove automatically covered cases from manual-fields-to-ignore.txt
2020-10-27 lukasza Delete "const-char" filtering rule (redundant with "global-scope" rule).
2020-10-26 lukasza "union" filtering rule should recurse into nested structs.
2020-10-26 lukasza Improve "global-destructor" filtering rule: multiple fields, arrays, ...
2020-10-26 lukasza Emit constexpr-initialized fields as candidates for exclusion.
2020-10-26 thakis clang build scripts: Explicitly disable memprof.
2020-10-23 lukasza Appending .get() to arguments of implicitly invoked constructors.
2020-10-22 davidvc blink: Add absl::variant to the blink symbol allowlist
2020-10-21 lukasza Skip more scenarios via blocklist, rather than unconditionally.
2020-10-20 hans Clang plugin build fixes after upstream https://reviews.llvm.org/D84362
2020-10-19 lukasza Add --target_os=... support to run_tool.py and generate_compdb.py
2020-10-19 omerkatz heap: Use fullpaths in clang plugin ignored/allowed directories
2020-10-16 keishi Add fields to ignore for rewrite_raw_ptr_fields
2020-10-13 keishi Add chrome/chrome_cleaner to rewrite_raw_ptr_fields manual ignore paths
2020-10-06 ehmaldonado Add DIR_METADATA files to //tools
2020-10-06 bartekn Add android_webview/public/ to manual-paths-to-ignore
2020-10-06 bartekn Fix pointer paths (missing subclass)
2020-10-05 gbiv goma_link: parse `,` from `-mllvm` args appropriately
2020-10-04 aeubanks Use downloaded gcc toolchain in compiler-rt tests
2020-10-02 thakis Re-roll clang llvmorg-12-init-5035-gd0abc757-3 : llvmorg-12-init-5627-gf086e85e-1.
2020-09-30 aeubanks Revert "Clang build.py, set shell=True in GetCommitDescription"
2020-09-30 bartekn Update manual ignore-list based on recent rewrites
2020-09-29 hans Clang build.py: Remove debug line from 69f5d9865577
2020-09-29 hans Clang build.py, set shell=True in GetCommitDescription
2020-09-22 lukasza Exclude from the rewrite directories only used in renderer processes.
2020-09-22 thakis Revert "Roll clang llvmorg-12-init-5035-gd0abc757-2 : llvmorg-12-init-5627-gf086e85e-1."
2020-09-17 lukasza Emitting union fields into a blocklist.
2020-09-16 hans Clang build script: link against rpmalloc on Windows
2020-09-14 thakis Roll clang llvmorg-12-init-5035-gd0abc757-2 : llvmorg-12-init-5627-gf086e85e-1.
2020-09-11 akhuang clang build.py: set -DLLVM_ENABLE_DIA_SDK=OFF to use the native symbolizer, and also remove DIA dependencies.
2020-09-08 thakis Roll clang llvmorg-12-init-4187-g33ce275f-1 : llvmorg-12-init-5035-gd0abc757-1.
2020-09-01 bartekn Add pointers that cause run-time issues to manual-fields-to-ignore

Created with:
  roll-dep build buildtools testing third_party/googletest third_party/jinja2 third_party/markupsafe tools/clang

Change-Id: I93e18255bc2468eb467a267d22025646d80ec0a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31567
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-04 09:44:47 +00:00
Jiawei Shao 98e078134d Remove DAWN_NATIVE_EXPORT declaration from dawn_platform::Platform
This patch fixes a LNK4217 error when building Dawn perf tests with
the latest VS2019 by removing DAWN_NATIVE_EXPORT declaration from
dawn_platform::Platform().

BUG=dawn:396

Change-Id: I232ac741f6356981c917fa4f1ed8ddf3bce280ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-04 09:44:37 +00:00
Yan, Shaobo db8766bb23 Support internal pipelines for Dawn
Like copyTextureCHROMIUM in Chromium, CopyImageBitmapToTexture can use
internal pipeline to do the GPU uploading. But Dawn doesn't support
internal pipeline now.

This patch adds the first internal pipeline for Dawn and add the API
CopyTextureForBrowser to use internal pipeline to do gpu uploading.

The patch integrates very simple wgsl vertex/fragment shaders to do
simple direct blit to verify the whole system works.

BUG=dawn:465

Change-Id: I8b566af38a10eea00f7426c39e752958ef057abd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30960
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-04 02:30:16 +00:00
Corentin Wallez 18c7b0e0b1 Add the -Wdeprecated-copy-dtor warning.
This should fix the warning triggering when using Dawn in Skia.

Bug: None
Change-Id: I045ebc87f9e8dbff035920fc6eaa409c2b70d0f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30701
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-03 14:24:05 +00:00
Corentin Wallez 8d248300c4 Add the disallow_unsafe_apis toggle.
Some APIs exposed by Dawn are not expected to be fully secured until
after the first Origin Trial of WebGPU. To prevent their usage we add a
new toggle that will be set by default by Chromium. This toggle throws a
validation error when an unsafe API is used.

Bug: chromium:1138528

Change-Id: I831db70bdac5128ebc32d36d55a0eaefc42c1807
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31443
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-03 10:54:56 +00:00
Corentin Wallez 43ef0a365b ValidationTest: Make custom device creation go through a virtual method
Previously tests that needed to use a device that wasn't the default
device created a new one via a method that only supported customizing
extensions. Instead of adding a second function the device creation is
made completely customizable by querying the test's device via a
overridable method.

This heavily refactors the QuerySet tests to use the new methods
(previously they were using 3 different devices in the same fixture) but
loses a little bit of coverage of what happens when some query
operations are done with mixed devices.

This is required for a follow-up CL that adds tests for a device created
with the "disallow_unsafe_api" toggle that needs to be set on device
creation.

Bug: chromium:1138528

Change-Id: Ic2f5d876adca251b34ea594f70f344ac7669910e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31442
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-03 10:18:05 +00:00
Corentin Wallez 2831cab80e Suppress -Wdeprecated-copy-dtor for Skia.
Bug: None
Change-Id: I20c7f201223c07af909a5a85bdd9c004d2c5cd30
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31563
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-02 14:45:44 +00:00
Ben Clayton 6007963593 Migrate tint to use new parser constructor
The `tint::reader::wgsl::Parser` constructor is being migrated to taking a `tint::Source::File` pointer instead of a string. This help improve error messages by letting them refer to the source file locations.

Bug: tint:282
Change-Id: Ib21351f77fbaa10a07d096b38e51373be68ba424
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31562
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-11-02 14:17:14 +00:00
Kai Ninomiya 5a1d786754 Check for deprecation warnings in ValidationTests
And adds EXPECT_DEPRECATION_WARNING where necessary in validation tests.

Bug: dawn:520, dawn:527
Change-Id: Ic8e103e4b7b5784a2009519e0a18ed16088632b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-10-30 17:54:46 +00:00
Kai Ninomiya 2bb8035ddc Integrate deprecation testing into DawnTestBase
This makes it a lot easier to modify old tests to test deprecation
behavior, and means we can mark all of the places that are going to
break in the deprecation CL (while we're thinking about it) instead of
the removal CL (which is weeks later).

It also makes it so all deprecation warnings in the tests will be
caught. Turns out that they were already clean.

Bug: dawn:520
Change-Id: I429f667207b88df04341179369bb6d24e034ca65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31141
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-28 21:23:45 +00:00
Kai Ninomiya 54123a391f Allow unaligned source offset in writeTexture
With some refactoring of the relevant validation code.

Bug: dawn:520
Change-Id: Iedda0f7b1b67c20d3a88f2c4183dcc8eeae2096f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30742
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-10-27 19:30:57 +00:00
Corentin Wallez 6b087819dd s/OutputAttachment/RenderAttachment/g
But also keep OutputAttachment so it can be gradually changed in all
dependants.

See https://github.com/gpuweb/gpuweb/pull/1168 and
https://github.com/gpuweb/gpuweb/pull/1168

Bug: dawn:22
Change-Id: I6a1ec1de6c22ca4deac88b7fffde4b98d9d54a84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31040
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-27 15:35:56 +00:00
Corentin Wallez 25eeaa3d39 Make Surface reference its attached SwapChain
This solves an issues where when switching swapchains the previous
one was destroyed before the new one was created, doing so detached
itself from the Surface, which in turn made the new swapchain not do
a graceful transition via vkSwapchainCreateInfoKHR::oldSwapchain.

Keeping the reference on the surface makes sure we always have
knowledge of the previous swapchain when replacing it. It requires
re-working the lifetime model of NewSwapChainBase to not require a
call to DetachFromSurface in the destructor, and having the Device
explicitly tell a swapchain it got attached on creation (otherwise
there are ASSERTs firing when swapchain creation fails).

In addition, backends are changed to use a SwapChain::Create method
and fail with a validation error (for now) when the previous swapchain
didn't use the same API.

vulkan::SwapChain is updated to use the previous swapchain's device's
fenced deleter to destroy it which is important in the device
switching tests.

The SwapChainValidationTests are updated because with the lifetime
changes the texture view can be kept alive after the application has
lost the last reference to the wgpu::SwapChain.

TBRing since it was reviewed in a different CL (but for the wrong
branch).

TBR=enga@chromium.org
TBR=senorblanco@chromium.org

Bug: dawn:269
Change-Id: Ie4374b5685af990d68969ab9cd7767e53c287ace
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31041
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-27 11:31:26 +00:00
Jiawei Shao 42103bc2e9 Fix crash when device is removed before CreateReady*Pipeline callback
This patch fixes a crash issue when the device is destroyed before
the callback of CreateReady{Render, Compute}Pipeline is called. Now
when the callback is called in DeviceBase::ShutDown(), the cached
pipeline object will also be destroyed before the callback returns.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I91ec2608b53591d265c0648f5c02daf7fadac85e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30744
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-10-24 03:11:43 +00:00
Jiawei Shao ebdbc03b77 Treat VK_SUBOPTIMAL_KHR as a valid return value of vkQueuePresentKHR
vkQueuePresentKHR() may return VK_SUBOPTIMAL_KHR when "a swapchain no
longer matches the surface properties exactly, but can still be used to
present to the surface successfully", so it can also be treated as a
valid return value that indicates vkQueuePresentKHR() has returned
successfully.

This patch fixes the crash when we run the dawn_end2end_test
SwapChainTests.ResizingWindowOnly on the latest Intel Vulkan Windows
driver.

BUG=dawn:269
TEST=dawn_end2end_tests

Change-Id: I571ee74ea75b7a7f6fa59c7eebeed87a2429180d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30842
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-10-24 02:46:13 +00:00
Kai Ninomiya c9d0b492d5 Implement new formula for requiredBytesInCopy
Changed upstream in:
- https://github.com/gpuweb/gpuweb/pull/1014
- https://github.com/gpuweb/gpuweb/pull/1130

Note that in some of the cases where width==0 || height==0 || depth==0,
this increases the number of linear data bytes required for a copy.
Since this is a corner case, no deprecation logic is added.

Removes a duplicated copy of this logic in TestUtils.cpp.

Bug: dawn:520
Change-Id: I3b3d079c6ef316df7d95ba5c349bf8de4646fa4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30741
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-10-23 21:21:33 +00:00
Austin Eng ca5aa235da Validate texture aspect on TextureView creation
Bug: dawn:439
Change-Id: Iba8c283e2f4551d9600410ff958d5a304a49ae2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30724
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-23 20:06:03 +00:00
Yunchao He 346b20ab7c Minor changes in TextureValidationTests
Bug: dawn:558

Change-Id: I86f014b6d82edd4cf7ca112577d08c3b85b20c39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30767
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-23 16:03:22 +00:00
dan sinclair bb3d7981ec CMake updates.
This CL updates the CMake file to allow building Dawn with WGSL support
enabled. A few other required fixes are included.

Bug: None
Change-Id: I11a09710f0ad075a07e23c44ff884826850655e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30841
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-23 13:10:20 +00:00
Corentin Wallez 24e6369261 Slightly improve a RenderPipeline error message.
Bug: dawn:559
Change-Id: Ib7156c0f189c0eb577026d939fecff28a3d43cf4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30861
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-23 12:41:40 +00:00
Corentin Wallez 2ce1d927e9 SwapChainVk: handle mismatching size and usage with a blit
In Vulkan the swapchain can stop working if the window resizes and
doesn't match the size of the swapchain images anymore. WebGPU
applications might not handle resizes instantly, so if the swapchain
becomes incompatible we give them a temporary texture that we'll then
blit inside the real swapchain texture.

This also handles the case where the application requires more usages
than what the swapchain can support.

In addition, temporary checks are added that fail swapchain creation if
the VkSurface doesn't support BGRA8Unorm which is the only allowed
format for WebGPU swapchains at the moment.

SwapChainTests should now work on Vulkan and are enabled.

Bug: dawn:269

Change-Id: I812c0653125ed86d3a0f8f67347e961c7b207a98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30700
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-22 17:07:49 +00:00
Austin Eng 22505a5afe Fix systemName output on Mac/iOS
macOS and iOS were switched.

Bug: None
Change-Id: I10872110cc3122114d3dfdb29dd4672bdc2cfb6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30723
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-21 22:08:58 +00:00
dan sinclair d3c4222002 Update type for atomic.
The atomic_uint64_t typedef does not appear to be defined on Ubuntu and
you need to use atomic<uint64_t>

Bug: None

Change-Id: I66f92ae6939723a5ca6f7b80dbb1ad8ab633ce4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30726
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-21 15:53:58 +00:00
Hao Li e2cbcc9565 Query API: Record used query index in command encoder
- There are some methods need to know which query indexes are used in
encoders: endOcclusionQuery, endPipelineStatisticsQuery, resolveQuerySet.
- On Vulkan, we also need to use the used query indexes to reset each
queries between uses. And because the reset command must be called
outside render pass, we need to check whether a query index is writen
twice on command encoder and render/compute encoders.
- Add validation on writeTimestamp for duplicate writes at same index.

Bug: dawn:434
Change-Id: I6d00dd91e565d960246b6d01ad434d2d5c095deb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27561
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2020-10-21 08:38:31 +00:00
dan sinclair 3f6bb08d00 Update WGSL struct syntax.
This CL updates the Dawn tests to use the new WGSL struct syntax.

Bug: tint:175
Change-Id: I7ce43385f9107f1a133117c41325a344d2241657
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30640
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-21 06:59:51 +00:00
Jiawei Shao 03e1400fce Add the entry point of CreateReadyRenderPipeline
BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I42ac0edc77e5b6119eb374da72698fca14596f7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30540
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-21 04:37:41 +00:00
dan sinclair e9c99e93e7 Add algorithm include.
This CL adds the algorithm include to, hopefully, satisfy the MSVC
build.

Change-Id: Ic0a8a9dfeffe7a02d94d748dbb2813ac576b5371
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30660
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-20 20:30:11 +00:00
Jose Dapena Paz 1917dc27c2 IWYU: unique_ptr usage in ChunkedCommandSerializer requires including <memory>
Fix build breakage in libstdc++:
../../third_party/dawn/src/dawn_wire/ChunkedCommandSerializer.h:84:34: error: ‘unique_ptr’ is not a member of ‘std’
   84 |             auto cmdSpace = std::unique_ptr<char[]>(new (std::nothrow) char[requiredSize]);
      |                                  ^~~~~~~~~~
../../third_party/dawn/src/dawn_wire/ChunkedCommandSerializer.h:24:1: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?

Bug: chromium:957519
Change-Id: I35b129225882a3f9b758c4f49d1a3cace22aacfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30600
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-10-20 19:48:31 +00:00
dan sinclair c4593127cb Include compiler header
This pulls in the DAWN_UNUSED macro.

Change-Id: Id3551c7835b5177c3715d27a1c43d32c9a272bd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30520
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
2020-10-19 20:42:50 +00:00
Corentin Wallez 6298b63df8 Roll third_party/swiftshader/ 2014e7b92..df17a7610 (79 commits)
Suppress a couple failing tests cause by Swiftshader's fast resolve
algorithm.

https://swiftshader.googlesource.com/SwiftShader/+log/2014e7b9290e..df17a76102df

$ git log 2014e7b92..df17a7610 --date=short --no-merges --format='%ad %ae %s'
2020-10-15 srisser Make abort on LOG_TRAP opt-in
2020-10-16 cwallez MetalSurface: correctly handle the window resizing.
2020-10-05 amaiorano Add unit tests for arithmetic ops with constant args
2018-02-01 eholk Handle mul instructions with two immediates on x86-32 and x86-64
2020-10-14 natsu Revert "Revert "Update virlg_hw path to reflect Minigbm""
2020-09-10 sugoi Fix CommandPool memory management
2020-10-12 bclayton SpirvShaderDebugger: Improve stepping for inlined functions
2020-10-10 natsu Revert "Update virlg_hw path to reflect Minigbm"
2020-10-10 swiftshader.regress Regres: Update test lists @ 139f5c35
2020-10-08 natsu Update virlg_hw path to reflect Minigbm
2020-09-19 capn Fix depth bias calculations
2020-10-08 capn Move interpolant clamping out of interpolate()
2020-10-08 bclayton SpirvShaderDebugger: Fix store() of arrays
2020-10-08 bclayton SpirvShaderDebugger: Improve ASSERT() messages
2020-10-07 bclayton SpirvShaderDebugger: Have Function inherit LexicalBlock
2020-09-30 capn Remove float division-by-zero prevention
2020-10-05 srisser Replace WARN with a LOG_TRAP
2020-10-05 srisser Reflect VK_KHR_create_renderpass2 being core
2020-10-05 zzyiwei Update Vulkan headers to version 1.2.156
2020-10-05 capn Regres: limit the number of GL tests opening X connections
2020-10-03 bclayton CMake: Add flag for controlling the logging level
2020-10-03 bclayton third_party/cppdap: Roll forward to 1fd23dda
2020-10-02 nicolascapens Regres: List regressions before summary
2020-09-16 vantablack Added support for AndroidHardwareBuffer
2020-10-02 bclayton Squashed 'third_party/marl/' changes from d29553a3730..f1c446ccdc0
2020-09-30 zzyiwei Use vndk/window.h instead of the system one
2020-10-01 swiftshader.regress Regres: Update test lists @ 5e947ada
2020-09-30 capn Fix clamping cube face coordinates to [0.0, 1.0) range
2020-09-30 nicolascapens Fix delegating eglCreateWindowSurface to CreatePlatformWindowSurface
2020-09-30 amaiorano Fix GN build
2020-09-18 amaiorano Optimize transcendentals for Subzero
2020-09-18 caramelli.devel EGL_KHR_platform_x11: wrong implementation in CreatePlatformWindowSurface()
2020-08-01 caramelli.devel Add DirectFB support for Vulkan WSI
2020-09-16 srisser Add VK_KHR_imageless_framebuffer
2020-09-22 bclayton SpirvShaderDebugger: Mark II
2020-09-25 bclayton Vulkan/Debug: Support Locations as hashmap keys
2020-09-28 bclayton System/Types: Add support for vec3
2020-09-28 bclayton Pipeline: Remove hack to disable spirv-opt when debugging
2020-09-25 bclayton Vulkan/Debug: Add Context::Lock::findFile()
2020-09-25 bclayton src/Pipeline: Misc fixes
2020-09-25 bclayton Vulkan/Debug: Various fixes / improvements to Thread
2020-09-25 bclayton Vulkan/Debug: Don't accumulate function breakpoints
2020-09-25 bclayton Vulkan/Debug: Overhaul Values / Variables
2020-09-25 bclayton Vulkan/Debug: Assert on locking context twice on same thread
2020-09-25 bclayton Vulkan/Debug: Add File::getBreakpoints()
2020-09-25 bclayton Vulkan/Debug: Split EventListener
2020-09-25 bclayton Pipeline: Fix return type of SIMD::Pointer::limit()
2020-09-25 bclayton Pipeline: Assign to SpirvRoutine::pointCoord
2020-09-24 sdefresne Explicitly filter assigments to sources variable
2020-09-23 egranata Fix a linker problem with ARM/thumb compatibility
2020-09-17 srisser Implement VK_KHR_image_format_list
2020-09-11 hidehiko Expand is_linux to is_linux || is_chromeos.
2020-04-08 natsu Support Gralloc4 in SwiftShader
2020-09-14 swiftshader.regress Regres: Update test lists @ dc552fce
2020-09-11 amaiorano CMake: normalize FOLDER property for third_party targets
2020-09-14 bclayton SpirvShaderDebugger: Add PRINT_EACH_DEFINED_DBG_INSTRUCTION
2020-09-14 bclayton SpirvShaderDebugger: Implement DebugValue
2020-09-14 bclayton SpirvShaderDebugger: Reduce lock contention
2020-09-11 capn Drop the float literal suffix
2020-09-01 jaebaek Allow OpTypeVoid for debug function return type
2020-09-09 sugoi Update PowerVR Samples to ToT
2020-09-08 capn Fix register assignment for constant arrays
2020-09-08 capn Fix component swizzle for uniform texel buffers
2020-09-08 sugoi Allow alphaToCoverage with a single sample
2020-08-26 capn Regres: Roll dEQP to latest tip-of-tree
2020-09-03 capn Don't assert on component swizzle matching identity
2020-07-29 caramelli.devel Minor change in detachImage() for Xcb, Xlib, Wayland WSIs
2020-08-06 sugoi DescriptorPool error fix
2020-09-02 sugoi Only use clang specific directives when clang is used
2020-08-26 capn Skip texel address sample offset if zero
2020-09-01 srisser Fix enum-hashing build error on Ubuntu 16.04
2020-09-01 capn Fix undefined behavior in minifloat conversion
2020-08-21 capn Add unit test for 11/10-bit minifloat denormal underflow
2020-09-01 capn Assert multisample resolve has equal input and output formats
2020-08-25 jaebaek Handle OpenCL.DebugInfo.100 DebugOperation
2020-08-25 jaebaek Handle DebugGlobalVariable using DebugInfoNone
2020-08-26 capn Optimize multisample resolve with SSE2 instructions
2020-08-26 capn Add a fast multisample resolve code path
2020-08-26 capn Make multisample resolve a Blitter method

Created with:
  roll-dep third_party/swiftshader

Change-Id: Ib2bd1b2c5109cc4278de388fab612418e6b1c640
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30441
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-19 18:35:39 +00:00
Austin Eng aff4c03663 Fix unused variable warnings on ChromeOS
Fixes the build on ChromeOS where the #ifdefs there leave some
variables unused.

Bug: none
Change-Id: I7804fd15112e49a6bda1dadcb4137804409d1642
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30463
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-19 16:43:19 +00:00
Austin Eng 0406d94e56 Add missing include in SwapChainVk
Missing #include <algorithm> is breaking the Skia-Dawn roll

Bug: none
Change-Id: I4ddcc0fc345f9c991782342a403f11ebd6ee5d17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30461
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-19 16:11:09 +00:00
dan sinclair a23082534c Fixup cmake file
Change-Id: I6355efbf4ce6cb0f946878b49a457a216544aed5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30462
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-19 16:08:39 +00:00
Austin Eng d676f44272 Reland "Replace the wire serializer with a no-op impl on disconnect"
This is a reland of e757c012be

It changes a global noop serializer from a global static to a local
function static that's constructed on first use.

Original change's description:
> Replace the wire serializer with a no-op impl on disconnect
>
> Now that the command serialization knows to no-op if
> GetCmdSpace returns nullptr, when the wire is disconnected,
> we can replace it with a no-op serializer that always returns
> nullptr.
>
> Bug: chromium:951558
> Change-Id: I7363fd10f529119e515eda0e743e1a7839049b9b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30000
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: chromium:951558
Change-Id: I827cdbd212fa585b542fd4ea1eb9654eec6002c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30420
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-19 15:59:21 +00:00
Jiawei Shao ae5f950444 Add the entry point of CreateReadyComputePipeline
This patch adds the entry point of CreateReadyComputePipeline in both
dawn_native and dawn_wire.

TODOs:
1. Add more tests in dawn_unittests and dawn_end2end_tests.
2. Put the main logic of creating a pipeline into a separate thread.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I7edd269a5422a8b85320a7f9173df925decba633
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30060
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-19 01:56:08 +00:00
Corentin Wallez 47a6a94e15 Initial new swapchains on Vulkan.
Bug: dawn:269

Change-Id: I5b7a4edfa876d5a64f8f135adb619be021e4f534
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17966
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-17 23:31:37 +00:00
Austin Eng 875091308b Cleanup old/deprecated wire and native APIs
Bug: none
Change-Id: Idf9a00d8dc675e1fbc83554c487edcb2dda498c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30001
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-16 15:21:16 +00:00
Corentin Wallez 4196a546bf Add wgpu::TextureComponentType::DepthComparison
And deprecate using ::Float in the bind group layout for
"shadow textures" in the pipeline (along with a deprecation test).

Adds the ability to be used with DepthComparison only to depth textures,
this could potentially a breaking change if users where doing
depth-comparison on float32 textures but that's not supported in WebGPU.

Bug: dawn:527
Change-Id: Ib28b0443e3002e0aa2811713b9e843c2417e13e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30240
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-16 14:13:16 +00:00
Corentin Wallez 2a8ada7951 Format: Move the baseType to be per-aspect.
This also introduces a per-aspect supportedComponentTypes that exactly
mirrors baseType for now but will contain additional bits in the future
(like DepthComparison for depth textures).

It is also a step towards being able to create single-aspect view of
depth-stencil textures to sample either the depth or the stencil
component.

Bug: dawn:527

Change-Id: I3ab224d07c136c682cc2993b9a8599237d318130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30103
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-16 14:07:06 +00:00
Austin Eng b1938273e4 Revert "Replace the wire serializer with a no-op impl on disconnect"
This reverts commit e757c012be.

Reason for revert: Uses a static initializer

Original change's description:
> Replace the wire serializer with a no-op impl on disconnect
>
> Now that the command serialization knows to no-op if
> GetCmdSpace returns nullptr, when the wire is disconnected,
> we can replace it with a no-op serializer that always returns
> nullptr.
>
> Bug: chromium:951558
> Change-Id: I7363fd10f529119e515eda0e743e1a7839049b9b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30000
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org

Change-Id: I6549cfb27c6c5812e067ea23c6a706e84c78e1a6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:951558
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30380
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-16 03:03:58 +00:00
Brandon Jones a63a00cd65 Allow Clearing Integer Formats To Large Values
Removes validation preventing integer formats from being cleared to
>2^24. Adds a test that clears to the largest values for UINT32 and
SINT32 formats.

Bug: dawn:537
Change-Id: I8aabd36608138725c8ddbbedd50192c0978da99c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30300
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-10-15 22:23:45 +00:00
Corentin Wallez 877664cead Fix a small typo in Format.cpp alwaus -> always
Bug: dawn:527
Change-Id: I8008dce9bfdfc3dc2782ce70d53eecec011d2316
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30241
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-15 16:42:03 +00:00
Brandon Jones 4ad35865b0 Change Device::Tick To Return Bool
Changes Device::Tick to return a boolean that denotes whether or not
Tick needs to be called again.

Bug: dawn:119
Change-Id: I9d4c7e291536d676b33fc61d652667c1fbff8c62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29980
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-10-15 16:21:03 +00:00
Austin Eng e757c012be Replace the wire serializer with a no-op impl on disconnect
Now that the command serialization knows to no-op if
GetCmdSpace returns nullptr, when the wire is disconnected,
we can replace it with a no-op serializer that always returns
nullptr.

Bug: chromium:951558
Change-Id: I7363fd10f529119e515eda0e743e1a7839049b9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-15 15:46:13 +00:00
Corentin Wallez 5931c0ac3b ShaderModule: Don't use Format::Type for reflection.
Previously Format::Type was used instead of wgpu::TextureComponentType
so that ::Other could server as a tag value. This was confusing and
almost the single use of ::Other.

In a follow-up CL the format baseType is changed to be a per-aspect
value, and Format::Type. This CL is a self-contained step in that
direction.

Bug: dawn:527

Change-Id: Ida834087f45a8fca17670ffe8ebd4d5c4f1cd423
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30102
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-15 13:51:33 +00:00
Corentin Wallez 49c30a70e8 TextureView: only store the Aspect as a bitfield.
In follow-up CLs the aspect of texture views becomes more important as
it is used to query the texture format's base type and supported
componenet types.

Previously asking for the AspectInfo for wgpu::TextureAspect::All could
be ambiguous for depth-stencil formats. By using the internal bitfields
the constraint is much more clear that a single bit must be set.

Bug: dawn:527

Change-Id: Iebff40f28c4a6c38ebe5a7cccf62f8ab3363e4e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30101
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-15 09:15:53 +00:00
Corentin Wallez 6298d2b70c Format: Move the TexelBlockInfo inside an AspectInfo.
In follow up CLs additional will be added to the AspectInfo, like the
supported component types.

Also simplify the logic for GetTexelInfo since all aspects are the first
aspects, except stencil which is always stencil8.

Bug: dawn:517
Change-Id: Iebbcb8a7f8fa2c4b7b06f65d6e4e8917c0a85366
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-15 09:05:03 +00:00
Corentin Wallez 73b70229af dawn.json: Expose the driver version in the adapter.
And use it to print the driver version at the start of
dawn_end2end_tests. This will help when figuring out issues
happening on CQ but not necessarily locally.

Bug: None

Change-Id: Ibdb9ab8cab53cc1e1cf8a807da53edeca616bed9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29602
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-14 13:33:15 +00:00
Austin Eng cac0442277 dawn_wire: Support chunked commands
This CL adds support for chunking large commands by first serializing
large commands first into a separate buffer, and then sending the
buffer data chunk by chunk.

This code path is used for large writeBuffer and writeTexture, as well
as the inline memory transfer service for buffer mapping. The transfer
for writeBuffer and writeTexture will be optimized further in Chrome,
and the inline memory transfer service is currently used only in tests.

Bug: chromium:1123861, chromium:951558
Change-Id: I02491a44e653e2383174958d9c3d4a4db6fd7bde
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28882
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-13 22:35:34 +00:00
Ryan Harrison ccaef85257 Add running spirv-val on output of Tint
This also removes an unused param from the ValidateSPIRV method.

BUG=dawn:543

Change-Id: I369a8097ef49751cedbe6605989750a292027b6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29842
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-10-13 15:42:04 +00:00
Kai Ninomiya d1bca09f4a Change rowsPerImage units from texels to blocks
Spec change: https://github.com/gpuweb/gpuweb/pull/958

Bug: dawn:520
Change-Id: I05c4792a2832d12cd68877f2b1b99cdf9ef26925
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29981
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-10-12 23:13:53 +00:00
Natasha Lee 51af1b428f Have Queue timeline tasks resolve in order
Use QueueBase to track fences in flight and map requests so that they
can be resolved in the order they were added. Before these tasks were
separately tracked in FenceSignalTracker and MapRequestTracker, so tasks
would be resolving out of order.

Bug: dawn:404
Change-Id: I8b58fb72c99f43bc4593f56e08920d48ac506157
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29441
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
2020-10-12 22:32:33 +00:00
Corentin Wallez a7b0fdc90f Make SetScissorRect match upstream WebGPU specification.
This allows empty scissors, so add a test for it.
This disallows scissor boxes that are bigger than the renderpass
attachment so remove an end2end test for that behavior.

Update the SetScissorRect validation tests.

Bug: dawn:542
Change-Id: I5b8578a4df1b94510a9356bd4007efddf2711588
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29820
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-12 16:15:23 +00:00
Hao Li 936ef0a5f2 Query API: Timestamp Query on Metal
- Add WriteTimestamp and ResolveQuerySet on Metal
- Enable end2end tests of timestamp query on Metal
- Lazy initialize the distination buffer in ResolveQuerySet
- Update part of end2end tests to test from render pass instead of
  command encoder due to we cannot write timestamp on CommandEncoder
  without any copy commands on Metal.

Bug: dawn:434
Change-Id: Ie9217e1f5a00bc252d6293ef7521c2e343ba9259
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2020-10-12 11:47:22 +00:00
Corentin Wallez 6c3da3dc5b Make SetViewport validation match upstream WebGPU.
As a side-effect this allows empty viewports which need special handling
in Vulkan because it is not allowed to set width to 0 (but ok to set
height to 0).

Validation tests are updated to cover the new validation checks.

Most of the viewport end2end tests are rewritten because they didn't
pass the new validation.

A new end2end test is added to test various kinds of empty viewports to
cover the extra logic in the Vulkan backend.

Bug: dawn:542
Change-Id: I8bb25612eeed04162a6b942983167eacab3a1906
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29681
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-11 18:39:32 +00:00
Enrico Galli 1c25198384 Adding multiple of 4 validation on indirect draws and dispatches
Bug: dawn:538
Change-Id: I6f4d8fb73a9fff910bdcd105f66299dc6afb61cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29761
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-10 00:06:30 +00:00
Stephen White 793a07e366 Fix MSVC build of SerialStorage.h.
Use "protected" rather than "private" for the using declarations.

Bug: dawn:544
Change-Id: I1166016fd11d9e2b512f08194f4f4c3f628d0c27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29845
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-10-08 22:14:39 +00:00
Kai Ninomiya 6b4a4a85df Fix EntryPointTests WGSL shaders for Tint roll
Should fix Chromium FYI and Dawn CQ.

Followup to https://dawn-review.googlesource.com/c/dawn/+/29521

Change-Id: I62ba98ff234d3aceb6cc429d1e23c28f3a1adcbf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29760
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-07 21:54:56 +00:00
Corentin Wallez 4171134daf Buffer: Validate the offset is aligned to 8
This is to match the upstream WebGPU spec.

Bug: dawn:445

Change-Id: I1a511ed9a2a04c7b95368ce724d69c128158f097
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29360
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-07 17:19:53 +00:00
dan sinclair b581d26e51 Re-enable disabled test.
The upstream Tint issues have been fixed and Tint has rolled. This CL
re-enables the disabled test.

Bug: tint:263
Change-Id: Id8a73e198c15c74c55dc9b26603f4a3850d995b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29680
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-10-07 15:45:23 +00:00
Corentin Wallez c1cce0c57d Buffer: Disallow unmapping when unmapped.
This is to match the upstream WebGPU spec.

Bug: dawn:445

Change-Id: I4246487247fdba8d90a119c1970d6d4df3235835
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29361
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-07 15:14:03 +00:00
Corentin Wallez 3066cd3387 dawn_wire: Guarantee OOM on MAX_SIZE_T sized buffers.
This can be used to simplify some logic in Blink.

Bug: dawn:445

Change-Id: I9859c51bc95f564847035533426675188eb8ef99
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29362
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-07 15:03:33 +00:00
dawn-autoroll 6620efb9a8 Roll Tint from d3f75ca0e8 to 90ee6c4360 (56 revisions)
** With manual buildfixes. **

https://dawn.googlesource.com/tint.git/+log/d3f75ca0e8be..90ee6c436017

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC kainino@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None, tint:263
No-Try: True
Change-Id: I374db968c616c8a12721cdb9c73a46a3495748c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29521
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-10-06 20:10:52 +00:00
Austin Eng 16e01affcb Reland "Add a per-thread proc table using thread local storage"
This is a reland of b04a92f01b
with the deletion of a duplicate exported function in dawn_wire that
was causing a compilation failure on Windows.

Original change's description:
> Add a per-thread proc table using thread local storage
>
> In situations where both dawn_wire and dawn_native are used on separate
> threads (Chrome with --single-process or --in-process-gpu), it's
> desirable to have a per-thread proc table so that the WebGPU C++ API can
> still be used. This eliminates classes of bugs with manual
> reference/release errors.
>
> This also changes many of the GetProcs functions to return const
> references to the static proc tables known at compile time, instead of a
> copy.
>
> Bug: none
> Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: none
Change-Id: Id90e5372132cd93a2f8631c8185d0e71b01bc1af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29443
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-06 16:13:42 +00:00
Enrico Galli db2c2dd9b9 Add support for depthBias, depthBiasSlope, and depthBiasClamp
Bug: dawn:524
Change-Id: I2586aadbc326f58889314a2d10794bcc0572aaba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28300
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-06 08:12:29 +00:00
Kai Ninomiya 326e14f34b Revert "Add a per-thread proc table using thread local storage"
This reverts commit b04a92f01b.

Reason for revert: Build failed on win-archive-dbg; see:
https://chromium-review.googlesource.com/c/chromium/src/+/2450792

Original change's description:
> Add a per-thread proc table using thread local storage
>
> In situations where both dawn_wire and dawn_native are used on separate
> threads (Chrome with --single-process or --in-process-gpu), it's
> desirable to have a per-thread proc table so that the WebGPU C++ API can
> still be used. This eliminates classes of bugs with manual
> reference/release errors.
>
> This also changes many of the GetProcs functions to return const
> references to the static proc tables known at compile time, instead of a
> copy.
>
> Bug: none
> Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org

Change-Id: I4587b457b7b2dd5d3c7457065bf4e77b95af59d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29442
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-10-05 22:35:40 +00:00
Austin Eng b04a92f01b Add a per-thread proc table using thread local storage
In situations where both dawn_wire and dawn_native are used on separate
threads (Chrome with --single-process or --in-process-gpu), it's
desirable to have a per-thread proc table so that the WebGPU C++ API can
still be used. This eliminates classes of bugs with manual
reference/release errors.

This also changes many of the GetProcs functions to return const
references to the static proc tables known at compile time, instead of a
copy.

Bug: none
Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-10-05 19:53:58 +00:00
Corentin Wallez df90930683 wire::client: Make Buffer::MapAsync surface server-side errors.
In the WebGPU specification, validation errors for mapAsync take
precedence over the early-unmap or early-destroy promise resolution.

Change the client to wait for the mapAsync status from the server before
sending the cancelation through the callback. If the server sends back
an error, then it takes precedence over the client-side status.

Also adds tests for the updated semantic.

Bug: dawn:445

Change-Id: I7bf1d8bbb3cb62d73ab19ecdf0aad2963e854964
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29300
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-10-05 11:03:21 +00:00
Stephen White ed3a93f690 Fix rectangular mipmap textures used as color attachments.
ValidateOrSetAttachmentSize() was asserting that
textureSize.width >> attachment->GetBaseMipLevel() is nonzero.
This is not true for rectangular textures, where the smaller dimension
may hit the lower bound and must be be clamped at 1.

Fixed by calling GetMipLevelVirtualSize() which performs the clamp.

Added a test which exercises rectangular mipmapped textures as color
attachments. This required a few fixes to the test harness, which had
the same bug as that fixed in the code (assumes (width >> size) > 0).

Bug: dawn:535
Change-Id: Idde3b68feb14d8a241803d09a094b059d9935d91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29261
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-10-02 16:15:40 +00:00
Brandon Jones 16ebcf601d Limit Clear Color Values to 2^24 For Integer Formats
Adds validation to ensure clear colors do not exceed 2^24 and a
corresponding unit test. Also removes intermediate float conversions
that are no longer necessary.

Bug: dawn:525
Change-Id: I020b98de85384c20da51158de79eab87f60dcf6d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29040
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-10-01 19:56:49 +00:00
Ryan Harrison da5828c06b Add Tint SPIRV->SPIRV to fuzzing code path
Since we are intending to ship using Tint for normalization, fuzzing
should include this transform.

BUG=dawn:531

Change-Id: Ica25c3bbdc6ff392d5e31361734de43fd1c12815
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-09-30 17:50:14 +00:00
Corentin Wallez e2cb68b024 TextureFormatTest: Test components not present in the format.
For sampling, check that formats without 4 components sample them as
(0, 0, 0, 1) instead. For rendering, check that extra components output
by the shader are ignored.

Bug: None
Change-Id: Ib49fcaa58e984d821667e992d3ddb1bb093bdba0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29061
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-09-30 09:22:04 +00:00
Austin Eng ad421a248a Remove AMD test suppression in VulkanImageWrappingTests
This has been fixed by the layout transition fixes. The dedicated
memory bug doesn't seem relevant at this time.

Bug: dawn:200, dawn:206
Change-Id: I953a20850881f64f5ff5ddbede9aed3a835d22da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29123
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-09-29 20:54:43 +00:00
Corentin Wallez 172cd1e8df TextureFormatTests: Test more Snorm format corner cases.
Bug: None
Change-Id: I02cba96f64d62495e21ba04bb514de9fb1563507
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-09-29 09:47:26 +00:00
Austin Eng b2a4e87ad2 Un-skip WriteTexture test on Swiftshader
Fixed in the roll of Swiftshader.

Bug: dawn:483
Change-Id: I8baad1d8d61e7b99c01dc27f929da830ca30c8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29081
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-09-28 22:05:24 +00:00
Corentin Wallez 62139fcca7 Use typed integers for the ExecutionSerial
This will prevent mixing it up with other serial types in the future.

Bug: dawn:442
Change-Id: I74e964708acc62eb0f33127cc48f1b9a7b171d11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28923
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-28 19:35:14 +00:00
Corentin Wallez ad4a66ec8f D3D12: Use typed integers for the ExternalMutexSerial
This will prevent mixing it up with other serial types in the future.

Bug: dawn:442
Change-Id: Ia1ec00572fa268e48349f7d9e39234ec8f5d3953
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28961
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-28 17:10:24 +00:00
Corentin Wallez cac14e0067 D3D12: Use typed integers for the HeapVersionID
This will prevent mixing it up with other serial types in the future.

Bug: dawn:442
Change-Id: I32f356c62f19ef29f3bf51c19873369fb817bb16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28960
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-28 16:05:24 +00:00
Corentin Wallez 306fc502cf Use typed integers for the Fence FenceAPISerial
This will prevent mixing it up with other serial types in the future.

Bug: dawn:442
Change-Id: I1cdb35ee01be3c771183003bc357c84d46aa5745
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28922
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-28 15:11:04 +00:00
Corentin Wallez 53cdbead78 Use typed integers for the Buffer MapRequestID
This will prevent mixing it up with other serial types in the future.

Bug: dawn:442
Change-Id: Ie655d57722fcd79c82acc5aac429aed2c2741c3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28920
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-28 14:14:44 +00:00
Corentin Wallez 145f115c54 SerialQueue/Map: Take the serial type as type paramater.
This is in preparation for follow-up CLs that will use typed integers
for the various serial types.

Bug: dawn:442

Change-Id: I5296546e96acd6ac9f7a0bfc46dc7eba40cb3cf5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28921
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-09-28 12:28:13 +00:00
Jiawei Shao ed2b465f86 Report more detailed error information for the failures of mapAsync
This patch adds two new buffer map async status "destroyed before
callback" and "unmapped before callback" to replace the status "unknown"
so that the developers can get more details when meeting such errors in
the call of buffer mapAsync.

Note that this patch still preserves "unknown" as it is still being used
in Chromium.

BUG=dawn:533
TEST=dawn_unittests

Change-Id: I12deefb49311ea6adea72c24e4e40797dd7eb4a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28883
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-09-27 02:00:52 +00:00
Hao Li ddef7a04a2 Query API: QuerySet on Metal
- Add query set creation on Metal backend
- Enable end2end tests for query set creation

Bug: dawn:434
Change-Id: I7fe013192ae215b6b97cfdb646a8dd6f2596d4af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28800
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-09-25 08:49:30 +00:00
Corentin Wallez eec9edfd57 Standardize the use of UNREACHABLE in switches.
A lot of our switches over enum values use the following pattern:

    default:
        UNREACHABLE();
        return foo;

This is problematic because when adding a new value to one of the WebGPU
enums, there is no compilation error for switches that are missing it.
Currently we're supposed to write code and tests and fix UNREACHABLEs when
we see them.

Instead we should strive to have most switches on enums to be complete
and explicitily tag unreachable values as UNREACHABLE. Some switches
might still want to use default: UNREACHABLE() if only a couple values
need to be handled out of very many.

In this CL we go through all the UNRAECHABLEs and change them if need
be. Also an ErrorQueue class is added to avoid having
QueueBase::SubmitImpl just be UNREACHABLE (and force overriding
instead).

Bug: dawn:527
Change-Id: I33dfb4703104912cc5f001f9faf907a61324de68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28501
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2020-09-24 14:56:50 +00:00
Corentin Wallez a46737c0aa Add wgpu::BindingType::MultisampledTexture
And deprecate wgpu::BindGroupLayoutEntry.multisampled.

Bug: dawn:527

Change-Id: I00f38eb6b1f82f9d9aedda5da23b1350263a3044
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28562
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2020-09-24 11:41:07 +00:00
Corentin Wallez ed0b3cf153 Refactor PipelineLayoutBase::CreateDefault
This function was bit long and was difficult to read. Refactor it to use
a single double keyed map and helper functions.

Bug: dawn:527

Change-Id: I8c1173fd0e06256c7e7060a850996e1e90187d50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28640
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-09-24 11:27:47 +00:00
Yan, Shaobo 75e5ed6161 Support Noop Copy for B2T, T2B and T2T Copies
In B2T, T2B and T2T copies, copySize has 0 in width, height or depth
will trigger errors in D3D12 backend.

This patch bypass the command record step for noop copy. But all
validation rules still applies to the copy.

BUG=dawn:255

Change-Id: I4d01cef2e3c1f78440014c2c6ac63a48310d99af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28521
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-09-23 10:28:26 +00:00
Corentin Wallez a3651d2fe0 Fix deprecation errors for indexFormat being set.
Bug: dawn:502
Change-Id: Ib49a1e6cceb0632792a499314f5e0e4b3434deb7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28780
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-09-23 07:23:56 +00:00
Corentin Wallez 9d0d18d952 Fix compilation on ChromeOS
TBR=enga@chromium.org
Bug: dawn:200
Change-Id: I35a414a25deed9d1d66e7ce510a704aaa0548fa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28820
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-09-23 07:21:06 +00:00
Austin Eng 0b29732cd8 Pass the old/new VkImageLayouts to Vulkan image import/export
Returning the layouts from an export operation and then using
them in a subsequent import operation allows the import to preserve
the texture contents.

This fixes Vukan image wrapping on some AMD/NVIDIA devices.

Bug: dawn:200
Change-Id: Icbb6e759856d410bb69724b9f439bc3088756d19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28380
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-09-22 20:10:46 +00:00
Brandon Jones 670858da9b Change wgpu::Color from floats to doubles
Change dawn.json to reflect changes in the WebGPU IDL. Also fixes any
conversion issues in Dawn.

Bug: dawn:525
Change-Id: Ifb46329f073bcf31d43342f20f4819eac061d5a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-09-22 16:51:36 +00:00
Bryan Bernhart 6db3a24c19 Revert "Disable debug layer logger"
This reverts commit 52a588f3c9.

Reason for revert: added a workaround to filter out messages.

Original change's description:
> Disable debug layer logger
>
> This logger is producing too much output on Windows and causing
> Chromium's gtest harness to kill the tests.
>
> Tbr=cwallez@chromium.org
> No-Try: true
> Bug: chromium:1130483
> Change-Id: I1990bc800bbb7eda62901d14f656375c30fbeef2
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28740
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org

Bug: chromium:1130483
Change-Id: Ifeee73838a957f619dfdb977f21585fe8abacc3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2020-09-22 16:23:06 +00:00
Corentin Wallez 5b4e5fbe1f Simplify the BindGroupLayout validation code.
It was using a lot of calls to helper functions full of switches that
were hiding the logic that's relatively simple.

Bug: dawn:527
Change-Id: Iaf2603efa255df5ba2f44989b5375d433f04d5df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28561
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-09-22 13:47:05 +00:00
Corentin Wallez aeda49ba50 Reuse BGL validation in default layout computations.
Instead of calling validation functions directly in
PipelineLayoutBase::CreateDefault, use ValidateBGLDesc and
ValidatePipelineLayoutDesc.

  Also makes the visibility of the default layout match the aggregation as
in the WebGPU spec.

  Also makes refcounting of BGLs a bit less manual at the bottom of
CreateDefault.

  Also adds tests for minBufferBindingSize and visiblity aggregation in
the default layout computations.

Bug: dawn:527
Change-Id: I6bbd5f3de8b235dddf6cbd2bedfd34a094fcb277
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-09-22 11:04:45 +00:00
Austin Eng 52a588f3c9 Disable debug layer logger
This logger is producing too much output on Windows and causing
Chromium's gtest harness to kill the tests.

Tbr=cwallez@chromium.org
No-Try: true
Bug: chromium:1130483
Change-Id: I1990bc800bbb7eda62901d14f656375c30fbeef2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-09-21 21:21:04 +00:00