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

@ -364,8 +364,7 @@
"category": "object",
"methods": [
{
"name": "set compute pipeline",
"TODO": "This is called setPipeline in the WebGPU IDL",
"name": "set pipeline",
"args": [
{"name": "pipeline", "type": "compute pipeline"}
]
@ -814,8 +813,7 @@
"category": "object",
"methods": [
{
"name": "set render pipeline",
"TODO": "This is called setPipeline in the WebGPU IDL",
"name": "set pipeline",
"args": [
{"name": "pipeline", "type": "render pipeline"}
]

View File

@ -144,7 +144,7 @@ void frame() {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
for (int k = 0; k < 10000; k++) {
shaderData[i].time = f / 60.0f;

View File

@ -142,7 +142,7 @@ void frame() {
dawnCommandBufferBuilder builder = dawnDeviceCreateCommandBufferBuilder(device);
dawnRenderPassEncoder pass = dawnCommandBufferBuilderBeginRenderPass(builder, renderpassInfo);
dawnRenderPassEncoderSetRenderPipeline(pass, pipeline);
dawnRenderPassEncoderSetPipeline(pass, pipeline);
dawnRenderPassEncoderDraw(pass, 3, 1, 0, 0);
dawnRenderPassEncoderEndPass(pass);
dawnRenderPassEncoderRelease(pass);

View File

@ -257,7 +257,7 @@ dawn::CommandBuffer createCommandBuffer(const dawn::RenderPassDescriptor& render
{
dawn::ComputePassEncoder pass = builder.BeginComputePass();
pass.SetComputePipeline(updatePipeline);
pass.SetPipeline(updatePipeline);
pass.SetBindGroup(0, updateBGs[i]);
pass.Dispatch(kNumParticles, 1, 1);
pass.EndPass();
@ -265,7 +265,7 @@ dawn::CommandBuffer createCommandBuffer(const dawn::RenderPassDescriptor& render
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass);
pass.SetRenderPipeline(renderPipeline);
pass.SetPipeline(renderPipeline);
pass.SetVertexBuffers(0, 1, &bufferDst, zeroOffsets);
pass.SetVertexBuffers(1, 1, &modelBuffer, zeroOffsets);
pass.Draw(3, kNumParticles, 0, 0);

View File

@ -160,7 +160,7 @@ void frame() {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetIndexBuffer(indexBuffer, 0);

View File

@ -285,19 +285,19 @@ void frame() {
dawn::CommandBufferBuilder builder = device.CreateCommandBufferBuilder();
{
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass);
pass.SetRenderPipeline(pipeline);
pass.SetPipeline(pipeline);
pass.SetBindGroup(0, bindGroup[0]);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawIndexed(36, 1, 0, 0, 0);
pass.SetStencilReference(0x1);
pass.SetRenderPipeline(planePipeline);
pass.SetPipeline(planePipeline);
pass.SetBindGroup(0, bindGroup[0]);
pass.SetVertexBuffers(0, 1, &planeBuffer, vertexBufferOffsets);
pass.DrawIndexed(6, 1, 0, 0, 0);
pass.SetRenderPipeline(reflectionPipeline);
pass.SetPipeline(reflectionPipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetBindGroup(0, bindGroup[1]);
pass.DrawIndexed(36, 1, 0, 0, 0);

View File

@ -498,7 +498,7 @@ namespace {
}
}
const MaterialInfo& material = getMaterial(iPrim.material, strides[0], strides[1], strides[2]);
pass.SetRenderPipeline(material.pipeline);
pass.SetPipeline(material.pipeline);
pass.SetBindGroup(0, material.bindGroup0);
pass.SetPushConstants(dawn::ShaderStageBit::Vertex,
0, sizeof(u_transform_block) / sizeof(uint32_t),

View File

@ -38,7 +38,7 @@ namespace dawn_native {
dispatch->z = z;
}
void ComputePassEncoderBase::SetComputePipeline(ComputePipelineBase* pipeline) {
void ComputePassEncoderBase::SetPipeline(ComputePipelineBase* pipeline) {
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) {
return;
}

View File

@ -31,7 +31,7 @@ namespace dawn_native {
CommandAllocator* allocator);
void Dispatch(uint32_t x, uint32_t y, uint32_t z);
void SetComputePipeline(ComputePipelineBase* pipeline);
void SetPipeline(ComputePipelineBase* pipeline);
};
} // namespace dawn_native

View File

@ -63,7 +63,7 @@ namespace dawn_native {
draw->firstInstance = firstInstance;
}
void RenderPassEncoderBase::SetRenderPipeline(RenderPipelineBase* pipeline) {
void RenderPassEncoderBase::SetPipeline(RenderPipelineBase* pipeline) {
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) {
return;
}

View File

@ -40,7 +40,7 @@ namespace dawn_native {
uint32_t baseVertex,
uint32_t firstInstance);
void SetRenderPipeline(RenderPipelineBase* pipeline);
void SetPipeline(RenderPipelineBase* pipeline);
void SetStencilReference(uint32_t reference);
void SetBlendColor(float r, float g, float b, float a);

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();
}