Commit Graph

10 Commits

Author SHA1 Message Date
shrekshao 4313dba514 Pipeline cache D3D12 backend impl
Add D3D12 pipeline caching impl: store cachedPSO blob in cached blob.
Record root signature ID3DBlob in cache key together with
D3D_SHADER_BYTECODE, D3D12_GRAPHICS_PIPELINE_STATE_DESC or
D3D12_COMPUTE_PIPELINE_STATE_DESC.

Shader caching is not added.

Add some pipeline caching negative tests.

Bug: dawn:549
Change-Id: Id1cb560b49f1cf495860e2e0bcf92d8d988c5379
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91180
Auto-Submit: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-06-02 15:16:20 +00:00
Takahiro d42a809e8c Record zero-attribute vertex buffer when creating render pipeline
Currently Dawn ignores all zero-attribute vertex buffer in the given
pipeline descriptor when creating RenderPipelineBase because
zero-attribute vertex buffer is treated as unused slot, however the spec
doesn't state that zero-attribute vertex buffer should be ignored.

To support zero-attribute vertex buffer, this commit has the following
changes.

1. Add VertexBufferNotUsed enum value to wgpu::VertexStepMode to
   represent unused slots
2. Ignore VertexBufferNotUsed  step mode buffers when creating
   RenderPipelineBase and add tests to check it
3. Record zero-attribute vertex buffers when creating RenderPipelineBase
   and add tests to check it
4. Fix VertexStateTest::LastAllowedVertexBuffer broken by the above
   changes

Temporarily we set the enum value of
wgpu::VertexStepMode::VertexBufferNotUsed to 0 to pass the CTS tests
because currently empty vertex buffer slots step mode can be
zero-initialized. We will make a CL to Blink to explicitly set
wgpu::VertexStepMode::VertexBufferNotUsed for empty slots and change
the enum value to 2.

Bug: dawn:1000
Change-Id: Ibd4ab87f2c922e8e460f2311547f13d58f1d5611
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89340
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
2022-05-26 01:26: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
Enrico Galli b52d740227 D3D12: Indirect validation shader name cleanup and parameter merge
Bug: dawn:548
Change-Id: Id2bf9c54e10ba791e5878844a0fe98efd4fc85d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87705
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-04-25 23:28:24 +00:00
Enrico Galli 45ec7c3528 D3D12: Duplicate first/baseVertex on Draw[Indexed]Indirect
Adds support for non-zero first/baseVertex on Draw[Indexed]Indirect by
duplicating the first/baseVertex indirect parameter onto a root
constant in the indirect buffer.

Change-Id: I280149065179806d3e57b07f1a396f9e2e4e8fcb
Bug: dawn:548
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84240
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Auto-Submit: Enrico Galli <enrico.galli@intel.com>
2022-04-21 02:25:35 +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
Corentin Wallez 0bf63577d2 Implement the stencil8 format.
Rolled in changes made by cwallez@ as part of
https://dawn-review.googlesource.com/c/dawn/+/75983, which was
originally based on this change.

Bug: dawn:666

Change-Id: I5d6ad592294ee8302f3b18f7f31bbfd982297251
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68280
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2022-03-24 17:54:56 +00:00
Shrek Shao 6d205fcb5d Allow sparse color attachments
Add implementations and related tests reflecting the spec update.

Bug: dawn:1294
Change-Id: I2c20af313259e1d6d6049189cb8adebe4c2436af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/81922
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2022-03-05 01:34:02 +00:00
Ben Clayton 818001d32e tint->dawn: Move src/dawn_native -> src/dawn/native
Bug: dawn:1275
Change-Id: Ic60a00107a015bc677ff929c492f1085ffc38482
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-02-04 17:07:46 +00:00