Only try to use `glfwGetPlatform()` to distinguish X11 and Wayland if
GLFW 3.4 is present. This fixes the build with older GLFW versions.
Change-Id: Ia986933eeb3f049336bcd06c71b326f92a1da284
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93262
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This change attempts to better classify devices with a Metal backend
that aren't currently reporting vendor/device ID. In practice this
mostly means Apple-produced GPUs, like the M1 series.
Bug: dawn:1443
Change-Id: I9e8467a50c9f8eeccc00863f6dee32c0f91380dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92123
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
We were missing an include for uint32_t, and a forward declaration.
Change-Id: I4a2eed757364e335e12d14aaeda18fc7aafb2886
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/93261
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: James Price <jrprice@google.com>
This patch clamps clearStencilValue into the range of the stencil
format to align with the latest change in WebGPU SPEC.
Bug: dawn:1453
Test: dawn_end2end_tests
Change-Id: I37fab5fd4826a608cb972eed74308114002c7930
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92750
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Change #if DAWN_PLATFORM_XXX to #if DAWN_PLATFORM_IS(XXX)
To prevent #ifdef usage and reference without including
dawn/common/Platform.h
Also change #if DAWN_COMPILER_XXX to # if DAWN_COMPILER_IS(XXX)
Bug: dawn:1447
Change-Id: If6c9dab15fd2676f9a087507f5efcceeff468d33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92625
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This requires adding a custom implementation of DeviceCreateTexture and
the Texture object in the wire client.
In dawn::native this requires the format enum separately from mFormat
which is a `const Format&` so that garbage format values can be
reflected correctly for error textures.
Bug: dawn:1451
Change-Id: I75b5635f36647f6f04dae54e92154f2b552beb64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92661
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Other drivers don't have MSAN instrumentation, so MSAN produces
many false positives since it can't track changes to memory
from uninstrumented libraries.
Also, implement AllocNoThrow for MSAN to return nullptr on large
allocations. Local fuzzing found MSAN didn't implement std::nothrow.
Fixed: chromium:1333180
Change-Id: I4f3d2c04496a25ba6ebe414d6d5c3c5850a70fec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92820
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Changes dawn::native procs to correctly convert C++ enum and bitmask
returns values.
Bug: dawn:1451
Change-Id: I39a8d218f76e25b178a83eeb99d653222d39d040
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92440
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Most new APIs have just been stubbed with `UNIMPLEMENTED()`.
We'll need to flesh these out. This unblocks the Tint team for now though.
Bug: dawn:1123
Change-Id: I484559278a21e187ba496e01401316ac91be7d26
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92941
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
- Also changes to use string_view for the constexpr hash.
Bug: dawn:549
Change-Id: I1ded4994d501f0378d3fa8f5c16d07e3c566270f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92962
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Both parts of this depth/stencil test have been fixed in ANGLE.
Bug: angleproject:7303
Change-Id: I7c7db6cf10f973a22102b706571baaefbeba4fa7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92441
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This CL converts remaining @stage instances in the dawn tree to use
the equivalent shorter variant.
Bug: tint:1503
Change-Id: I74594cd68544fbd692f77d4646991d9c27e218f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92484
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Previously, deleting the device in the wire implicitly released all
child objects. This is no longer the case, so a leak of the client
default queue caused the service-side queue to leak.
Fixed: chromium:1332926
Change-Id: I1efa02e79246f985e99e1bc814d87f292ddc22bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92743
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL converts the @stage(...) in src/dawn/test to use the new
@compute, @vertex, or @fragment syntax.
Bug: tint:1503
Change-Id: I51feaceebe8b3ba03a95ddd93367c76d2b24a4ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92482
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Disallow duplicate location in timestampWrites in a render/compute pass
to match WebGPU SPEC.
Bug: dawn:1250
Change-Id: Id9e3b54530d37ffc0c00aa15c23312bb1ea30d00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
ObjectData<WGPUQueue> was specialized to do exactly the same
as the existing default template. Remove it.
Change-Id: I391d032addcc192854d13764327816342aa7ab86
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92780
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit removes the lines from RefBaseTests.cpp that access
a moved-from object after move. This change removes "use-after-
move" clang-tidy warning.
There is no pointing testing the behavior of moved-from objects
because it can be avoided with clang-tidy check.
Bug: dawn:1439
Change-Id: If2144db2b50ad3f5a6d7a8d402b2978db4d8bd16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92620
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Functions GetMipLevel*Size() are somehow unclear and misleading on
whether the array layers are counted into the z-axis of the returned
Extent3D (Extent3D.depthOrArrayLayers).
This change renames them to GetMipLevelSingleSubresource*Size(),
making it clear that array layers are not included in its z-axis.
Because different array layers are different subreources, they are
not in a single subresource. However, depth slices in 3D textures can
be in a single subresource and can be counted.
Bug: dawn:1288
Change-Id: Ifa1776befa863d0f5a11999cab4099e2e7e5996a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92124
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Add D3D12 pipeline caching impl: store cachedPSO blob in cached blob.
Record root signature ID3DBlob in cache key together with
D3D_SHADER_BYTECODE, D3D12_GRAPHICS_PIPELINE_STATE_DESC or
D3D12_COMPUTE_PIPELINE_STATE_DESC.
Shader caching is not added.
Add some pipeline caching negative tests.
Bug: dawn:549
Change-Id: Id1cb560b49f1cf495860e2e0bcf92d8d988c5379
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91180
Auto-Submit: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Some unittests break the clang-tidy rule
"bugprone-use-after-move". Moved-from variables after move
shouldn't be accessed even in the tests. No one should care
the behavior of moved-from objects. There is no pointing
testing something that shouldn't be observable with good code
practice ensured by clang-tidy.
This commit fixes the problem by removing the lines accessing
moved-from variables after move.
Bug: dawn:1436, dawn:1437, dawn:1438, dawn:1440
Change-Id: I5a6ccaa6fa74e607f818b5296a1715196bfd0f25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92204
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Ben Clayton <bclayton@google.com>
Use planeLayouts instead.
Bug: chromium:1258986
Change-Id: I16c041a8e0b739fa347ea4695988ad1eed82cccc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92202
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This member will be removed. This first requires removing code setting
it in Chromium, which will make it contain garbage value. If we kept
validating it, then we'd fail validation spuriously.
Bug: dawn:1445
Change-Id: I8daa90b949db867b89fcf955cfaec45f7845210f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92241
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
In this patch NumWorkgroupsFromUniform::Config changed to storage
std::optional<sem::BindingPoint>, and if it has no value,
NumWorkgroupsFromUniform will choose a free binding group, i.e.
binding 0 of the largest used group plus 1 is used if at least one
resource is bound, otherwise group 0 binding 0 is used. Tint CLI
is also changed to provide a --hlsl-root-constant-binding-point
option allowing user to specify the binding point for num_workgroups
uniform buffer.
Bug: tint:1566
Change-Id: I3b8c22a4276bab722d901f5b07d23a268786c417
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91980
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This uses VkImageDrmFormatModifierExplicitCreateInfoEXT instead of
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT to
import mulit-planar external images.
More discussions about this change can be found at this Mesa issue:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6530
Bug: chromium:1258986
Change-Id: Ifde3d89e7ddf37d6a295c9d7fcc7c762f8da1e81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91940
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Fixes an ASSERT checking the created surface is non-null.
Fixed: chromium:1330113
Change-Id: Iebbcd6e69042abea5b424953d78e294a92ce5c82
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92140
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bug: none
Change-Id: Ib2139edfe42f5c98db13064d1e66664751b1e6cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92141
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Some bug reports have come in using lavapipe which is not a conformant
Vulkan implementation that we care about fuzzing.
Bug: chromium:1330453, chromium:1330389
Change-Id: I219103c30ca30702c8f3ccd6eebe87b90a10b6d2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92121
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL removes some forward declarations which are no longer needed
and adds one missing declaration which was pulled in from other headers.
These were found by the clang-tidy bugprone-forward-declaration-namespace
check.
Bug: dawn:1414
Change-Id: I8906861e472f2d64a1547c8c6de348cd4151ffb5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91742
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Previously, the device/adapter were all created on the service-side
of a test, and then injected into the client side. Injected devices
and adapters do not support querying limits and features.
This CL changes setup so that adapter and device creation is always
initiated by the client - and the implementation on the service side
may be overridden for test fixture-specific behavior.
It also adds more fuzzing coverage since the fuzzers can now also
create adapters and devices.
Bug: dawn:689
Change-Id: Ief7faa1908ceae973dcb2f600bf4dd1cf5417704
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91680
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reenable the following tests:
BindGroupTests.DrawTwiceInSamePipelineWithFourBindGroupSets and
BindGroupTests.ArbitraryBindingNumbers
Fixed by https://chromium-review.googlesource.com/c/angle/angle/+/3668840.
Bug: angleproject:7304, angleproject:7305
Change-Id: I9482ddfb26246fa4ed123654645cbcedc266294a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91723
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This patch replaces VK_MAKE_VERSION with VK_API_VERSION_1_x as
VK_MAKE_VERSION has been deprecated in vulkan_core.h.
Bug: tint:1497
Change-Id: I9e9d1d39a139aad687d1f2c7671b562b46e83768
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91800
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Should fix dawn -> skia roll
Change-Id: I8686052c45a1daf04469f5b90428b55632058413
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91841
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
SwiftShader does not export function pointer type information.
So, when fuzzing with UBSAN, fuzzers break whenever calling
a vk* function since it thinks the type of the function pointer
does not match.
Workaround this problem by proxying through a std::function
in UBSAN builds. The std::function delegates to a Call method
which does the same cast of the function pointer type, however
the Call method is tagged with
`__attribute__((no_sanitize("function")))` to silence the error.
Bug: chromium:1296934
Change-Id: I6971eecdda8ae10542a8d9bfb942f841c50227c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91740
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This patch adds the support of the experimental feature
chromium_experimental_dp4a on Vulkan. Currently this
feature is enabled on Vulkan backend only when DP4a
instructions are hardware-accelerated.
Bug: tint:1497
Test: dawn_end2end_tests
Change-Id: I5a63111a6b5972aa1934f0e7be984ebdb1e35080
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91520
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This change moves the bulk of the existing GPUInfo functionality into an autogenerated source built from a JSON file that describes the GPU
vendor and device IDs, with device IDs broken down by GPU architecture.
Also adds the fields needed to implement GPUAdapterInfo in Blink to the AdapterProperties.
Bug: dawn:1427
Change-Id: I6a8b1fa7a63ec8d71556fc5bb3ae12cfe5abf28b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90962
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
The "Mac Pro FYI (AMD)" bot these were added for probably doesn't exist anymore, and this issue seemed to be fixed long ago, in macOS 10.13.
Issue: dawn:58
Change-Id: I3490a39a32f6b80111574d123327a0e6865f2c25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91741
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
When fuzzing, silence all LogMessages as errors frequently come up.
Suppressing logs should make the fuzzer more efficient.
Bug: none
Change-Id: I827625446c2afc3771ebf14d676b4e211d99dbda
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91601
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Currently Dawn ignores all zero-attribute vertex buffer in the given
pipeline descriptor when creating RenderPipelineBase because
zero-attribute vertex buffer is treated as unused slot, however the spec
doesn't state that zero-attribute vertex buffer should be ignored.
To support zero-attribute vertex buffer, this commit has the following
changes.
1. Add VertexBufferNotUsed enum value to wgpu::VertexStepMode to
represent unused slots
2. Ignore VertexBufferNotUsed step mode buffers when creating
RenderPipelineBase and add tests to check it
3. Record zero-attribute vertex buffers when creating RenderPipelineBase
and add tests to check it
4. Fix VertexStateTest::LastAllowedVertexBuffer broken by the above
changes
Temporarily we set the enum value of
wgpu::VertexStepMode::VertexBufferNotUsed to 0 to pass the CTS tests
because currently empty vertex buffer slots step mode can be
zero-initialized. We will make a CL to Blink to explicitly set
wgpu::VertexStepMode::VertexBufferNotUsed for empty slots and change
the enum value to 2.
Bug: dawn:1000
Change-Id: Ibd4ab87f2c922e8e460f2311547f13d58f1d5611
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89340
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
EGLImageWrappingTests only need to compile against ANGLE's egl.h; they
don't need to link against it.
Also pass the correct filename (libEGL.dylib) on Mac.
Bug: dawn:1284
Change-Id: Iae7eb194263772bd0e92fe53c90d938b26a5735d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91641
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The reformatting has taken place so the namespace no lint entries
are no longer required. Removed.
Bug: dawn:1381
Change-Id: I200f540ad5464e5f1ff103919cca71daf13c505c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91380
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Textures with more than one arrayLayer will now default to 2DArray
rather than 2D.
Change-Id: I34dd58aae27c4add65166343641777b3ac4dabcb
Bug: dawn:1380
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87306
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This member should not be cleared after Destroy() since the application
may ask for it if it still has a reference to the device.
Instead, only clear the member after the application has dropped their
last reference to the device.
Bug: chromium:1327865
Change-Id: I282482fec5db11b4c75b91ba5995d7e2599b89a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91281
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Chromium creates gbm_bo buffers without the
GBM_BO_USE_SW_WRITE_RARELY flag to hold the video frames from VAAPI
decoder. The added case could better cover this and catch the recent
mesa regression:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/5940
Bug: chromium:1258986
Change-Id: Ib8313b35fe90928aae03791560d80fdb47bcea32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91081
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Changes the yuv-to-rgb constant matrix to be optional during external
texture creation because it is not necessary for single-plane scenarios.
Bug: dawn:1082
Change-Id: I543f4009e58f1571b0be80abb6b464b2b8c9d749
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91280
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This will test the same path currently exercised by the
WebGPU/Compat prototype in Chrome.
Suppress failing tests.
Bug: dawn:1420
Change-Id: Ie3d55e387ece292a98ec15eeaa04b6fad25e3be7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Update child objects to ref the device. This allows them to outlive
the device, making the implementation more robust such that it is OK
to drop the device before other objects.
Dropping the last external reference to the device is currently an
implicit device.destroy(). This destruction breaks possible ref cycles
where the device refs internal objects which have a back ref to the
device.
Bug: dawn:1164
Change-Id: I02d8e32a21dcc5f05e531bd690baac4a234b5f6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90360
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch implements PipelineLayoutD3D12::DestroyImpl() where we
call ReferenceUntilUnused() to all the root and command signatures
so that they won't be destroyed when they are referenced by GPU
operations in-flight on command queue.
BUG=dawn:1422
TEST=dawn_end2end_tests
Change-Id: I54df7b53645c9beaaa2e7b74aef54e0f6d37c440
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90940
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
When we initialize the dst texture before T2T copy, we clear a
buffer with zeros and do a B2T copy in order to initialize the
texture. The T2T copy may only copy a subrect of the texture's
subresource, so does the initialization via B2T copy. As a result,
the buffer can store compact zeros for that exact subrect and then
do an exact B2T copy to initialize that area.
However, the current B2T copy uses incorrect data layout for the
buffer, making some part of the dst texture uninitialized, and
even leading to D3D12 runtime validation errors sometimes if it
goes beyond the boundary of staging buffer pool (4MB).
This change fixes this bug via using the exact height of copy area
to replace dataLayout.rowsPerImage (unnecessary padding rows included)
for the height of each depth image for 3D textures.
Bug: dawn:1288
Change-Id: I303e0d363039a6a87e352a8445898031e673cf4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90780
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
We already have third_party/webgpu-cts. This came in during the tint ->
Dawn merge, and is not necessary (and confusing).
Change-Id: I1a4ce4463e55624b5f720573c54f45d1d1dc57e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90900
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
According to the spec, when call draw or drawIndexed, vertex step mode
vertex buffer never OOB if (vertexCount + firstVertex) = 0, and instance
step mode vertex buffer never OOB if (instanceCount + firstInstance) = 0.
Modify the validation implementation to be aligned with the spec, and
add corresponding unit tests.
This patch also add unit test case for (strideCount - 1) * arrayStride +
lastStride <= bound buffer size < strideCount * arrayStride.
Bug: dawn:1287
Change-Id: If444e400f5ac24f86ca12ff59fb886d8ef70e8c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90584
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
* Extract ast::Enable::ExtensionKind to ast::Extension.
* Move the parsing out of ast::Enable and next to ast/extension.h
* Change the ast::Enable constructor to take the Extension, instead of
a std::string. It's the WGSL parser's responsibility to parse, not the
AST nodes.
* Add ProgramBuilder::Enable() helper.
* Keep ast::Module simple - keep track of the declared AST Enable nodes,
don't do any deduplicating of the enabled extensions.
* Add the de-duplicated ast::Extensions to the sem::Module.
* Remove the kInternalExtensionForTesting enum value - we have kF16
now, which can be used instead for testing.
* Rename kNoExtension to kNone.
Bug: tint:1472
Change-Id: I9af635e95d36991ea468e6e0bf6798bb50937edc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90523
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Relying on the config inside //build breaks in projects that use their
own version of //build instead of Chromium's.
Bug: dawn:1405
Change-Id: I18bbf5c6ddce18e6900f5f4b937d91a152bb2b32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90524
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Adds ForTesting APIs to the instance to track the number of devices.
Bug: dawn:1164
Change-Id: Ib743afb1e86ef16740d49613f43f9e2f009232bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90583
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit 63cea3f8c0.
...except it skips adding the the constructor/destructor/copy
definitions for dawn::native::Format. Adding them triggers "constexpr
variable cannot have non-literal type" (or "declaration requires a
global constructor" if it's not marked constexpr), unless they're
explicitly marked as =default in the header - which just triggers a
different chromium-style warning, so there's no point.
A better solution to the chromium-style warning on Format may be to just
make the class physically smaller:
https://www.chromium.org/developers/coding-style/chromium-style-checker-errors/#constructordestructor-errors
Bug: dawn:1405
Change-Id: Ied6e9d0abff6bf1330131a40c6583bab18888b67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90303
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Eliminates a static initializer in kUnusedFormat (in Texture.cpp) by
making dawn::native::Format constexpr-constructible.
kUnusedFormat doesn't actually have to be constexpr to fix this, but it
adds explicit enforcement that it's constexpr-constructible.
Includes some extra initializers as a workaround for a bug in the old
version of MSVC (14.26) that's on Kokoro. amaiorano figured out how to
reproduce it locally, with a local install of VS2019 and this magic
CMake incantation:
$ cmake -G "Visual Studio 16 2019" -T v142,version=14.26 ..
Bug: dawn:1405
Change-Id: Ic94324fc624fd720671dec35dcc5ea8ad77ee46d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89863
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This will allow the bots to specify a particular backend.
Change-Id: I9486019c3aef3f8aafb79e30dfc62d23ae9eefac
Bug: dawn:1420
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90320
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
GetOrCreateAttachmentState access mCaches in Device even if device is
already destroyed. Gate the function by checking if encoder is
destroyed.
Bug: chromium:1323310
Change-Id: I8151c5ec696e4da28b8296d9142f3120379782ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89860
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
The shader source can be very large and this is causing excessively
large error messages that get truncated in some applications that use
Dawn native. We don't need to see the whole shader in the error
message.
Change-Id: I15ad7fa7814d19875a7c28b39e5fa9a24f265b98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90161
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
These notes often contain additional useful information that is not
currently being surfaced to the developer console.
Change-Id: I342bfc3147593755d6addf5466f27b083f954826
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90160
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The WebGPU spec says that a validation error is produced if there is a
color target in the pipeline descriptor that has writeMask!=0 while
there are no shader outputs for this target. In Dawn format==undefined
is used as a tag that the color target is not present, so writeMask is
allowed to be 0 if format==undefined. (the validation in the case where
format!=undefined was already present).
Fixed: dawn:1376
Change-Id: I7737b6557223e0fc31740fd4ec2cbfaa54b77a71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/90040
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Chromium tracks the devices which live on the wire so it can
automatically call tick on devices that have pending work. This used
to be done by querying an (id, generation) pair and checking if it
resolves to a non-null device.
This CL adds a new way to query directly using the device, since a
refactor in Chrome will change creation such that the id and generation
is not known when a new device is requested.
Also fixes a bug for device callbacks where the required callback
userdata wasn't fully populated for devices created with
requestAdapter. Update a test to check for this as well.
Bug: chromium:1315260
Change-Id: I7468edc3e77bade191e1e9f3eaadebbf4441d88a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89520
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Bug: dawn:1410
Change-Id: I0ad4873474614bcd62638583bf905ff2742eaae2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89821
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
There is currently a race condition in the metal backend with the
updating of `mCompletedSerial`. It is currently possible for the
`addCompletedHandler` to set to one value and then have the
`CheckAndUpdateCompletedSerial` call immediately set it back to
a lower value. This can then cause hangs as the serial never
correctly updates again.
This was happening on `dawn.node` when running a large number of
CTS test cases all at the same time.
Change-Id: I28fc58ab2b3737ca8039559718e539ce819e88bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89780
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds the `-Wsuggest-override` and
`-Wsuggest-destructor-override` warnings and fixes up the identified
issues.
Change-Id: I0ec1303a822abc258ce34d3bf1900e37ade6a8dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89561
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Any unhandled error or device loss in the tests that are not expected
should cause a test failure. Mocks other than StrictMock will not cause
a failure and instead just write to stdout (or not write at all).
Fixed: dawn:1412
Change-Id: I2dd108da8fa6ba2cd7967790de4d7fa4b9f821ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89600
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This avoids Tint validation errors between transforms caused by unused
entry-points having conflict with the remapped bindings.
Fixed: dawn:1363
Change-Id: If7d22d09905816bfe777ab22211af21513f98698
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89441
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
- Unexpected device lost should result in an error.
Fixes: dawn:1412
Change-Id: I6fe0b1ccc3e4b51cc85b9a058f8eac65c7622d89
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89500
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds missing constructors and destructors. Others are moved
from the header file to implementation files.
Bug: dawn:1405
Change-Id: I06657d4a4faa437ca5a95a0067a8f9f9bbc89d12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89181
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Removes check for Unsafe API toggle for multiplane external textures.
This is no longer needed now that the the implementation is functional.
Bug: dawn:1409
Bug: chromium:1323647
Change-Id: Iaf1c1b6bd053b68e306df61759ee9d81777f9b87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89460
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
This CL adds some missing constructors and destructors. Others are moved
from the header file to implementation files.
Bug: dawn:1405
Change-Id: I17e98f6da48518112bafb0876679cc3989ba2548
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89160
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL moves the constructors and desctructors for the native
unittest mocks into separate cpp files.
Bug: dawn:1405
Change-Id: I20dccaa8114f3d7f8b61da1c1495648cb7328148
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89121
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL fixes a few missing overrides and updates some `auto`'s to
have a `*` on them.
Bug: dawn:1405
Change-Id: I621cd35fb10d8308a5831db11c22a3595e52e295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89120
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Tint has already implemented the enable directive for using WGSL
extension in the future, and using a WGSL extension that is not allowed
for the device should result in a shader creation error.
In this patch a WGSL extension allow list is added in DeviceBase, and
a validation is added in shader module base initialization to make sure
all extensions used in the WGSL program are in the allow list. This
patch also rename the `ValidateShaderModuleDescriptor` to
`ValidateAndParseShaderModule`, which is more descriptive for what it
actually does.
Bug: tint:1472
Change-Id: I4b039a3e37c25159b4fc6cfa37488aa817004ab2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88241
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This change ensures that when errors are raised from WebGPU, including
lost context errors, they can include any associated Vulkan validation
layer messages in the message text if backend validation is enabled.
This will allow these messages to be surfaced in places like when
running CTS tests on browser build infrastructure.
Because of how Vulkan messages are raised at the instance level, some
routing of the messages to the appropriate device needed to be added.
This is based on appending message IDs to object labels and then parsing
them out of the message when it comes in.
This change also makes Vulkan validation messages cause a device loss,
which is inline with the behavior of the D3D12 backend.
Bug: dawn:1396
Change-Id: I2b309ba5475a338e7e99d4b4daaa7c3d5de61011
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88460
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Various things are deprecated or removed in C++20, including
* Various allocator member types
* std::iterator
* std::result_of
Replace these with supported versions.
Bug: chromium:1284275
Change-Id: I11a2909e3a269cdb98ada2bd6621086409878242
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89040
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Peter Kasting <pkasting@google.com>
Commit-Queue: Peter Kasting <pkasting@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Bug: dawn:667
Change-Id: I6a78c7f6f9a850ef9ba30d3bafde9b198bab2edc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88940
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This PR fixes one gn include issue and widens the GN check results
to test all but one of the GN targets. The remaining target is
disabled due to our absl configuration.
Bug: dawn:1372
Change-Id: I6e92a7aa777c3508e57d1e7138c73b7a92756db1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88680
Reviewed-by: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Don't emit colors if we're piping to a file, or the terminal does not support colors.
Always strip color escape code when writing to the --log file
Change-Id: Id15169f694563f06e950fdcab7344614b3f15e23
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88665
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
- No longer needed since the device information should be stored in the cache key.
Bug: dawn:549
Change-Id: I7c4e31e61df93ba317bc6eeb6a84074585f7eed2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88365
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
- Adds testing for Vulkan pipeline caching.
- Removed redundant VK_NULL_HANDLE and use explicit {} initialization for 0 handles when necessary.
- Adds some const qualifiers where applicable and useful.
- Removes overloaded GetCacheKey (const/non-const) versions and exposed the cache key member directly for modifiers in derived classes.
Bug: dawn:549
Change-Id: I5e8ab9716eebc916b813c9d032f8dc1f3f5261bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86581
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
make, unlike ninja, will not create output directories prior to
running commands. Have idlgen create the output directories before
attempting to generate the files.
Clean up the generated directory structure. Piggyback off the
existing DAWN_BUILD_GEN_DIR variable instead of starting a new
gen directory at <build>/<subdir>/<gen>/<subdir>.
Add Kokoro tests for building dawn node.
Change-Id: Ic079ee96f4beaa1f9c3da98495bed6757f557839
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88447
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Calls to textureSample() must only happen in uniform control flow, so
move them to before the conditional discard.
Bug: tint:880
Change-Id: Idd6ca35a7acaa6917753da8deb6e9266284afe86
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88463
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL updates the clang format files to have a single shared format
between Dawn and Tint. The major changes are tabs are 4 spaces, lines
are 100 columns and namespaces are not indented.
Bug: dawn:1339
Change-Id: I4208742c95643998d9fd14e77a9cc558071ded39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87603
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Adds configurable gamma and gamut correction in Tint's external texture
transform. Adds constants in Dawn to perform correct conversion from
BT.709 to sRGB.
Bug: dawn:1082
Change-Id: I68b7ad7ccec29977c637a0a0d4f526cd47fe73d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88367
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Bug exposed by emscripten webgpu binding issue.
It seems the spec updated after the last code updates. Update the
validation part a bit (introduce rangeSize).
Bug: dawn:1400
Change-Id: I0ddefd5c1a0976cc34102a44514bccd70f7a1ac0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88080
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Shrek Shao <shrekshao@google.com>
In https://github.com/gpuweb/gpuweb/pull/2689 both dispatch and
dispatchIndirect were renamed to dispatchWorkgroups and
dispatchWorkgroupsIndirect in order to clarify the meaning of the
arguments.
Change-Id: Iadb9d8b60c43445a69f9c569fba2340b5dca95a9
Bug: dawn:22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88364
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This is needed elsewhere.
Rename location.go to paths.go, as this is really dealing with file
paths.
Bug: dawn:1342
Change-Id: Ifdbfafc0fd763ac7ec2b8f692efc35772c4793da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87704
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
GCC is warning that the switch cases do not have a 'default' clause, and so control flow can reach the end of the function, which does not have a return.
Change-Id: I45465e7f9547d683ea7eb5f356b80a77e6d95d73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88310
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Factors out device creation code to helper.
- Updates callbacks and test infra to support different devices and use mock callbacks.
- Updates some tests that were using outdated device lost callbacks and multiple devices.
Change-Id: I4210280420b8dadbc6355d27995ccf0cd864108c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87480
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This workaround replaces the toggle that forbids creating mipmapped
R8Unorm and RG8Unorm textures on Metal. Instead it adds a Metal render
pass workaround that renders to a temporary texture under certain
conditions, then copies back to the correct mip level.
The texture lazy-clearing code is also changed to use the helper that
does workarounds for Metal render passes.
A test is added that triggers the issue with a small amount of code, but
more extensive coverage is left to the CTS. For example texture_zero
tests caught multiple issues during the creation of this CL.
Bug: dawn:1071
Change-Id: I7ef1151524e71e5a9a8e8f5205d9b554bee438b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87864
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Chromium requires macOS 10.11 so we no longer need to special case this
in Dawn for Metal support anymore.
Bug: None
Change-Id: Ib5dee5464a3ec27abdd0f5c62e51caa42171fadb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88303
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Go tooling does not work properly when modifying go files in subdirectories from the root of the IDE.
Consolidate the two go modules in the source tree.
We'll eventually want to move `src/dawn/node/tools` to `tools/src`.
Allows us to type `go test ./...` at the root, and test all go code in
the entire repo.
Bug: dawn:1342
Change-Id: Ie3dd2c89a769cd25c2b68884970ef0f2ba8c7560
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86532
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Use a while loop to pop the list instead of iterating it and deleting at the same time.
- Adds regression tests to verify that the fix works.
Bug: chromium:1318792
Change-Id: I84fb494c64b07d3e1bd2b5b3af7cb9f82eee28b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88043
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This change ensures that when errors are raised from WebGPU, including
lost context errors, they can include any associated D3D12 validation
layer messages in the message text if backend validation is enabled.
This will allow these messages to be surfaced in places like when
running CTS tests on browser build infrastructure.
Also makes a minor adjustment to how HRESULT codes are reported so that
they're easier to read.
Bug: dawn:1396
Change-Id: Ib5c039157c57e6926bc82941a68be03e33e9084c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88044
Commit-Queue: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
ES requires GL_EXT_texture_format_BGRA8888 or GL_APPLE_texture_format_BGRA8888 to create BGRA8 internalFormat textures, and GL_EXT_read_format_bgra to read from them. Desktop GL can swizzle back and forth from RGBA8, so keep using RGBA8 if the extension is unavailable.
Intel's implementation of GL_EXT_texture_format_BGRA8888 on ES is broken, and won't create GL_BGRA8_EXT or GL_BGRA internalFormat textures, so disable the test there and modify another test to not use BGRA textures.
Change-Id: Ia81d9ff20e2849b00379f8e01fb5d2ecfa34bd53
Bug: dawn:596, dawn:1393
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86744
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
In follow-up commits these workarounds will be used in more than just
the CommandBuffer but also for lazy-texture clearing. In this CL the
helpers are just moved and changed to take `encodeInside` as a
std::function.
Bug: dawn:1071
Change-Id: Ib3b90826c89e12edca41223b3c8b5a4cfc6fed04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87863
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
- Removed to allow for easier development changes to caching interface as it is implemented for pipeline caching without having to keep supporting this incomplete feature.
Bug: dawn:549, dawn:1341
Change-Id: Id27deca45ac5607a4a6a7a016b19e3d60693ed72
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87610
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This macro does not exist in this scope.
This was added in https://dawn-review.googlesource.com/c/dawn/+/87600, but was previously a comment.
Should fix dawn -> chromium roll
Bug: dawn:1339
Change-Id: I8457e1ae14b0c199f32f9c1a8b7487b6a8c8120c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87921
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
- Since we were recording everything, the sparse representation caused uninitialized data to be recorded in the cache key causing cache key inequality at times.
Bug: dawn:549
Change-Id: I7dc3ea34a7dd91addc7b5ca52c79b3354733966b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87609
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Adds configurable gamma and gamut correction in Tint's external texture
transform. Adds constants in Dawn to perform correct conversion from
BT.709 to sRGB.
Bug: dawn:1082
Change-Id: Id5eecc37f0224541bf36e2f9757e7e2047e4b66b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87666
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
This PR adds the --quite flag into the CTS runner command line. This
will suppress the summary information and the duplicate failure
information as it's already output by the run-cts test runner.
Change-Id: I4e885d416c7ab679551e76f3fc702aa7b5a3535f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87900
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Currently the entire block of output gets coloured in the CTS output.
This can lead to giant blocks of red and green on the screen which is
hard to read. This PR changes the output to only colour the title and
leave the message the default colour.
The skip colour of blue was changed to cyan as the blue was showing as
red on my terminal which makes it appear as an error instead of a skip.
Change-Id: Idb4fc053bb83c710871f75b997e1fc3e3fdea695
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87679
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Previously the error messages about buffer usages would also include
the internal ones that are not set by the base WebGPU API (e.g.
kInternalStorageBuffer is showed when the buffer usage includes Indirect
or QueryResolve), which may confuse the developers.
This patch fixes this issue by implementing Buffer::GetUsageExternalOnly()
for front-end validations which only return the usages with which the
buffer was created using the base WebGPU API.
BUG=dawn:1382
Change-Id: Ie13135efaf2c3dab729d75a80eff486efa525c7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87382
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
In [Mach engine](https://machengine.org), we compile Dawn's C++ sources using Zig as the C/C++
compiler and Zig's build system (we don't use Dawn's regular build system.) Zig uses clang
with UBSan enabled by default: this caught this instance of undefined behavior, where passing
no dynamic offsets would result in memcpy being called with size 0.
We've encountered at least [one other instance of undefined behavior](https://github.com/hexops/mach/issues/239)
via UBSan in addition to this one, which I will send another CL to fix soon. I'll also verify
we don't see any other instances of UB.
Bug: dawn:1371
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Change-Id: Ifc3b938e990b6a0a3b203796ea99ee5abb9a4a09
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87380
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds names to the TODOs which did not have them and enables
the readability/todo lint. The names are based on the git blame for
the TODO lines.
Bug: dawn:1339
Change-Id: I25a2920bc8fa9606f5dda67a629fdef1c10f8948
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87600
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL fixes up various build/namespaces lint errors and enables
the lint check.
Bug: dawn:1339
Change-Id: Ib2edd0019cb010e2c6226abce6cfee50a0b4b763
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87482
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Changes Dawn and Tint to use a 3x3 matrix for external texture
YUV-to-RGB conversions. This will allow us to use standard matrices
as they exist in SkYuvMath.
Bugs: dawn::1082
Change-Id: I8e0c7c3dc1c085d8f336da956aea9496913b70fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86847
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
- To be used for pipeline cache testing.
- Plumbs overriding the platform to the adapters for testing.
- Restructures build a little bit so that the test infrastructure can have full access to dawn native internals. Also differentiates end2end and white_box a bit more to make it clear that end2end should not have access to dawn native internals.
Bug: dawn:549, dawn:1374
Change-Id: Ibcc6c44a116c7967ee2317c74409f613e896eb0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86841
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Adds support for non-zero first/baseVertex on Draw[Indexed]Indirect by
duplicating the first/baseVertex indirect parameter onto a root
constant in the indirect buffer.
Change-Id: I280149065179806d3e57b07f1a396f9e2e4e8fcb
Bug: dawn:548
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84240
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Auto-Submit: Enrico Galli <enrico.galli@intel.com>
- Note: goal is to merge the two into the same class, but to avoid breaking/fixing the current D3D12 shader caching, introducing a new one, and will merge the old one later on.
- Adds instance of BlobCache to the Instance, and passthrough for the Device to get to it. (We want the cache to be at the Instance so that eventually different devices can still use the cache (assuming same isolation key)).
Bug: dawn:549
Change-Id: Ib7c82a439f32b306f0cccd3db424fb0e427a90a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86400
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
GLFW window creation can fail. If so, we should not attempt to
make the context current and create adapters on it.
Bug: dawn:1375
Change-Id: Ie1a94a42d1f56514b41a715add7a2b4eebb763f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87460
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL fixes a few readability/casting issues and enables the lint
check.
Bug: dawn:1339
Change-Id: Ib0d127c3e01fad9b5ac074d8ca09f3a1956ad4fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87020
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
D3D12 requires more buffer storage than it should. If the buffer used
for B2T/T2B copy is big enough according to WebGPU spec but it doesn't
meet D3D12's requirement, we need to workaround it via split the copy
into two copies, in order to make B2T/T2B copy being done correctly on
D3D12.
Bug: dawn:1289, dawn:1278
Change-Id: Id88c580dce00553845817677a2d356690ef4acfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This CL fixes up various runtime/int types to be more specific.
Bug: dawn:1339
Change-Id: I61c8ecc89abd0373173b95bfb594c75d05a5d505
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86865
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL fixes a few readability/namespace issues and suppresses one
which is in conflict with the current formatting rules.
Bug: dawn:1339
Change-Id: Ifb688b05d50ebc3e698a77700178f87c93b14a46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86867
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL adds the needed headers to pass the include what you use lint
check.
Bug: dawn:1339
Change-Id: Ib8df68e51b2c3711169b400e84768d4804568580
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86941
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL adds explicit and fixes up the various call sites for the
LogMessage class.
Bug: dawn:1339
Change-Id: Id244d0e31929d31346af48e116a40e7079a50372
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86872
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds the attribute and fixes up the call sites to work with the
constructors being explicit.
Bug: dawn:1339
Change-Id: Ic584477c064411e42143dfc6179bbddb0d6a69c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86871
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
The current presubmit has the filter inverted so it would only attempt
to match the filtered files. The file name also has to be converted to
`LocalPath` otherwise it's attempting to compare a python object to a
string and always fails to match.
Bug: dawn:1339
Change-Id: Ie7712dee60f6b9df2cb78c9feab11769f7ea1f02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
The new tests reveal that this incorrect calculation of buffer size
requirement on D3D12 exist only when:
- the texture dimension is 3D, and
- there are rowsPerImage paddings (imageLayout.rowsPerImage >
copySize.height), and
- it's copying multiple depth images (copySize.depthOrArrayLayers > 1).
The new tests can guide and narrow down the workaround for this issue.
Bug: dawn:1289
Change-Id: I4136d6e3aa3680a65739bfdd402dc0d46debfd8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87162
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Fixed: dawn:1370
Change-Id: I395b3e6e2506608ca4aefdbcef18443b90ca75ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87302
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This Cl moves the cpp includes to above the project includes fixing up
the build/include_order issues and enabling the lint check.
A couple includes are marked as NOLINT as the c header has to come after
the project header due to setting defines.
Bug: dawn:1339
Change-Id: Ia47499c94fff99106397b83f6c5c7fe100c44a0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86513
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL makes RingBufferAllocator explicit and fixes up the two call
sites.
Bug: dawn:1339
Change-Id: I8e6fe4f41a2031fafaaa281255ee242331c24306
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86870
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This reverts commit 3199179167.
Reason for revert: Suppressing these tests didn't help flakes at all.
Original change's description:
> Speculatively suppress RequiredBufferSizeInCopyTests on Win Intel x86
>
> Bug: dawn:1375
> Change-Id: Ieb218fc90e93734f2ccaacaf9a0dd22c57d93163
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86866
> Reviewed-by: Loko Kung <lokokung@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1375
Change-Id: I3b725340516e25b0c8bffb8b817c86278645aba8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87320
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds explicit annotations to the single argument constructors in
the node binding code.
Bug: dawn:1339
Change-Id: I428c8e485bc3d6230c3cf7d61c2146d5ec977abf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86644
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This Cl updates tools/format to match the various Dawn extensions and to
use the `clang_format.py` file from depot_tools instead of the one from
clang. This fixes up some formatting differences so `tools/format` will
now match `git cl format`.
Bug: dawn:1339
Change-Id: I32a2cdbd2d7e950794268616fae38b5bf54ab370
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86874
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL suppresses the threadsafe_fn lint in the sample code and enables
the lint check.
Bug: dawn:1339
Change-Id: I51f6808b894ba1fcb7f3cdbbc274b35cd393dae8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86864
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL changes several includes which were using the system include
syntax to the local syntax. This causes GN check to verify that the
headers are specified correctly in the dependencies.
Two missing dependencies are added to the BUILD.gn file for the
Dawn tests.
Bug: dawn:1373
Change-Id: I7afd5ab48f4f2e2ddaf1839058c6bbeec2b97fd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86940
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL updates the d3d12 files to add explicit to single parameter
constructors.
Bug: dawn:1339
Change-Id: I7896fa37a5eed90fb4184951bd4d823f96d8e88b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86642
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL updates the test files to have explicit added for single
parameter constructors and removed from zero parameter constructors.
Bug: dawn:1339
Change-Id: I21339148bba5e7e89debc38ec426ba15e0d734e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87021
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Add more trace event in Dawn to better understand workflow in Dawn.
These trace events focus on tick() and MapAsync() related in flight
task.
Bug: dawn:1335
Change-Id: Iac35959f315c221c8539137efbf35039458a6f77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86620
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
On Apple M1, maxStorageBufferBindingSize has all 0 in the lower 32 bits,
which was resulting in a value of 0 and causing an internal error.
Bug: dawn:1367
Change-Id: I00719051738f1ad87989dae0ddd96f1ddf325dab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87180
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit 61bc38fd52.
Reason for revert: Appears to have broken the Dawn->Chromium autoroller, which is now seeing Abseil linking issues on Mac and Linux.
Example failing roll: https://chromium-review.googlesource.com/c/chromium/src/+/3590451/
Example error log: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8816532799903001889/+/u/compile__with_patch_/stdout
Log Excerpt:
[802/31819] LINK ./dawn_unittests
FAILED: dawn_unittests
TOOL_VERSION=1650247560 ../../build/toolchain/apple/linker_driver.py -Wcrl,strippath,../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -Wcrl,installnametoolpath,../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Werror -fuse-ld=lld -Wl,-fatal_warnings -Wl,--color-diagnostics -arch x86_64 -no-canonical-prefixes -Wl,-dead_strip -nostdlib++ -isysroot ../../build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=10.11.0 -fprofile-instr-generate -Wl,-ObjC -rpath @executable_path/ -o "./dawn_unittests" "@./dawn_unittests.rsp"
ld64.lld: error: duplicate symbol: __ZN4absl15AsciiStrToLowerEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
>>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o
>>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o
ld64.lld: error: duplicate symbol: __ZN4absl15AsciiStrToUpperEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
>>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o
>>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o
ld64.lld: error: duplicate symbol: __ZN4absl26RemoveExtraAsciiWhitespaceEPNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE
>>> defined in obj/third_party/dawn/third_party/gn/abseil-cpp/strings/ascii.o
>>> defined in obj/third_party/abseil-cpp/absl/strings/strings/ascii.o
Original change's description:
> Enable gn check for all build targets.
>
> This CL removes the `check_targets` entry from the .gn file which
> will enable checking all targets. Two of the GN targets have had
> missing dependencies added.
>
> The `gn/abseil-cpp/BUILD.gn` was referenced against the Chromium
> BUILD.gn for abseil to make sure the `public_deps` and `deps`
> match in the two versions. The paths are re-written to match
> the Dawn paths.
>
> Bug: dawn:1372
> Change-Id: I371e17ec9647e6627429be5c81eb7985da3cc5b3
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86861
> Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Reviewed-by: Brandon Jones <bajones@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1372
Change-Id: I1ce6d62138cd99aa3a75c74eea0ac04ce5048b6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87161
Reviewed-by: Brandon Jones <bajones@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL removes the `check_targets` entry from the .gn file which
will enable checking all targets. Two of the GN targets have had
missing dependencies added.
The `gn/abseil-cpp/BUILD.gn` was referenced against the Chromium
BUILD.gn for abseil to make sure the `public_deps` and `deps`
match in the two versions. The paths are re-written to match
the Dawn paths.
Bug: dawn:1372
Change-Id: I371e17ec9647e6627429be5c81eb7985da3cc5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86861
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL updates the dep in the dawn test to use the `${dawn_angle_dir}`
instead of `//third_party/angle` to match other gn files.
Bug: dawn:1372
Change-Id: I5ac5b39e3ca98e8061eb5ae3cd757841c8711bbd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86862
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
Commit-Queue: Stephen White <senorblanco@google.com>
When we try to work around the bug exposed by tests in this file,
it is necessary to make D3D12 runtime happy and no validatin error
is reported. It is also essential to verify the correctness of
buffer/texture data after T2B/B2T copy whether workaround is applied
or not.
Bug: dawn:1289
Change-Id: I0d86375c513ffd579fdebc786d00e9eccb60cc10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86511
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
GetPendingCommandContext() call might create a new commandList. Dawn handles
it in Tick() by executing this commandList and signal a fence even it is empty.
Skip the unnecessary GetPendingCommandContext() call saves an extra fence and might
resolve the callback for MapAsync earlier.
Bug: dawn:1335
Change-Id: I07f82388edb6978473eeaa2ed0834edbb5e1f497
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86621
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
- Fixes stack-buffer-overflow issue caused due to memcpy due to typing in recording fundamental array types.
This is a reland of commit ca11c03824
Original change's description:
> Add render pipeline cache key generation for Vulkan.
>
> Bug: dawn:549
> Change-Id: I0c0607984193ddcc2add05594517638e5370484d
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85863
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Loko Kung <lokokung@google.com>
Bug: dawn:549, dawn:1368
Change-Id: I6a62fa6e64873f2c487e9926190515cb5cc27bcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86743
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
- Changed path to include only vulkan-tools directory to allow for easier configuration in Skia which cannot use vulkan-deps at the moment.
Bug: dawn:1365
Change-Id: Icbd0d3503b4af9d89b23f89c87f18fde814062f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86582
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Shrek Shao <shrekshao@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
The kokoro bots are running at a different level of verbosity than
the presubmit check. This CL ups the verbosity level for presubmit
to match kokoro and suppresses any new lint warnings which are
produced by the change.
The set of always removed filter options used by PRESUBMIT are
copied into the CPPLINT.cfg main file in order for kokoro to
match the errors presented by the CQ.
Bug: dawn:1339
Change-Id: I875a06bc2ed929d5dbaaa933282e3afa2559a7af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86627
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This helps people looking at samples on how to use Dawn from getting
confused when implementation-based swapchains break (because they were
just made to be good enough N years ago).
Fixed: dawn:1361
Change-Id: Ia989fca4d0455fb8e0ff754056a3d60eb2958b04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86531
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Use templated functions to make calling SetDebugLabel safer, with
less opportunities to screw up the casting and automatic lookup
of the VkObjectType for most handles.
Change-Id: I0938ad6fd7d5fe81569bdee5bc7ec7e396db7bcd
Bug: dawn:1323
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86580
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@google.com>
Bug: dawn:549
Change-Id: I0c0607984193ddcc2add05594517638e5370484d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85863
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
- Note that the device-side cache key will be prepended to object cache keys to prevent incompatible adapter/device cache clashes.
- Adds a new template file to auto=generate these cache serializers based on arguments.
Bug: dawn:549
Change-Id: I24b9d11eb38c579acfcc173a5dced9e1b649cf2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86081
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This CL adds explicit to various single argument constructors. The
explicit is removed from zero argument constructors. None of these
changes required call sites to change.
Bug: dawn:1339
Change-Id: I7dfcf1b393e7dd379e29cd9bc613cb0626a9a967
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86365
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds some explicit notations to single argument constructors in
the include/dawn folder.
Bug: dawn:1339
Change-Id: Ie4e31bf68f920acfcfb27828a465e45fe0977af6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86443
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This is a small rework to try to make the template better handle
functions that aren't associated with an object, when during an
unrelated patch I got confused that APICreateInstance didn't appear in
dawn::native.
Change-Id: If5a2aa3f9e348d1847e48fec4e90e5966ddd489d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86530
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Add a new muxWriter and use this for stdout writing to ensure
that stdout printing does not tear.
Bug: dawn:1123
Change-Id: Iec1ba16e5524c11bfc00ba38b3e4de3c06627fb1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85366
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL adds the two missing copyright headers to files under src/dawn
and enables the lint flag by default.
Bug: dawn:1339
Change-Id: I3c3ec47b7f93dabadd0934fb93042f695e7e96fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86360
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Queue labels can be set by the defaultQueue.label member of the device
descriptor or the setQueue method.
Device labels can be set label member of the device
descriptor or the setQueue method.
D3D12 and VK backend label support included.
Bug: dawn:1323
Change-Id: Ic44f1fac268c20d5338220eaf959d949a5f66536
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85843
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
About comparisons of different datatypes
Bug: dawn:1123
Change-Id: Iefdb8195041b824f63344a0b367fd5bebbe3ca85
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86308
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Wrap `napi.h` with a Dawn header that defines `NAPI_DISABLE_CPP_EXCEPTIONS`, and then includes the napi.h header.
Required now that CMake correctly disables exceptions with `-fno-exceptions`.
Change-Id: If31b28d331f2071a0119339c60cc3ab8ab801a98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL enables the build/header_guard lint check. The existing headers
which failed the check were updated, missing headers added. An exclusion
file for the generator templates was added as well.
Bug: dawn:1339
Change-Id: If572e460179ad501293d5d6cf01e0ea900daa979
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86207
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds the node-addon-api prefix to the napi.h includes. This
required updating the cmake files to have the dawn_third_party_dir as
part of their includes.
Bug: dawn:1339
Change-Id: I56d9f04462d040f6ed236fcef3c4cd85a9144d7f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86241
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL updates the one instance of an empty if body in Dawn to
remove the if. This allows enabling the empty_if_body lint check.
Change-Id: I5c05db828e8033b4f3155a34c3a6723bfd3181d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86082
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Fixed Kokoro failures when building Tint with all readers and writers
disabled.
Change-Id: I9bd041339236488dd563bbe687da883035f2a4b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86181
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This CL removes some trailing ;'s which aren't needed to enables the
readability/braces warning.
Bug: dawn:1339
Change-Id: I776267b4282b1345e6b4258d1aff3d7de9fecb8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86210
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL changes the single `sprintf` to an `snprintf` which allows the
runtime/printf lint check to be enabled.
Change-Id: Ieed654a8d5f23250e4bc8ee07001489a060f8dc5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86084
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL fixes up a few include issues in the dawn folder allowing the
build/include lint rule to be enabled.
Bug: dawn:1339
Change-Id: I585c0b6a7e9c1f8bff466ea8c3765e2a1486e79c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL moves the filters out of the PRESUBMIT.py file and into specific
folder CPPLINT.cfg files. This allows having all the lints enabled in
the Tint code and specifically disabling in Dawn code as needed.
Bug: dawn:1339
Change-Id: Ieb0178b0aac0ea67c52cc5547984ea5696eef5a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86208
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>
This is obviously a non-optimal solution, but works in all cases
except compressed textures.
Change-Id: I3fd5fd89ef4978a18917b068632f25f75527c594
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84160
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
- Adds dependency to vulkan-tools for pNext chain helpers.
- Adds extra caching to vulkan shaders to keep the spirv in the in-memory cache as well.
- Adds pNext chain serializer infra for Vulkan.
Change-Id: Ibe73183fbff15f7310eaaeae92fbd622be1ac096
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85022
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This CL fixes a few tabs to be spaces which makes the whitespace/comments
lint check pass. The check is set to enabled.
Change-Id: I2a6c590aa3bfee888239adc89d1ce4c8c99f3e78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
The sanitizer flags need to be applied to all compilation units, and to all final link stages.
As this is whole-project (dawn + tint), these options have been promoted to DAWN_ options.
Bug: dawn:1339
Change-Id: I17beb5bd2a8f15de9d8f13d132356b5c663d71bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86143
Kokoro-Run: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Also changes enums to use the concept of "limit class" from the WebGPU
specification.
Fixed: dawn:1242
Change-Id: I328ce98c2eaaf3f4b7ff1c253ee5f3db5a2980f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84762
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is the result of running clang-format over all of the files.
Change-Id: I196f0e628583f9d87d350d11d762ea9e98987a01
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86080
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Computation of the default depends on the aspect, but the aspect
may be invalid. Make the default computation robust such that it
picks some valid aspect if a valid one is not provided. This will
make computing the default OK, but still fail validation of the
aspect later.
Bug: chromium:1314049
Change-Id: I2dcfe7962c7e30ac627605b6d0f1c269b3a6af6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86020
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This is both a security/ACL best practice, but also to make the Gerrit UI
better suggest owners for CLs.
Bug: dawn:1339
Change-Id: Ia79b88d919707147d2726a7e4f3ff9080cd275b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86067
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Includes fixes for the backends to create and use a texture view
if reinterpretation is required. Multiple backends used the original
texture and its format instead of the view.
Bug: dawn:1276
Change-Id: Ic31231b2955314e90e011905c9048db6f7899299
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84704
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Integrates Tint repo into Dawn
KIs:
- Building docs for Tint is turned off, because it fails due to lack
of annotations in Dawn source files.
- Dawn CQ needs to be updated to run Tint specific tests
- Significant post-merge cleanup needed
R=bclayton,cwallez
BUG=dawn:1339
Change-Id: I6c9714a0030934edd6c51f3cac4684dcd59d1ea3
This adds a test, and a toggle disable_resource_suballocation.
This enables testing the behavior discovered in the bug without
creating enormous resources.
Bug: chromium:1313172
Change-Id: I779aad50c051e5022a9c85ebfbf33c18173a748f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85861
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Heaps were destroyed immediately instead of deferring destruction
until after all work using the buffer was complete. This is only
a problem on D3D12. Vulkan allocations already have deferred
deletion, and Metal allocations are managed by the driver.
Bug: chromium:1313172
Change-Id: I0ef43709949c9e86c40e766f7f2029b14c8a2e97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85840
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit 0126761de8.
Reason for revert:
Causing Dawn->Chromium roll to fail
BUG=dawn:1346
Original change's description:
> Enable Queue, Device labels to be set.
>
> Queue labels can be set by the defaultQueue.label member of the device
> descriptor or the setQueue method.
>
> Device labels can be set label member of the device
> descriptor or the setQueue method.
>
> D3D12 and VK backend label support included.
>
> Change-Id: Id12dd6e1fc8f1519c55e4efb35e1ead67c085e46
> Bug: dawn:1323
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85540
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Brandon Jones <bajones@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1323
Change-Id: I62e4b508d2c55fd89f2f4c5cbe5d04d22681aeef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85700
Reviewed-by: Brandon Jones <bajones@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Change-Id: Ia80b1bed84aa7d16421d432d5da861e55175b335
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85841
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Fixed: chromium:1312780
Change-Id: I29f13a2df3ef1db6961a5760a6c1bb05ab3fa89b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85680
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This removes a little bit of noise from the reflection of shader
metadata in Dawn. Tests are added to make sure that Tint does the
correct validation (it does).
Bug: None
Change-Id: I334e7c23b723cf5b5985c9914cc9f8d79a7c0568
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85502
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
A list of errors, `infringingLimits`, is added to EntryPointMetadata.
During shader reflection, instead of directly bubbling limit errors up,
they are stored in this list and check only later during pipeline
creation.
Several ShaderModule tests are reworked to create a pipeline to check
for the validation of these limits. For the IO variable limits the tests
needed to be reworked to check for strings in the error messages because
since IO structs have to match between VS and FS, if one failed the
other failed too. (so it's no possible to target the validation of one
of these in particular)
Bug: dawn:986
Change-Id: I689e16454488d4a3c746ece53828555ed72ed561
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85501
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
These are implemented by wrapping the integer types in transparent
ClampedInteger<> and EnforceRangeInteger<> structures.
Some parts of the core needed to be updated after this, either to
disambiguate conversions, or because of bugs (u32 vs u64).
To make the CTS tests checking for this pass, the errors returned when
conversion FromJS failed needed to be updated to TypeError and not just
the generic Napi::Error.
Bug: dawn:1123
Change-Id: Ife1d0baa7687e43d735a1814ec41883c49ae74a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85640
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>