mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Update samples to the new RenderPipelineDescriptor
Also does some updates for the new BindGroupLayoutEntry and VertexFormats that were missed previously. Bug: chromium:1177501 Change-Id: Icb336590673158538a1586a1f8d5ace398fb381e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45282 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
8ce8271c34
commit
9895c273d6
@@ -113,15 +113,15 @@ void init() {
|
||||
})");
|
||||
|
||||
wgpu::BindGroupLayout bgl = utils::MakeBindGroupLayout(
|
||||
device, {{0, wgpu::ShaderStage::Vertex, wgpu::BindingType::UniformBuffer, true}});
|
||||
device, {{0, wgpu::ShaderStage::Vertex, wgpu::BufferBindingType::Uniform, true}});
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
utils::ComboRenderPipelineDescriptor2 descriptor;
|
||||
descriptor.layout = utils::MakeBasicPipelineLayout(device, &bgl);
|
||||
descriptor.vertexStage.module = vsModule;
|
||||
descriptor.cFragmentStage.module = fsModule;
|
||||
descriptor.cColorStates[0].format = GetPreferredSwapChainTextureFormat();
|
||||
descriptor.vertex.module = vsModule;
|
||||
descriptor.cFragment.module = fsModule;
|
||||
descriptor.cTargets[0].format = GetPreferredSwapChainTextureFormat();
|
||||
|
||||
pipeline = device.CreateRenderPipeline(&descriptor);
|
||||
pipeline = device.CreateRenderPipeline2(&descriptor);
|
||||
|
||||
shaderData.resize(kNumTriangles);
|
||||
for (auto& data : shaderData) {
|
||||
|
||||
Reference in New Issue
Block a user