New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebGPU] Implement RenderBundleEncoder which appears to be MTLIndirectCommandBuffer #7652
Conversation
EWS run on previous version of this PR (hash 5654aea) |
#import <wtf/FastMalloc.h> | ||
#import <wtf/Function.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh duh. I see it now.
5654aea
to
1d756e7
Compare
EWS run on current version of this PR (hash 1d756e7) |
β¦tCommandBuffer https://bugs.webkit.org/show_bug.cgi?id=249257 <radar://103318351> Reviewed by Dean Jackson. Creation of the MTLIndirectCommandBuffer is deferred as we need to tell Metal the maximum number of vertex and fragment buffers prior to creating the ICB, along with the number of draw commands. * Source/WebGPU/WebGPU.xcodeproj/project.pbxproj: * Source/WebGPU/WebGPU/BindGroup.h: (WebGPU::BindGroup::create): (WebGPU::BindGroup::resources const): * Source/WebGPU/WebGPU/BindGroup.mm: (WebGPU::Device::createBindGroup): (WebGPU::BindGroup::BindGroup): Renamed struct moved to its own header. * Source/WebGPU/WebGPU/BindableResource.h: Copied from Source/WebGPU/WebGPU/RenderBundle.mm. Moved from BindGroup.h * Source/WebGPU/WebGPU/RenderBundle.h: (WebGPU::RenderBundle::create): (WebGPU::RenderBundle::resources const): * Source/WebGPU/WebGPU/RenderBundle.mm: (WebGPU::RenderBundle::RenderBundle): Cache the ICB and required resources. * Source/WebGPU/WebGPU/RenderBundleEncoder.h: (WebGPU::RenderBundleEncoder::create): * Source/WebGPU/WebGPU/RenderBundleEncoder.mm: (WebGPU::Device::createRenderBundleEncoder): (WebGPU::RenderBundleEncoder::RenderBundleEncoder): (WebGPU::RenderBundleEncoder::currentRenderCommand): (WebGPU::RenderBundleEncoder::draw): (WebGPU::RenderBundleEncoder::drawIndexed): (WebGPU::RenderBundleEncoder::drawIndexedIndirect): (WebGPU::RenderBundleEncoder::drawIndirect): (WebGPU::RenderBundleEncoder::finish): (WebGPU::RenderBundleEncoder::setBindGroup): (WebGPU::RenderBundleEncoder::setIndexBuffer): (WebGPU::RenderBundleEncoder::setPipeline): (WebGPU::RenderBundleEncoder::setVertexBuffer): Implement pipeline functions. * Source/WebGPU/WebGPU/RenderPassEncoder.mm: (WebGPU::RenderPassEncoder::executeBundles): * Source/WebGPU/WebGPU/RenderPipeline.mm: (WebGPU::Device::createRenderPipeline): * Websites/webkit.org/demos/webgpu/indirect-command-buffer-textured-cube.html: Added. * Websites/webkit.org/demos/webgpu/scripts/indirect-command-buffer-textured-cube.js: Added. (async helloCube.frameUpdate): (async helloCube): Add ICB demo test. * Websites/webkit.org/demos/webgpu/scripts/hello-triangle-msaa.js: (async helloTriangle): * Websites/webkit.org/demos/webgpu/scripts/instanced-textured-cube.js: Miscellaneous test fixes observed running under the debug metal device. Canonical link: https://commits.webkit.org/258226@main
1d756e7
to
2022497
Compare
Committed 258226@main (2022497): https://commits.webkit.org/258226@main Reviewed commits have been landed. Closing PR #7652 and removing active labels. |
2022497
1d756e7
π§ͺ ios-wk2π§ͺ api-macπ§ͺ gtk-wk2π§ͺ api-iosπ§ͺ api-gtkπ§ͺ mac-AS-debug-wk2π watch