New APIs supported from macOS 11.0 cannot build successfully on macOS
10.15, even use @available to control whether a declaration is
available on target platform, but does not work in conditionally
compiling.
Update building.md to require the macOS 11.0 SDK.
Bug: dawn:1054
Change-Id: If22ada959c0c1ef41826f78bd337b912772000b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61021
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Currently, Dawn ignores the output of D3D12SerializeRootSignature. This
change adds these error messages to the the CheckHRESULT context.
Change-Id: Ieeb63d7b5408ca1bc9e4ab97d777f764cdf06664
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62163
Commit-Queue: Michael Tang <tangm@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The only part of mGLEntryPoints actually used is the bindings, so
replace ShaderModuleGL::mGLEntryPoints with mBindings.
This required extracting BindingInfoArray from EntryPointMetadata,
making it visible in the dawn_native namespace.
Remove all non-bindings-related reflection, and MSL-specific checks
and workarounds.
Bug: dawn:1076
Change-Id: I05657c0c89f5d8a2185e55f9ad7c8f81d89a8e60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Removes deprecated path for sampling depth textures with
float/unfilterable-float. Attempting to do so now results in a
validation error.
Bug: dawn:1021
Change-Id: I112f45e7227ab1caaf0d6ed203194295e7022db2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61861
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Maintains a 11on12 resource cache on the external image
to prevent re-creating the wrapped resource then
flushing it per produced texture. To prevent
unbounded growth, a basic cap is used which gets
cleared.
This change fixes signficant CPU time spent in the WebGPU command
decoder for video import workloads and excessive memory overhead
from swap chain buffers.
Fixed: dawn:625
Change-Id: I72c07b02f6ab6877a9f21758650962c895933bf9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51421
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is a reland of 365d40b93a
Original change's description:
> Making D3D12 accept InternalUsageDescriptors
>
> This is a follow up from two previous CLs,
> https://dawn-review.googlesource.com/c/dawn/+/58440
> and
> https://dawn-review.googlesource.com/c/dawn/+/58140
>
> This CL adds in the D3D12Backend the possibility to use Dawn Texture
> Internal Usage Descriptor, and adds a series of tests to validate it.
>
> Change-Id: I94f6b39153b60ec8af61bda22d41a865898da613
> Bug: dawn:1027, dawn:1052
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61520
> Commit-Queue: Juanmi Huertas <juanmihd@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Bug: dawn:1027, dawn:1052
Change-Id: I0d35cbf4dc1c6dc80e1a5dfb4770a5383ef543fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61840
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Juanmi Huertas <juanmihd@chromium.org>
Ensures the mapped staging buffer will
always be locked before setting the label.
Otherwise, setting the label could fail
and leave it unlocked which isn't
allowed.
BUG: chromium:1239112
Change-Id: I738f8d6fc3b20b8c8b51671d77e7014d967ffd52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
SpirvUtils.* are now in the dawn_native/opengl/ directory.
Bug: dawn:1067
Change-Id: I9cfb7ee52ec1f4ac321cb03978008843e33f82c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61680
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The now-removed SPIRV-Cross path used to always do this, and the
pure Tint-only path never actually validated the SPIRV. Tint
does not run SPIRV-Tools validation on its output, so add in
validation to ensure we don't pass invalid SPIRV to the driver.
The validation can probably eventually be removed when we're more
confident that Tint's SPIRV output is always correct.
Also include various cleanups for old / unused code.
Bug: dawn:1036
Change-Id: Iaab037518965e52edbd1829f6ab6ba2af0e70143
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61589
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Bug: dawn:1036
Change-Id: Ia60c71558bd2c47a6b7148d86b8dcedfaa79ba89
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61585
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is the simplest change necessary to remove GL backends from
the build in Chrome. The backends will still be enabled on bots
that test Dawn. A more proper fix might be to update the dawn.py
recipe to explicitly enable the GLES backend (we don't test the
GL backend on bots using dawn.py, but we do test GLES), and then
defaulting both dawn_enable_desktop_gl and dawn_enable_opengles
to false.
For now, stick with the most minimal change for two reasons:
1. Defaulting to false would lose automatically enabling the
backends in Dawn standalone builds where they're supported.
2. LUCI changes have changed the permissions to trigger tryjobs
on recipe changes, so testing a recipe change is not possible
right now. See crbug.com/1168315.
Bug: dawn:1036
Change-Id: I7f4977fbd271200f1d6161d2e2b3438cdb4db1ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61600
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Dawn only reapplies bind groups that have changed on the layout
since the last draw. However, the D3D12 backend was always resetting
the root signature state upon switching pipelines. This led to a
bug where the root signature could be changed and dirtied without
reapplying the dirty bind groups.
Moving application of the root signature state to the same loop
that applies bind groups helps ensure the state stays in sync.
Fixed: dawn:1055
Change-Id: Iae89088560e83f6104c921d42de27c03095d654f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61582
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
This commit adds a getter so that Chromium can check whether an
Adapter would support external images. External images are
necessary to implement the WebGPU swapchain and interop with the
rest of the web platform. We should not expose adapters that
cannot interop with the canvas and other web platform primitives
until WebGPU gains options to request more "limited" adapters.
Bug: dawn:1056
Change-Id: Iff83ac26b0e92dccdd4e29c0d854d9276a4a37bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61580
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Brian Ho <hob@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Since the other backends no longer need it, move all of the
utility functions specific to SPIRV-Cross into the OpenGL backend.
This obviates the need for the DAWN_USE_SPIRV_CROSS define, so remove it.
Bug: dawn:1036
Change-Id: I67bb5a85dc128a6f343d09876046cf559395e05f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61541
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Put all cross-platform code references to Spirv-Cross behind
ifdef DAWN_USE_SPIRV_CROSS. Hide build dependencies behind
dawn_use_spirv_cross, which itself is set from dawn_enable_opengl,
since it is the only backend which is still using SPIRV-Cross.
Bug: dawn:1036
Change-Id: Id61512230b50a32c63827a16fece40d7899968d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61400
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Bug: dawn:1036
Change-Id: If447f93f7a17ecfe73f04605a60893edb00990d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61402
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Older names are kept around as an alias for a while. Unfortunately we
have no mechanism for producing deprecation error messages when they
are used.
Bug: dawn:1035
Change-Id: Ic6716fd526ecbedaa8e7925ab93e3ff32f642d97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61382
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This patch removes the comment about adding "interpolationType" and
"interpolationSampling" to InterStageVariableInfo as they have already
added before. Sorry that we forgot to remove it in the PR of adding
these two members to InterStageVariableInfo.
BUG=dawn:802
Change-Id: Ib2f3769f2dc1c8152280a28aad77bf90abf76608
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61384
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
If the Adapter failed to create a D3D device, it would
attempt to access it on destruction causing the
process to crash.
Bug: dawn:460
Change-Id: I3f13043e8049cd71806ee54efa92c70e26561580
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
According to the discussion[1], the sum of all the user-defined
inter-stage component count and all the inter-stage builtin component
count should be no more than MaxInterStageShaderComponents (currently
in Dawn it is always 60).
[1] https://github.com/gpuweb/gpuweb/issues/1962
BUG=dawn:1032
TEST=dawn_unittests
Change-Id: Id5266b72b89c48f5b7073b8307f8f2c0512c8a33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61104
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
If [[point_size]] is not emitted, it is undefined. Set the option for
Tint to explicitly set it to 1.0 when necessary.
Bug: dawn:1059
Change-Id: I27c19e88cda30aef0a8f31b213c58d5bf87feabd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61280
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Bug: chromium:1234680
Change-Id: If8f5c2dc0cdf14bf8a0c713d724b883657bd1463
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61103
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Change-Id: I456b6cc660779175afc73bbef5134fbcf4988ad3
Bug: dawn:1036
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/60900
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This CL adds an internal method to copy textures, that will disregard
the need of having CopySrc usage.
This CL adds an intermediate helped method to be used by both
APIContextTextureToTexture and APIContextTextureToTextureInternal.
Fixed: dawn:1052
Change-Id: Icd28e0ef58ecfaa412eefe8c95e41cd2298a9acc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58440
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Juanmi Huertas <juanmihd@chromium.org>
The IsMacOSVersionAtLeast() function is only defined on macOS, but was
being used on all Apple platforms.
Change-Id: Ie5e37fb8e408f424e55795327cca7f2a345bfdfa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61120
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>