Rename SetRenderPipeline and SetComputePipeline to SetPipeline

To match the WebGPU idl, SetRenderPipeline and SetComputePipeline need to change
the name to SetPipeline.

This patch just rename these two APIs

BUG=dawn:52

Change-Id: I2545c94158ebd051027a018650bf760a25845d73
Reviewed-on: https://dawn-review.googlesource.com/c/3480
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This commit is contained in:
Yan, Shaobo
2018-12-21 10:40:26 +00:00
committed by Commit Bot service account
parent 21ed12045b
commit 300eec0f82
26 changed files with 70 additions and 72 deletions

View File

@@ -26,7 +26,7 @@ protected:
const dawn::ComputePipeline& pipeline, const dawn::BindGroup& bindGroup) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Dispatch(1, 1, 1);
pass.EndPass();
@@ -155,7 +155,7 @@ TEST_P(BindGroupTests, ReusedUBO) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -271,7 +271,7 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) {
dawn::Extent3D copySize = {width, height, 1};
builder.CopyBufferToTexture(&bufferCopyView, &textureCopyView, &copySize);
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -366,7 +366,7 @@ TEST_P(BindGroupTests, MultipleBindLayouts) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroups[0]);
pass.SetBindGroup(1, bindGroups[1]);
pass.Draw(3, 1, 0, 0);

View File

@@ -110,12 +110,12 @@ class BlendStateTest : public DawnTest {
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
// First use the base pipeline to draw a triangle with no blending
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } })));
pass.Draw(3, 1, 0, 0);
// Then use the test pipeline to draw the test triangle with blending
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { triangle.color } })));
pass.SetBlendColor(triangle.blendFactor[0], triangle.blendFactor[1], triangle.blendFactor[2], triangle.blendFactor[3]);
pass.Draw(3, 1, 0, 0);
@@ -693,7 +693,7 @@ TEST_P(BlendStateTest, ColorWriteMaskBlendingDisabled) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } })));
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -831,11 +831,11 @@ TEST_P(BlendStateTest, IndependentBlendState) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { base, base, base, base } })));
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { color0, color1, color2, color3 } })));
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -901,10 +901,10 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -921,10 +921,10 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBlendColor(1, 1, 1, 1);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.Draw(3, 1, 0, 0);
@@ -942,10 +942,10 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBlendColor(1, 1, 1, 1);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.Draw(3, 1, 0, 0);
@@ -953,10 +953,10 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
}
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline);
pass.SetPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline);
pass.SetPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.Draw(3, 1, 0, 0);
pass.EndPass();

View File

