New issue
Advanced search Search tips
Starred by 3 users

Issue metadata

Status: Accepted
Owner:
Components:
OS: ----
Pri: 1
Type: Task

Blocked on:
issue 32

Blocking:
issue 14
issue 22



Sign in to add a comment
link

Issue 4: Make RenderPipeline creation use a fat descriptor instead of a builder with sub-objects

Reported by cwallez@chromium.org, Sep 11 Project Member

Issue description

WebGPU uses descriptors instead of builders so Dawn should do the same.

In addition in WebGPU the RenderPipeline state is a fat descriptor vs. currently in Dawn where we have subobjects that are already built. We should change Dawn to have a fat descriptor object like in WebGPU.
 

Comment 1 by shaobo....@intel.com, Sep 17

I'll take this one if nobody is working on this.

Comment 2 by shaobo....@intel.com, Sep 17

Owner: shaobo....@intel.com

Comment 3 by kainino@chromium.org, Sep 18

Project Member
Chatted with Shaobo about this. Here are the relevant meeting minutes (from the April F2F) supporting this change.

Shaobo will also make a PR against sketch.webidl to make the needed updates there.

- Partial pipeline state.
  - Pipeline layout has to be separate from pipeline descriptors,.
  - Proceed with one big render pipeline descriptor, change if gets too big.

- CW: so on the API side, do you want many different objects or a fat pipeline state?
- MM: think it should be fat. It’ll all get compiled later, so keeping track of them separately won’t buy you much.
- CW: so everything is in the pipeline state except:
  - Pipeline layout. We use that in NXT to precompute stuff for D3D and Metal (and to pre-create stuff for Vulkan too)
  - Render passes.
- KN: think that should work.

Comment 4 by shaobo....@intel.com, Sep 18

Thx for the guidance, I'll make a PR in dawn first to see whether it works and then update the sketch.idl.

Comment 5 by cwallez@chromium.org, Sep 25

Project Member
Blocking: 22

Comment 6 by shaobo....@intel.com, Sep 26

Blocking: 14

Comment 7 by yunchao...@intel.com, Oct 26

Blockedon: 32

Comment 8 by cwallez@chromium.org, Nov 27

Project Member
Labels: Pri-1

Comment 9 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/7b3ea34b6b132efe7d93f0025dc7cbbe50641b9c

commit 7b3ea34b6b132efe7d93f0025dc7cbbe50641b9c
Author: Corentin Wallez <cwallez@chromium.org>
Date: Wed Dec 05 10:13:52 2018

WireCmd: Update buffer pointer when serializing sub elements

Without this the serialize step failed to increment the pointer to
the buffer to account for the recording of "main" in the render
pipeline descriptor:

  descriptor->vertexStage->entryPoint = "main";

BUG=dawn:4

Change-Id: Ic3829787af2213577ac67ee93625679afdae1cc9
Reviewed-on: https://dawn-review.googlesource.com/c/2880
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/7b3ea34b6b132efe7d93f0025dc7cbbe50641b9c/generator/templates/dawn_wire/WireCmd.cpp

Comment 10 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/e2f948469c66a28ff4090dba313e473288fa3de4

commit e2f948469c66a28ff4090dba313e473288fa3de4
Author: Corentin Wallez <cwallez@chromium.org>
Date: Wed Dec 05 17:49:04 2018

generator: Unify handling of argument and member parsing

This completes the handling of "length" for structure members which were
missing const* structures defaulting to being of length one.

Also renames "record" to json_data to more precisely describe what it
is.

BUG=dawn:4

Change-Id: Ia53e4fcec15ebc9f9dae58ddba5b460d1f2eeebd
Reviewed-on: https://dawn-review.googlesource.com/c/2881
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/e2f948469c66a28ff4090dba313e473288fa3de4/generator/main.py

Comment 11 by bugdroid1@chromium.org, Dec 10

Project Member
The following revision refers to this bug:
  https://dawn.googlesource.com/dawn/+/a49242766a107c411d744d828a733317ef92dc83

commit a49242766a107c411d744d828a733317ef92dc83
Author: Yan, Shaobo <shaobo.yan@intel.com>
Date: Mon Dec 10 19:47:22 2018

Render Pipeline Descriptorization -- Part I

This patch remove render pipeline builder and use descriptor to create render pipeline.
Sub-objects in descriptor will be removed in future.

Bug: dawn:4
Change-Id: I58dd569c7be42c2648311847b939c681189c2854
Reviewed-on: https://dawn-review.googlesource.com/c/2180
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>

[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/DrawElementsTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/ViewportOrientationTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/vulkan/DeviceVk.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/DepthStencilStateTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/null/NullBackend.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/vulkan/DeviceVk.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/CppHelloTriangle.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/null/NullBackend.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/d3d12/RenderPipelineD3D12.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/PushConstantTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/unittests/validation/InputStateValidationTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/opengl/DeviceGL.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/RenderPipeline.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/TextureViewTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/opengl/RenderPipelineGL.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/RenderPipeline.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/Device.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/opengl/RenderPipelineGL.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/BlendStateTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/vulkan/RenderPipelineVk.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/unittests/WireTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/Device.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/unittests/validation/VertexBufferValidationTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/metal/DeviceMTL.mm
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/d3d12/DeviceD3D12.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/Texture.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/RenderPassLoadOpTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/Texture.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/BUILD.gn
[add] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/utils/ComboRenderPipelineDescriptor.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/d3d12/RenderPipelineD3D12.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/CubeReflection.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/InputStateTests.cpp
[add] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/utils/ComboRenderPipelineDescriptor.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/ComputeBoids.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/metal/RenderPipelineMTL.mm
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/ScissorTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/glTFViewer/glTFViewer.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/PrimitiveTopologyTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/BindGroupTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/Animometer.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/d3d12/DeviceD3D12.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/SamplerTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/opengl/DeviceGL.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/unittests/validation/RenderPipelineValidationTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/metal/RenderPipelineMTL.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/dawn.json
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/tests/end2end/IndexFormatTests.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/vulkan/RenderPipelineVk.h
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/examples/CHelloTriangle.cpp
[modify] https://crrev.com/a49242766a107c411d744d828a733317ef92dc83/src/dawn_native/metal/DeviceMTL.h

Sign in to add a comment