mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-20 10:25:28 +00:00
Fix deprecated API usages in samples
Bug: None Change-Id: I13a05e6edf5dbd9419d6f2fa813ca0651c5ff6a1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84764 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
f57867264a
commit
9c0faa8500
@@ -142,7 +142,7 @@ void DoRender(WindowData* data) {
|
||||
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&desc);
|
||||
pass.SetPipeline(trianglePipeline);
|
||||
pass.Draw(3);
|
||||
pass.EndPass();
|
||||
pass.End();
|
||||
} else {
|
||||
data->clearCycle -= 1.0 / 60.f;
|
||||
if (data->clearCycle < 0.0) {
|
||||
@@ -151,11 +151,11 @@ void DoRender(WindowData* data) {
|
||||
|
||||
utils::ComboRenderPassDescriptor desc({view});
|
||||
desc.cColorAttachments[0].loadOp = wgpu::LoadOp::Clear;
|
||||
desc.cColorAttachments[0].clearColor = {data->clearCycle, 1.0f - data->clearCycle, 0.0f,
|
||||
desc.cColorAttachments[0].clearValue = {data->clearCycle, 1.0f - data->clearCycle, 0.0f,
|
||||
1.0f};
|
||||
|
||||
wgpu::RenderPassEncoder pass = encoder.BeginRenderPass(&desc);
|
||||
pass.EndPass();
|
||||
pass.End();
|
||||
}
|
||||
|
||||
wgpu::CommandBuffer commands = encoder.Finish();
|
||||
|
||||
Reference in New Issue
Block a user