Add support for the OpenGL ES backend to DawnTest.
Enable its use in BasicTests.
BUG=dawn:580
Change-Id: I920f3a8107928d3ecd5b1506fde5242bec4eef31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This matches the defaults of webgpu.h and allows its use from inside
dawn_native for the implementations of SwapChain.
Bug: dawn:269
Change-Id: Icfe15f1775e78690fe4fb7b871bd0c0365d444e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33783
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
A common error when using dynamic offset bindings is to forget to set
the size of the binding, which causes all offsets != 0 to produce an
error. Make the error more explicit when that happens to guide
developers.
Bug: dawn:583
Change-Id: I38a5dfaf3f6756765c7e50cd470ac205b567d00c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33784
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This also simplifies a bunch of code in backends that was used to handle
getting the indexFormat from the pipeline "late".
Bug: dawn:502
Change-Id: Ibae50c8df21323fd391515f6036552e9fb868d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is enough to get all of the sample apps running on a conformant ES 3.1 implementation, such as ANGLE/Vk or NVidia's OpenGL ES Linux driver.
Implements a new opengl::AdapterDiscoveryOptionsES subclass to specify its creation at adapter discovery time.
Adds a "-b opengles" command-line flag to the code samples.
Asserts on a call to glShaderStorageBlockBinding() on ES.
Works around missing indexed draw buffers support by asserting when a non-0 color attachment is specified.
Works around missing glClearTexSubImage() by asserting. :/
These will likely require front-end validation.
BUG=dawn:580
Change-Id: I4a4240ca695a22388c55073fd2aee0323cd4afc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31000
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
We need the ability to parse the GL version irrespective of
GL extension handling, so pull it out into its own class.
BUG=dawn:580
Change-Id: I620267146159ba8e4fa8cba5f6ebff57e981add0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33540
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
There was a data-race between getting and using the pointer to
mLastSubmittedCommands in WaitForCommandsToBeScheduled and setting it
inside the scheduling handler.
Lock the mutex before calling waitUntilScheduled so that the object
doesn't get destroyed from underneath us.
Bug: chromium:1142024
Change-Id: Iadbf473530342de6d108d39285d723815452ac7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change is a prerequisite to D3D pipeline caching.
This change introduces:
- Caching interface which enables the cache.
- Helper for backends to load/store blobs to be cached.
- Ability to cache HLSL shaders.
Bug:dawn:549
Change-Id: I2af759882d18b3f45dc63e49dcb6a3caa1be3485
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32305
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
With the recent enabling of PartitionAlloc on Windows this test is
crashing because PartitionAlloc raises an exception on OOM instead of
returning nullptr.
Bug: dawn:579
Change-Id: I07577ef96272dc7ed26f6922c67ed09f1e5ca97d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
According to the http://www.eel.is/c++draft/temp.expl.spec:
An explicit specialization shall not use a storage-class-specifier
other than thread_local.
Clang doesn't claims about it, but GCC does.
An error example for GCC 8.4.0:
gen/third_party/dawn/src/dawn_wire/client/ApiObjects_autogen.h:25:5:
error: explicit template specialization cannot have a storage class
Bug: dawn:384
Change-Id: Iaf86722a943d19c9796a7f112885666ac88f20ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33480
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch adds another way to get DXC DLLs (dxcompiler.dll and
dxil.dll) by searching the default installation path of Windows x64
SDK (C:\Program Files (x86)\Windows Kits\10\\bin\10.0.[version].0\x64)
so that now Dawn can find these two DLLs when Windows SDK is correctly
installed at the default location.
This patch also forces enabling the "use_dxc" toggle when Dawn can
find DXC DLLs and the device is created with "ShaderFloat16" extension
enabled because currently the HLSL shaders with float16_t can only be
compiled with DXC DLLs.
BUG=dawn:402
Change-Id: I410195d9e079f54faebbca71fff77a71f489f08e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33180
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch skips the dawn_end2end_test SwapchainTests/SwitchPresentMode
as it may sometimes hang on the latest Linux Intel Vulkan drivers.
BUG=dawn:269
Change-Id: Ieaf658b2cded8edbf6159d6d5d6bd09af7baa391
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33380
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This will allow us on the Tint side to refactor the transform code to
correctly run the type determiner at the end of transforms, instead of
hacking it into the transform itself.
Bug: tint:308
Change-Id: I4fd5693ec700b2165ce8c08028b09df6cd8591e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33123
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This helps push for comparing against nullptr more consistently.
Also replaces .Get() == nullptr and .Get() != nullptr with just ==
nullptr and != nullptr.
Bug: dawn:89
Change-Id: I884a4819f97305a73c11bad84391d1d2113ab7e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32922
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds an additional check in the initialization of device
on D3D12 backend to ensure that 'use_dxc' is enabled only when Dawn
can load DXC DLLs (dxil.dll and dxcompiler.dll).
BUG=dawn:402
Change-Id: I85bc8698cf54b612244efc3673241f60a9cee209
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Bug:
Change-Id: I25fc33c01e2148ed2626ff6d1999d414c8c8f04b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33100
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This makes refcounting of these objects more automatic to try and
prevent leaks or use-after-frees in the future.
Also removes operator* from RefBase (and Ref) because it is never used
and cannot work in a normal way for ObjectiveC protocols that cannot be
dereferenced.
Bug: dawn:89
Change-Id: I2e3fbfd638e2ba76d8c563f30bc489a384152552
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32161
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
--enable-toggles=skip_validation is now the correct way to set
the toggle.
Bug: dawn:571
Change-Id: Ia05f542693fdd0eaadb0d87682a2f4b122e2ccb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32743
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>