Commit Graph

6258 Commits

Author SHA1 Message Date
Austin Eng 3199179167 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>
2022-04-15 22:19:51 +00:00
dan sinclair 61bc38fd52 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>
2022-04-15 08:01:01 +00:00
James Price 0384932f1a tint: Replace smoothStep with smoothstep in tests
There were some tests that were still using the deprecated name, as
was the SPIR-V reader.

Bug: tint:1483
Change-Id: Ie919596712e05340110fbd872470a1b4c9a625c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86745
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
2022-04-14 19:49:10 +00:00
dan sinclair df5b5daecf Convert test dep to use dawn_angle_dir
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>
2022-04-14 18:36:40 +00:00
Yunchao He 3dc4a34385 Add data verification for e2e tests in RequiredBufferSizeInCopyTests.cpp
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>
2022-04-14 14:44:40 +00:00
Shaobo 3ed8b4e31d Skip Unneccessary GetPendingCommandContext() Call To Save An Extra Fence
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>
2022-04-14 01:42:20 +00:00
Loko Kung 573abae522 Reland "Add render pipeline cache key generation for Vulkan."
- 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>
2022-04-14 00:09:36 +00:00
Ryan Harrison 6e7e92c4c8 Fix path for stamp file in fuzzer corpuse generation
BUG=chromium:1314527

Change-Id: I05adbe671c4f30fe3e59829cd370a59347c8ed51
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86760
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2022-04-13 19:34:06 +00:00
Loko Kung 83a5d52ed1 Changes dependency on vulkan-tools typemap header.
- 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>
2022-04-13 19:14:46 +00:00
Austin Eng 7fdef49333 Revert "Add render pipeline cache key generation for Vulkan."
This reverts commit ca11c03824.

Reason for revert: crbug.com/dawn/1368

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>

TBR=cwallez@chromium.org,enga@chromium.org,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com,lokokung@google.com

Change-Id: Ifa8d8de8bdbc3bda19030254c56c9fa904481a04
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:549
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86742
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-04-13 17:36:26 +00:00
dan sinclair 2a3d994cc2 Fixup CQ and Kokoro lint mismatches.
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>
2022-04-13 16:14:26 +00:00
Corentin Wallez 147da21856 Change Dawn samples to use surface-based swapchains.
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>
2022-04-13 15:33:06 +00:00
dan sinclair 2517d99f35 Fixup kokoro lint issue
This CL fixes the build/c++11 found by the kokoro bots.

Change-Id: Ic6ebc4ddf0f7bd25b20e4059d9f6c1c024fd71aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86625
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>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-04-13 14:17:06 +00:00
Brandon Jones 76ce8c3007 Refactored how debug labels are set with Vulkan
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>
2022-04-13 14:00:16 +00:00
dan sinclair 031e529714 Remove redundant virtual.
This CL removes a redundant virtual and enables the
readability/inheritance lint in src/dawn

Bug: dawn:1339
Change-Id: I3dcc84894b8d308461219a5ea206ca31300de297
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86504
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-04-13 08:53:36 +00:00
Loko Kung ca11c03824 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>
2022-04-13 02:48:41 +00:00
Loko Kung c083d65a0c Adds device-side cache key generation.
- 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>
2022-04-12 23:50:56 +00:00
dan sinclair 4d5723b5e5 Remove fuzzer CPPLINT file.
The tint regex fuzzer is disabling the c++11 lints, but nothing fails
when the file is removed.

Change-Id: I2d9f780694fb6bd340bd0cbbf4addf15858d28ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86440
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-12 17:46:51 +00:00
dan sinclair d53cb2ae67 Fixup explicit on some constructors.
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>
2022-04-12 17:44:41 +00:00
dan sinclair 012098a86b Add explicit in include/dawn
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>
2022-04-12 17:43:21 +00:00
Corentin Wallez b2fdd6402d Rework dawn/native/ProcTable.cpp's template to better handle functions.
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>
2022-04-12 16:46:01 +00:00
Fumitoshi Ukai a5f5f5a1aa use stamp file for tint_generate_wgsl_corpus
using directory for actions output causes issue like
crbug.com/1315457

 ninja explain: output obj/third_party/dawn/src/tint/fuzzers/tint_generate_wgsl_corpus.stamp older than most recent input gen/third_party/dawn/src/tint/fuzzers/fuzzer_corpus_wgsl (1649712735 vs
1649712999)

Use stamp file instead of directory.

Bug: chromium:1315457, chromium:1314527
Change-Id: Ifdf0493e23dbab000513e8f2c0ae4aa8cd76444f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86482
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-12 16:18:01 +00:00
Ben Clayton c85f8d828e tint: Fix doxygen failure
Bug: tint:1495
Change-Id: I4e9d0d58e0f49c80ea7709d5baecf0eca80e297a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86529
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-12 12:42:00 +00:00
Corentin Wallez 48585f3c15 dawn.node: Make run-cts --print-stdout print the run's stdout/err
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>
2022-04-12 12:17:23 +00:00
dan sinclair c9a1f6a595 Fix copyright issues in src/include forwarding headers.
This CL adds the missing copyrights in the forwarding headers.

Bug: tint:1339
Change-Id: I9806d7ef8124a8e0e9a1fbc3452e1946f75d3fb7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86363
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-04-12 06:59:11 +00:00
dan sinclair eff8e00d97 Fix missing copyrights in src/dawn.
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>
2022-04-12 06:58:24 +00:00
Yuly Novikov 736b33f059 Revert "Ignore VUID-vkCmdDraw-None-06538 VVL message"
This reverts commit 1e988b417c.

Reason for revert: Vulkan validation layers fixed in
https://github.com/KhronosGroup/Vulkan-ValidationLayers/pull/3938