@@ -78,7 +78,7 @@ void ComputeCopyStorageBufferTests::BasicTest(const char* shader) {
{
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Dispatch(kInstances, 1, 1);
pass.EndPass();

View File

@@ -272,7 +272,7 @@ class DepthStencilStateTest : public DawnTest {
dawn::RenderPipeline pipeline = device.CreateRenderPipeline(&descriptor);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetStencilReference(test.stencil); // Set the stencil reference
pass.SetBindGroup(0, bindGroup); // Set the bind group which contains color and depth data
pass.Draw(6, 1, 0, 0);

View File

@@ -88,7 +88,7 @@ class DrawIndexedTest : public DawnTest {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(indexCount, instanceCount, firstIndex, baseVertex, firstInstance);

View File

@@ -84,7 +84,7 @@ TEST_P(IndexFormatTest, Uint32) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(3, 1, 0, 0, 0);
@@ -115,7 +115,7 @@ TEST_P(IndexFormatTest, Uint16) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(3, 1, 0, 0, 0);
@@ -159,7 +159,7 @@ TEST_P(IndexFormatTest, Uint32PrimitiveRestart) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(7, 1, 0, 0, 0);
@@ -193,7 +193,7 @@ TEST_P(IndexFormatTest, Uint16PrimitiveRestart) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(7, 1, 0, 0, 0);
@@ -232,10 +232,10 @@ TEST_P(IndexFormatTest, ChangePipelineAfterSetIndexBuffer) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline16);
pass.SetPipeline(pipeline16);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0);
pass.SetRenderPipeline(pipeline32);
pass.SetPipeline(pipeline32);
pass.DrawIndexed(3, 1, 0, 0, 0);
pass.EndPass();
}
@@ -268,7 +268,7 @@ TEST_P(IndexFormatTest, DISABLED_SetIndexBufferBeforeSetPipeline) {
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetIndexBuffer(indexBuffer, 0);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.DrawIndexed(3, 1, 0, 0, 0);
pass.EndPass();

View File

@@ -172,7 +172,7 @@ class InputStateTest : public DawnTest {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
uint32_t zeroOffset = 0;
for (const auto& buffer : vertexBuffers) {

View File

@@ -201,7 +201,7 @@ class PrimitiveTopologyTest : public DawnTest {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.Draw(6, 1, 0, 0);
pass.EndPass();

View File

@@ -218,7 +218,7 @@ TEST_P(PushConstantTest, ComputePassDefaultsToZero) {
dawn::ComputePassEncoder pass = builder.BeginComputePass();
// Test compute push constants are set to zero by default.
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, binding.bindGroup);
pass.Dispatch(1, 1, 1);
// Set push constants to non-zero value to check they will be reset to zero
@@ -230,7 +230,7 @@ TEST_P(PushConstantTest, ComputePassDefaultsToZero) {
{
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, binding.bindGroup);
pass.Dispatch(1, 1, 1);
@@ -256,7 +256,7 @@ TEST_P(PushConstantTest, RenderPassDefaultsToZero) {
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
// Test render push constants are set to zero by default.
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(1, 1, 0, 0);
pass.EndPass();
}
@@ -287,7 +287,7 @@ TEST_P(PushConstantTest, VariousConstantTypes) {
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetPushConstants(dawn::ShaderStageBit::Compute, 0, 3, reinterpret_cast<uint32_t*>(&values));
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, binding.bindGroup);
pass.Dispatch(1, 1, 1);
@@ -318,12 +318,12 @@ TEST_P(PushConstantTest, InheritThroughPipelineLayoutChange) {
// Set Push constant before there is a pipeline set
pass.SetPushConstants(dawn::ShaderStageBit::Compute, 0, 1, &one);
pass.SetComputePipeline(pipeline1);
pass.SetPipeline(pipeline1);
pass.SetBindGroup(0, binding1.bindGroup);
pass.Dispatch(1, 1, 1);
// Change the push constant before changing pipeline layout
pass.SetPushConstants(dawn::ShaderStageBit::Compute, 0, 1, &two);
pass.SetComputePipeline(pipeline2);
pass.SetPipeline(pipeline2);
pass.SetBindGroup(0, binding2.bindGroup);
pass.Dispatch(1, 1, 1);
@@ -354,7 +354,7 @@ TEST_P(PushConstantTest, SetAllConstantsToNonZero) {
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetPushConstants(dawn::ShaderStageBit::Compute, 0, kMaxPushConstants, &values[0]);
pass.SetComputePipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, binding.bindGroup);
pass.Dispatch(1, 1, 1);
@@ -384,7 +384,7 @@ TEST_P(PushConstantTest, SeparateVertexAndFragmentConstants) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetPushConstants(dawn::ShaderStageBit::Vertex, 0, 1, &one);
pass.SetPushConstants(dawn::ShaderStageBit::Fragment, 0, 1, &two);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(1, 1, 0, 0);
pass.EndPass();
}
@@ -409,7 +409,7 @@ TEST_P(PushConstantTest, SimultaneousVertexAndFragmentConstants) {
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetPushConstants(dawn::ShaderStageBit::Vertex | dawn::ShaderStageBit::Fragment, 0, 1, &two);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(1, 1, 0, 0);
pass.EndPass();
}

View File

@@ -41,7 +41,7 @@ class DrawQuad {
auto renderPipeline = device.CreateRenderPipeline(&descriptor);
pass->SetRenderPipeline(renderPipeline);
pass->SetPipeline(renderPipeline);
pass->Draw(6, 1, 0, 0);
}

View File

@@ -137,7 +137,7 @@ protected:
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(mRenderPass.renderPassInfo);
pass.SetRenderPipeline(mPipeline);
pass.SetPipeline(mPipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(6, 1, 0, 0);
pass.EndPass();

View File

@@ -55,7 +55,7 @@ TEST_P(ScissorTest, DefaultsToWholeRenderTarget) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
}
@@ -77,7 +77,7 @@ TEST_P(ScissorTest, LargerThanAttachment) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetScissorRect(0, 0, 200, 200);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
@@ -103,7 +103,7 @@ TEST_P(ScissorTest, EmptyRect) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetScissorRect(0, 0, 0, 0);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
@@ -131,7 +131,7 @@ TEST_P(ScissorTest, PartialRect) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetScissorRect(kX, kY, kW, kH);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
@@ -163,7 +163,7 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) {
// RenderPass 2 draw a full quad, it shouldn't be scissored
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
}

View File

@@ -177,7 +177,7 @@ protected:
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(mRenderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
@@ -522,7 +522,7 @@ class TextureViewRenderingTest : public DawnTest {
{
dawn::RenderPassEncoder pass =
commandBufferBuilder.BeginRenderPass(renderPassInfo);
pass.SetRenderPipeline(oneColorPipeline);
pass.SetPipeline(oneColorPipeline);
pass.Draw(6, 1, 0, 0);
pass.EndPass();
}

View File

@@ -48,7 +48,7 @@ TEST_P(ViewportOrientationTests, OriginAt0x0) {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.Draw(1, 1, 0, 0);
pass.EndPass();
}

View File

@@ -109,7 +109,7 @@ TEST_F(VertexBufferValidationTest, VertexInputsInheritedBetweenPipelines) {
dawn::CommandBufferBuilder builder = AssertWillBeError(device.CreateCommandBufferBuilder());
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1);
pass.SetPipeline(pipeline1);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
}
@@ -119,10 +119,10 @@ TEST_F(VertexBufferValidationTest, VertexInputsInheritedBetweenPipelines) {
builder = AssertWillBeSuccess(device.CreateCommandBufferBuilder());
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2);
pass.SetPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(pipeline1);
pass.SetPipeline(pipeline1);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
}
@@ -146,14 +146,14 @@ TEST_F(VertexBufferValidationTest, VertexInputsNotInheritedBetweenRendePasses) {
dawn::CommandBufferBuilder builder = AssertWillBeSuccess(device.CreateCommandBufferBuilder());
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2);
pass.SetPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
}
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1);
pass.SetPipeline(pipeline1);
pass.SetVertexBuffers(0, 1, vertexBuffers.data(), offsets);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
@@ -164,14 +164,14 @@ TEST_F(VertexBufferValidationTest, VertexInputsNotInheritedBetweenRendePasses) {
builder = AssertWillBeError(device.CreateCommandBufferBuilder());
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2);
pass.SetPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
}
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1);
pass.SetPipeline(pipeline1);
pass.Draw(3, 1, 0, 0);
pass.EndPass();
}