mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 05:27:49 +00:00
Add setIndexBufferWithFormat method
First step of a multi-part change to bring the setIndexBuffer method up-to-date with the current WebGPU spec. This change preserves the previous setIndexBuffer semantics for backwards compatibility until developers have been notified and given a grace period to transition to the new signature. BUG=dawn:502 Change-Id: Ia8c665639494d244f52296ceadaedb320fa6c985 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27182 Commit-Queue: Brandon Jones <bajones@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
320c6c87b2
commit
8575cb3ec7
@@ -164,7 +164,7 @@ void frame() {
|
||||
pass.SetPipeline(pipeline);
|
||||
pass.SetBindGroup(0, bindGroup);
|
||||
pass.SetVertexBuffer(0, vertexBuffer);
|
||||
pass.SetIndexBuffer(indexBuffer);
|
||||
pass.SetIndexBufferWithFormat(indexBuffer, wgpu::IndexFormat::Uint32);
|
||||
pass.DrawIndexed(3);
|
||||
pass.EndPass();
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void frame() {
|
||||
pass.SetPipeline(pipeline);
|
||||
pass.SetBindGroup(0, bindGroup[0]);
|
||||
pass.SetVertexBuffer(0, vertexBuffer);
|
||||
pass.SetIndexBuffer(indexBuffer);
|
||||
pass.SetIndexBufferWithFormat(indexBuffer, wgpu::IndexFormat::Uint32);
|
||||
pass.DrawIndexed(36);
|
||||
|
||||
pass.SetStencilReference(0x1);
|
||||
|
||||
Reference in New Issue
Block a user