Commit Graph

18 Commits

Author SHA1 Message Date
Austin Eng 86a617f110 Add InsertBraces: true to .clang-format
Bug: none
Change-Id: I4b4f2a4abfea7adcea406f458bc4e4a13b0e8c43
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-05-19 20:08:19 +00:00
Austin Eng ba2b7fc9b1 Fix multiple device leaks in dawn_end2end_tests and dawn_unittests
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>
2022-05-18 13:28:21 +00:00
Stephen White cc8cc9c67b Implement a --use-angle= argument in DawnTest.
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>
2022-05-16 15:36:21 +00:00
Corentin Wallez a439e7b89c DawnTest: Make error/device loss mocks StrictMocks
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>
2022-05-10 17:06:34 +00:00
dan sinclair 41e4d9a34c Consistent formatting for Dawn/Tint.
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>
2022-05-01 14:40:55 +00:00
Brandon Jones 3daebe896f Deprecate dispatch* in favor of dispatchWorkgroups*
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>
2022-04-29 17:51:54 +00:00
Loko Kung 04912aa836 Add multiple device testing capability in DawnTest.
- 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>
2022-04-28 21:55:33 +00:00
Corentin Wallez f49fbbfb88 DawnTest: handle buffer readbacks not aligned to 4.
Bug: None
Change-Id: I69e8b9a9c0eae5d0287351cacbe21e550741cacc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87861
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-04-26 17:02:42 +00:00
Loko Kung 4091e0fa9c Factor out common cache testing code.
- 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>
2022-04-21 03:14:37 +00:00
Austin Eng 775fee6b6a Check GLFW window creation before discovering GL adapters
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>
2022-04-20 20:56:15 +00:00
dan sinclair 13e9699b1c Fix build/include_what_you_use
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>
2022-04-20 00:58:34 +00:00
dan sinclair b02535557e Fixup build/include_order issues in src/dawn.
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>
2022-04-19 20:38:44 +00:00
dan sinclair 3878a30828 Fix runtime/printf lint
This Cl changes a hardcoded 4 to sizeof(buf) and re-enables the
runtime/printf lint.

Bug: dawn:1339
Change-Id: Iaeeab2bc0d500c1aa8085352e7b26febb810bd4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86863
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>
2022-04-19 08:42:58 +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
Brandon Jones 29b72c87e9 Updated the syntax for WGSL structs in all tests.
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>
2022-04-05 18:41:23 +00:00
Jiawei Shao eab5300e87 Set depthWriteEnabled to default in ExpectAttachmentDepthStencilTestData
This patch sets depthWriteEnabled to its default value (false) in the
helper function DawnTest::ExpectAttachmentDepthStencilTestData() as all
the tests can pass with depthWriteEnabled == false on the Linux Intel
bots now.

Note that previously using depthWriteEnabled == false and writing into
FragDepth will cause Linux Intel Mesa driver crash on Mesa 19.0.2.

BUG=dawn:821
TEST=dawn_end2end_tests
Change-Id: I22cc0dcdb8521fd8eae436d99a7c06167af89b09

Change-Id: Id0dd1c31099c6aafad175bde038ba9662b02a160
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85322
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2022-03-31 23:37:05 +00:00
Austin Eng 74d4e53fc6 Make loapOp/storeOp undefined valid
It is valid for depth/stencil attachment if the attachments are
readonly. It is not valid for color attachments. Make the enum valid,
and update validation.

Caught in CTS roll
https://chromium-review.googlesource.com/c/chromium/src/+/3499286

Bug: dawn:1269
Change-Id: Ib849ed757ccca145f85cadea6f92a1f2a5082d49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/82540
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-03-09 18:43:51 +00:00
Austin Eng 189b0cec37 tint->dawn: Move src/dawn_tests -> src/dawn/tests
Bug: dawn:1275
Change-Id: I79f2aeb0c54a74dd5becd90c46792705a28e87da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-02-09 14:54:31 +00:00