Original change's description:
> Ignore VUID-vkCmdDraw-None-06538 VVL message
>
> To get vulkan-deps roll going
>
> Bug: chromium:1310052
> Change-Id: Ia47aa9a486256a9b3c96b90a66cd39bd2ec7c155
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84724
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

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

Bug: chromium:1310052
Change-Id: Icf676fca331ee8cde1b192d474745a3aac20c330
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86460
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-04-12 05:33:20 +00:00
Stephen White cedd55a9bf GLES: revert part of the view format reinterpretation on GLES.
View format reinterpretation doesn't work, but its implementation was causing failures on other content.

This patch came from: https://dawn-review.googlesource.com/c/dawn/+/84704/comments/339d5a75_5dce5ce3

Bug: dawn:1360
Change-Id: I76adc264d6f185f840d975b46b6e92a0e5a7b4a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86362
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-04-12 03:31:16 +00:00
Brandon Jones 8085367233 Enable Queue, Device labels to be set. (Take 2)
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>
2022-04-12 03:28:40 +00:00
Ben Clayton 7170b727c9 dawn/node: Fix GCC warning
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>
2022-04-11 21:50:40 +00:00
Antonio Maiorano f625a6d57e tint: Make GLSL backend consistent with the others
Remove transform::Glsl and replace with a Sanitize function. Cleans up
the code, reduces allocations and copies, and makes it consistent with
the other backends.

Also add a copy of src/tint/.clang-format to include/tint/ to keep files
in there formatted as per the tint standard.

Bug: tint:1495
Change-Id: I8a44ffecc6b3d244517bceb374ed93063e96f218
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86205
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro-Run: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-11 21:13:10 +00:00
Antonio Maiorano b5c46c30ec tint: spirv writer: add a GeneralImpl to be consistent with HLSL and MSL backends
Also opportunistically optimize out the copying of the spir-v result
vector by moving it instead.

Bug: tint:1495
Change-Id: Ia2c3b3c09e7a23822eb8a782ce57b1fa11a0b54d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86204
Reviewed-by: David Neto <dneto@google.com>
Kokoro-Run: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-11 21:10:20 +00:00
Ben Clayton 3f4b260264 dawn/node: Define NAPI_DISABLE_CPP_EXCEPTIONS
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>
2022-04-11 20:10:10 +00:00
Ben Clayton 262a4c4824 tint: More doxygen fixes
Change-Id: I46d73d760e3f78fb374cffe003668f29f4bcbe1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86380
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-11 19:54:48 +00:00
dan sinclair 479dc6b7eb Enable build/header_guard
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>
2022-04-11 18:30:50 +00:00
Ben Clayton 05caf3a20f tint: Fix doxygen errors
Change-Id: I19324ccbf989a66c088f8886411f050820b46d5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86306
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-11 17:47:10 +00:00
Corentin Wallez be352ea5b9 CMake: Add support with Swiftshader with DAWN_ENABLE_SWIFTSHADER
Change-Id: I2b3d906bac760a22f33104231a6341415cbff3b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85365
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-04-11 16:48:43 +00:00
Corentin Wallez 6efd54e2ae Move samples/ under src/dawn/samples/
Bug: dawn:1339
Change-Id: I897df9889da62e4505ea98a780bd481e7855ec73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86307
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
2022-04-11 16:40:00 +00:00
Antonio Maiorano 7eaab38574 tint: Simplify backend Sanitize functions by passing in Options
Reduces the amount of variable duplication and copying we do.

Bug: tint:1495
Change-Id: I7999eadf09dc899361926e01dea715e9edc124c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86203
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-11 16:33:30 +00:00
dan sinclair 396b75cd29 Fixup include directory errors in src/dawn.
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>
2022-04-11 16:29:30 +00:00
dan sinclair 566d7f25b8 Enable empty_if_body lint.
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>
2022-04-11 15:50:50 +00:00
Antonio Maiorano e0bee791cb Add ifdefs for Tint API usage that may not be available
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>
2022-04-11 15:21:41 +00:00
Ben Clayton a7230f06ff tint: Standardize the way we forward-declare
Style guide has been updated to describe the style in use.

Change-Id: I3fc08e3440566106582695f4dc149fa67d8b8dc8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86303
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-04-11 14:37:21 +00:00
dan sinclair fd64b10b0d Fixup readability/braces lint warning.
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>
2022-04-11 14:25:11 +00:00
dan sinclair 69347de37b Enable runtime/printf
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>
2022-04-11 14:10:40 +00:00
dan sinclair 13d88a6438 Fixup build/include issues in src/dawn
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>
2022-04-11 14:01:50 +00:00
dan sinclair fcf56791c1 Create more targeted CPPLINT.cfg files.
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>
2022-04-11 13:05:40 +00:00
Stephen White ca4a8cf02a OpenGLES: simulate glTextureView() with texture-to-texture copies.
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>
2022-04-09 18:27:50 +00:00
Loko Kung 23d09c6114 Add compute pipeline cache key generation for Vulkan.
- 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>
2022-04-09 00:10:08 +00:00
Antonio Maiorano 30353998c1 tint: Fix copy instead of move of ArrayLengthFromUniform::used_size_indices
In our backends, we std::move this unordered_set into the Results
struct, but because we'd get a const reference to a const object,
std::move would cast this to a const r-value, which binds to const ref,
and thus would end up copying instead of moving. This change just
ensures that we get a non-const ref to a non-const unordered_set where
we do the move.

Bug: tint:1495
Change-Id: I8d1cfe66b8343bae4146fc85fc86d72bac41a1a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86202
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2022-04-08 21:23:58 +00:00