Bug: dawn:433
Change-Id: I47d9ffe16d6ad7730628dc27ec6708006cf4384d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22560
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Per MSDN recommendations, Dawn should handle MakeResident failures by
evicting some more and attempting MakeResident again.
Bug: dawn:193
Change-Id: I0a9d326dcd000360f6eafb5691efb4987a77e8d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22280
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Some WebGPU CTS tests were failing with invalid WGPUTextureFormat
when really the format was simply missing. This CL updates
the validation code so it is more clear.
Bug: dawn:433
Change-Id: Ie7aacd01ea424d9f5df0078703a474e98b72ce41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22543
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The `>>>` symbol was folded into the `>>` symbol in WGSL. This CL
removes `>>>` from Tint.
Change-Id: I9d900de9a6026a8099796b94aad44483f0c6813f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22582
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
The `unless` statement was removed from the WGSL grammar so remove it
from Tint.
Change-Id: I31a185f5c5e3e88b667caea1c9a88aee80c0b810
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22581
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL removes the conditional forms of the break and continue
statements as they are no longer in the WGSL spec.
Change-Id: I46224d6cb5ce706cfc95d35ab0a4eea46abf62a9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22580
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This CL does not retroactively fix violations of the checks, so as new
code is added unrelated failures may appear from older code in the same
file.
Removed the headers= line from CPPLINT.cfg, since it was adding an
extension,.hpp, that we don't use for headers and it is not supported on
all platforms.
BUG=tint:1
Change-Id: I9b2d096cf6c69d1456c857a2fdcd7e7da3fd747b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22544
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
This CL adds a parent class for the type types of interger literals for
the cases where we can have either.
Change-Id: I61b540bedd49a6cf5a899e6864e2ea6f140cd2be
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22541
Reviewed-by: David Neto <dneto@google.com>
This Cl clarifies that IntLiteral is a signed value, which matches with
the usage of UintLiteral.
Change-Id: Ic8f0e2382cb66eb6b09daed096886dcc55e6b0f0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22540
Reviewed-by: David Neto <dneto@google.com>
If the shader declares a storage buffer RO but uses storage buffer in
the BGL, the shader compiler will be told to treat these bindings as
UAV instead of SRV to avoid PSO mismatches.
Bug: dawn:410
Change-Id: I3be3257449de55fd2d35e914233b48c6f7121b58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22322
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is blocking Skia from updating to newer clang
Tbr=cwallez@chromium.org
Bug: chromium:1064305
Change-Id: I7d894dba701ebe2fe0e1b78d5fb42032d88846aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22522
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
The name conditions isn't quite correct for the case statement. This CL
updates the code to use selectors instead of conditions.
Change-Id: I98b8050b11e2328f97e4443469572ab47d7c1555
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22520
Reviewed-by: David Neto <dneto@google.com>
This was hitting an ASSERT because D3D12 doesn't have an option
to set None as the shader visibility.
Bug: dawn:448
Change-Id: I3e056e531e7d1bb89da1736bc609bfe97a2fa194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22324
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds support for the fallthrough statement in a `case` block.
Bug: tint:5
Change-Id: I282643a304846a19212d41bd8bd20a60398bd793
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22220
Reviewed-by: David Neto <dneto@google.com>
This CL adds switch support to the SPIR-V writer.
Bug: tint:5
Change-Id: I8a6ad40cb2d344c87abdf842194b60afb1b4c96e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22165
Reviewed-by: David Neto <dneto@google.com>
This is preparation for emitting nested control flow.
Bug: tint:3
Change-Id: I90fc7edba8cb9937f722e6f5e94c7f222d34c403
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/21801
Reviewed-by: dan sinclair <dsinclair@google.com>
In this case, a basic block is a continue target
for both an outer loop and is also for itself as a
single-block loop.
Bug: Tint:3
Change-Id: If361004a4b871966674ca972922c45e712ce7c9c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22420
Reviewed-by: dan sinclair <dsinclair@google.com>
This CL adds the missing case_selectors option from the grammar updates.
Change-Id: Ia6c110e917dd574711d396fb34ad53a2a67cf1fe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22306
Reviewed-by: David Neto <dneto@google.com>
This function was validating the depth of the copy which is
incorrect for 2D array textures. Remove this check for now
since it would be only relevant for 3D textures which Dawn
does not support yet.
Bug: dawn:424
Change-Id: I756080a899a7c5effe5843a530d4db0571bc10d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22323
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The windows.h macros were undefined only at the end of this platform
header previously but with the addition of d3d12sdklayers.h the
definition of ID3D12DebugQueue::GetMessage picked up the macro and
became GetMessageA or GetMessageW, but Dawn code referred to it as
GetMessage causing a compilation error.
Fix this by preemptively loading windows.h and undefing some of the
macros so that the D3D12 headers don't see them.
Bug:
Change-Id: I1985cc20a9bdec1d25619ac5088e918b2acf8ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This Cl adds preliminary support for generating Kill commands. This may
change in the future if the semantics of kill are set in WGSL to not
match OpKill.
Bug: tint:5
Change-Id: Id466a1b26b37867a26373b93f56d627a0491f47f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22240
Reviewed-by: David Neto <dneto@google.com>
This CL updates a few names, addeds a return_stmt method and re-orders
some code to closer match the current WGSL specification.
Change-Id: I388be1c22d5d10229fdfcdb2ff929c410f5ae638
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22305
Reviewed-by: David Neto <dneto@google.com>
The intrinsic methods were removed from the WGSL grammar and are treated
as builtin functions. This Cl updates Tint to match.
Bug: tint:41
Change-Id: I3f9ff6c17f1ca57ad159d883fd5a966657caeb4f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22301
Reviewed-by: David Neto <dneto@google.com>
This CL removes the builtin_decoration from the parser in favour of
using IDENT tokens for builtins. We still convert to an enum in the
parser and validate the value provided.
Bug: tint:41
Change-Id: If5dc3844e3325c75951e7b320c123cf66cb8e106
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/22300
Reviewed-by: David Neto <dneto@google.com>
A previous CL sorted bindings by binding number, but bindings were first
sorted by type. This means a bind group layout with mixed dynamic
storage and uniform buffers would not always have all dynamic bindings
in increasing order. Instead, it would be strictly increasing within
each section of uniform/storage buffers. This CL corrects the issue
by first sorting dynamic buffers by binding number.
Bug: dawn:408
Change-Id: I3689eb64ad8aa8768cebe266eebcba75a21894ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This will help remove noise in debug layer output. This patch also
promotes warnings and higher to Dawn errors.
BUG: dawn:363, dawn:418, dawn:419, dawn:421
Change-Id: I3112c94aff71fc7e76dff48c82bafe9e051ed3b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21702
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
When device initialization failed, DeviceBase::mCurrentErrorScope is
nullptr so we need to guard the call to UnlinkForShutdown.
Bug: chromium:1081998
Change-Id: I65a1948117fa9461f7fc8d2d1d70aef669bc375d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21685
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the basic supports of read-only and write-only storage
textures on OpenGL backend. Currently on OpenGL backend we only support
using either a layer of a texture or the entire texture as either read-
only or write-only storage texture.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I235b98d8d961a17739ea35eec9726dcc80889c4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
On Intel the lazy-clearing optimization that bundled multiple
subresources at once to lazy-clear failed when multiple different
mip-levels were bundled together. The rendering was "clipped" to the
size of the smalled miplevel, resulting in some mip levels not being
fully cleared.
Bug:
Change-Id: Icfafbeae25bd426119a0b499237052c87eafe93e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22341
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Roll third_party/spirv-cross/ 61cddd630..d385bf096 (4 commits)
61cddd6307..d385bf096f
$ git log 61cddd630..d385bf096 --date=short --no-merges --format='%ad %ae %s'
2020-05-28 bryan.bernhart Prefer set/binding API
2020-05-28 post Document all CLI options.
2020-05-28 post Do not mask writes to remapped variables in all cases.
2020-05-27 bryan.bernhart HLSL: Add option to treat certain SSBO bindings as UAV, even with readonly.
Created with:
roll-dep third_party/spirv-cross
Change-Id: Ibc41180952fed94d3b1089801bd31d087d2e7f41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22307
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
In the Vulkan backend, we only need to set VK_LAYER_PATH and
VK_ICD_FILENAMES while we're gathering the device information. After
this, we should unset the environment variables or they will persist
and affect loading Vulkan again (from Dawn or another client) in the
future.
Bug: dawn:406
Change-Id: I30c38b0980e181126fcd7fa911bbf9e8aa35f3b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22021
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>