Rename draw commands to match WebGPU IDL

BUG=dawn:51

Change-Id: I2a78f4e77c54aeae48d3fb78bf4701352ff40529
Reviewed-on: https://dawn-review.googlesource.com/c/3040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao 2018-12-10 05:20:19 +00:00 committed by Commit Bot service account
parent 48a1923afb
commit c789b84d8d
32 changed files with 120 additions and 120 deletions

View File

@ -797,7 +797,7 @@
] ]
}, },
{ {
"name": "draw arrays", "name": "draw",
"args": [ "args": [
{"name": "vertex count", "type": "uint32_t"}, {"name": "vertex count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t"}, {"name": "instance count", "type": "uint32_t"},
@ -806,7 +806,7 @@
] ]
}, },
{ {
"name": "draw elements", "name": "draw indexed",
"args": [ "args": [
{"name": "index count", "type": "uint32_t"}, {"name": "index count", "type": "uint32_t"},
{"name": "instance count", "type": "uint32_t"}, {"name": "instance count", "type": "uint32_t"},

View File

@ -145,7 +145,7 @@ void frame() {
for (int k = 0; k < 10000; k++) { for (int k = 0; k < 10000; k++) {
shaderData[i].time = f / 60.0f; shaderData[i].time = f / 60.0f;
pass.SetPushConstants(dawn::ShaderStageBit::Vertex, 0, 6, reinterpret_cast<uint32_t*>(&shaderData[i])); pass.SetPushConstants(dawn::ShaderStageBit::Vertex, 0, 6, reinterpret_cast<uint32_t*>(&shaderData[i]));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
i++; i++;
} }

View File

@ -87,7 +87,7 @@ void frame() {
dawnRenderPassEncoder pass = dawnCommandBufferBuilderBeginRenderPass(builder, renderpassInfo); dawnRenderPassEncoder pass = dawnCommandBufferBuilderBeginRenderPass(builder, renderpassInfo);
dawnRenderPassEncoderSetRenderPipeline(pass, pipeline); dawnRenderPassEncoderSetRenderPipeline(pass, pipeline);
dawnRenderPassEncoderDrawArrays(pass, 3, 1, 0, 0); dawnRenderPassEncoderDraw(pass, 3, 1, 0, 0);
dawnRenderPassEncoderEndPass(pass); dawnRenderPassEncoderEndPass(pass);
dawnRenderPassEncoderRelease(pass); dawnRenderPassEncoderRelease(pass);

View File

@ -264,7 +264,7 @@ dawn::CommandBuffer createCommandBuffer(const dawn::RenderPassDescriptor& render
pass.SetRenderPipeline(renderPipeline); pass.SetRenderPipeline(renderPipeline);
pass.SetVertexBuffers(0, 1, &bufferDst, zeroOffsets); pass.SetVertexBuffers(0, 1, &bufferDst, zeroOffsets);
pass.SetVertexBuffers(1, 1, &modelBuffer, zeroOffsets); pass.SetVertexBuffers(1, 1, &modelBuffer, zeroOffsets);
pass.DrawArrays(3, kNumParticles, 0, 0); pass.Draw(3, kNumParticles, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -161,7 +161,7 @@ void frame() {
pass.SetBindGroup(0, bindGroup); pass.SetBindGroup(0, bindGroup);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets); pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(3, 1, 0, 0); pass.DrawIndexed(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -269,18 +269,18 @@ void frame() {
pass.SetBindGroup(0, bindGroup[0]); pass.SetBindGroup(0, bindGroup[0]);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets); pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(36, 1, 0, 0); pass.DrawIndexed(36, 1, 0, 0);
pass.SetStencilReference(0x1); pass.SetStencilReference(0x1);
pass.SetRenderPipeline(planePipeline); pass.SetRenderPipeline(planePipeline);
pass.SetBindGroup(0, bindGroup[0]); pass.SetBindGroup(0, bindGroup[0]);
pass.SetVertexBuffers(0, 1, &planeBuffer, vertexBufferOffsets); pass.SetVertexBuffers(0, 1, &planeBuffer, vertexBufferOffsets);
pass.DrawElements(6, 1, 0, 0); pass.DrawIndexed(6, 1, 0, 0);
pass.SetRenderPipeline(reflectionPipeline); pass.SetRenderPipeline(reflectionPipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets); pass.SetVertexBuffers(0, 1, &vertexBuffer, vertexBufferOffsets);
pass.SetBindGroup(0, bindGroup[1]); pass.SetBindGroup(0, bindGroup[1]);
pass.DrawElements(36, 1, 0, 0); pass.DrawIndexed(36, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -531,10 +531,10 @@ namespace {
} }
const auto& oIndicesBuffer = buffers.at(iIndices.bufferView); const auto& oIndicesBuffer = buffers.at(iIndices.bufferView);
pass.SetIndexBuffer(oIndicesBuffer, static_cast<uint32_t>(iIndices.byteOffset)); pass.SetIndexBuffer(oIndicesBuffer, static_cast<uint32_t>(iIndices.byteOffset));
pass.DrawElements(static_cast<uint32_t>(iIndices.count), 1, 0, 0); pass.DrawIndexed(static_cast<uint32_t>(iIndices.count), 1, 0, 0);
} else { } else {
// DrawArrays // DrawArrays
pass.DrawArrays(vertexCount, 1, 0, 0); pass.Draw(vertexCount, 1, 0, 0);
} }
} }
} }

View File

@ -515,14 +515,14 @@ namespace dawn_native {
return {}; return {};
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
mIterator.NextCommand<DrawArraysCmd>(); mIterator.NextCommand<DrawCmd>();
DAWN_TRY(persistentState.ValidateCanDrawArrays()); DAWN_TRY(persistentState.ValidateCanDraw());
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
mIterator.NextCommand<DrawElementsCmd>(); mIterator.NextCommand<DrawIndexedCmd>();
DAWN_TRY(persistentState.ValidateCanDrawElements()); DAWN_TRY(persistentState.ValidateCanDrawIndexed());
} break; } break;
case Command::SetRenderPipeline: { case Command::SetRenderPipeline: {

View File

@ -38,11 +38,11 @@ namespace dawn_native {
static constexpr CommandBufferStateTracker::ValidationAspects kDispatchAspects = static constexpr CommandBufferStateTracker::ValidationAspects kDispatchAspects =
1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS; 1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS;
static constexpr CommandBufferStateTracker::ValidationAspects kDrawArraysAspects = static constexpr CommandBufferStateTracker::ValidationAspects kDrawAspects =
1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS | 1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS |
1 << VALIDATION_ASPECT_VERTEX_BUFFERS; 1 << VALIDATION_ASPECT_VERTEX_BUFFERS;
static constexpr CommandBufferStateTracker::ValidationAspects kDrawElementsAspects = static constexpr CommandBufferStateTracker::ValidationAspects kDrawIndexedAspects =
1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS | 1 << VALIDATION_ASPECT_PIPELINE | 1 << VALIDATION_ASPECT_BIND_GROUPS |
1 << VALIDATION_ASPECT_VERTEX_BUFFERS | 1 << VALIDATION_ASPECT_INDEX_BUFFER; 1 << VALIDATION_ASPECT_VERTEX_BUFFERS | 1 << VALIDATION_ASPECT_INDEX_BUFFER;
@ -53,12 +53,12 @@ namespace dawn_native {
return ValidateOperation(kDispatchAspects); return ValidateOperation(kDispatchAspects);
} }
MaybeError CommandBufferStateTracker::ValidateCanDrawArrays() { MaybeError CommandBufferStateTracker::ValidateCanDraw() {
return ValidateOperation(kDrawArraysAspects); return ValidateOperation(kDrawAspects);
} }
MaybeError CommandBufferStateTracker::ValidateCanDrawElements() { MaybeError CommandBufferStateTracker::ValidateCanDrawIndexed() {
return ValidateOperation(kDrawElementsAspects); return ValidateOperation(kDrawIndexedAspects);
} }
MaybeError CommandBufferStateTracker::ValidateOperation(ValidationAspects requiredAspects) { MaybeError CommandBufferStateTracker::ValidateOperation(ValidationAspects requiredAspects) {

View File

@ -29,8 +29,8 @@ namespace dawn_native {
public: public:
// Non-state-modifying validation functions // Non-state-modifying validation functions
MaybeError ValidateCanDispatch(); MaybeError ValidateCanDispatch();
MaybeError ValidateCanDrawArrays(); MaybeError ValidateCanDraw();
MaybeError ValidateCanDrawElements(); MaybeError ValidateCanDrawIndexed();
// State-modifying methods // State-modifying methods
void SetComputePipeline(ComputePipelineBase* pipeline); void SetComputePipeline(ComputePipelineBase* pipeline);

View File

@ -53,13 +53,13 @@ namespace dawn_native {
DispatchCmd* dispatch = commands->NextCommand<DispatchCmd>(); DispatchCmd* dispatch = commands->NextCommand<DispatchCmd>();
dispatch->~DispatchCmd(); dispatch->~DispatchCmd();
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
DrawArraysCmd* draw = commands->NextCommand<DrawArraysCmd>(); DrawCmd* draw = commands->NextCommand<DrawCmd>();
draw->~DrawArraysCmd(); draw->~DrawCmd();
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
DrawElementsCmd* draw = commands->NextCommand<DrawElementsCmd>(); DrawIndexedCmd* draw = commands->NextCommand<DrawIndexedCmd>();
draw->~DrawElementsCmd(); draw->~DrawIndexedCmd();
} break; } break;
case Command::EndComputePass: { case Command::EndComputePass: {
EndComputePassCmd* cmd = commands->NextCommand<EndComputePassCmd>(); EndComputePassCmd* cmd = commands->NextCommand<EndComputePassCmd>();
@ -142,12 +142,12 @@ namespace dawn_native {
commands->NextCommand<DispatchCmd>(); commands->NextCommand<DispatchCmd>();
break; break;
case Command::DrawArrays: case Command::Draw:
commands->NextCommand<DrawArraysCmd>(); commands->NextCommand<DrawCmd>();
break; break;
case Command::DrawElements: case Command::DrawIndexed:
commands->NextCommand<DrawElementsCmd>(); commands->NextCommand<DrawIndexedCmd>();
break; break;
case Command::EndComputePass: case Command::EndComputePass:

View File

@ -33,8 +33,8 @@ namespace dawn_native {
CopyBufferToTexture, CopyBufferToTexture,
CopyTextureToBuffer, CopyTextureToBuffer,
Dispatch, Dispatch,
DrawArrays, Draw,
DrawElements, DrawIndexed,
EndComputePass, EndComputePass,
EndRenderPass, EndRenderPass,
SetComputePipeline, SetComputePipeline,
@ -93,14 +93,14 @@ namespace dawn_native {
uint32_t z; uint32_t z;
}; };
struct DrawArraysCmd { struct DrawCmd {
uint32_t vertexCount; uint32_t vertexCount;
uint32_t instanceCount; uint32_t instanceCount;
uint32_t firstVertex; uint32_t firstVertex;
uint32_t firstInstance; uint32_t firstInstance;
}; };
struct DrawElementsCmd { struct DrawIndexedCmd {
uint32_t indexCount; uint32_t indexCount;
uint32_t instanceCount; uint32_t instanceCount;
uint32_t firstIndex; uint32_t firstIndex;

View File

@ -29,32 +29,32 @@ namespace dawn_native {
: ProgrammablePassEncoder(device, topLevelBuilder, allocator) { : ProgrammablePassEncoder(device, topLevelBuilder, allocator) {
} }
void RenderPassEncoderBase::DrawArrays(uint32_t vertexCount, void RenderPassEncoderBase::Draw(uint32_t vertexCount,
uint32_t instanceCount, uint32_t instanceCount,
uint32_t firstVertex, uint32_t firstVertex,
uint32_t firstInstance) { uint32_t firstInstance) {
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) { if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) {
return; return;
} }
DrawArraysCmd* draw = mAllocator->Allocate<DrawArraysCmd>(Command::DrawArrays); DrawCmd* draw = mAllocator->Allocate<DrawCmd>(Command::Draw);
new (draw) DrawArraysCmd; new (draw) DrawCmd;
draw->vertexCount = vertexCount; draw->vertexCount = vertexCount;
draw->instanceCount = instanceCount; draw->instanceCount = instanceCount;
draw->firstVertex = firstVertex; draw->firstVertex = firstVertex;
draw->firstInstance = firstInstance; draw->firstInstance = firstInstance;
} }
void RenderPassEncoderBase::DrawElements(uint32_t indexCount, void RenderPassEncoderBase::DrawIndexed(uint32_t indexCount,
uint32_t instanceCount, uint32_t instanceCount,
uint32_t firstIndex, uint32_t firstIndex,
uint32_t firstInstance) { uint32_t firstInstance) {
if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) { if (mTopLevelBuilder->ConsumedError(ValidateCanRecordCommands())) {
return; return;
} }
DrawElementsCmd* draw = mAllocator->Allocate<DrawElementsCmd>(Command::DrawElements); DrawIndexedCmd* draw = mAllocator->Allocate<DrawIndexedCmd>(Command::DrawIndexed);
new (draw) DrawElementsCmd; new (draw) DrawIndexedCmd;
draw->indexCount = indexCount; draw->indexCount = indexCount;
draw->instanceCount = instanceCount; draw->instanceCount = instanceCount;
draw->firstIndex = firstIndex; draw->firstIndex = firstIndex;

View File

@ -30,14 +30,14 @@ namespace dawn_native {
CommandBufferBuilder* topLevelBuilder, CommandBufferBuilder* topLevelBuilder,
CommandAllocator* allocator); CommandAllocator* allocator);
void DrawArrays(uint32_t vertexCount, void Draw(uint32_t vertexCount,
uint32_t instanceCount, uint32_t instanceCount,
uint32_t firstVertex, uint32_t firstVertex,
uint32_t firstInstance); uint32_t firstInstance);
void DrawElements(uint32_t vertexCount, void DrawIndexed(uint32_t vertexCount,
uint32_t instanceCount, uint32_t instanceCount,
uint32_t firstIndex, uint32_t firstIndex,
uint32_t firstInstance); uint32_t firstInstance);
void SetRenderPipeline(RenderPipelineBase* pipeline); void SetRenderPipeline(RenderPipelineBase* pipeline);

View File

@ -540,14 +540,14 @@ namespace dawn_native { namespace d3d12 {
return; return;
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
DrawArraysCmd* draw = mCommands.NextCommand<DrawArraysCmd>(); DrawCmd* draw = mCommands.NextCommand<DrawCmd>();
commandList->DrawInstanced(draw->vertexCount, draw->instanceCount, commandList->DrawInstanced(draw->vertexCount, draw->instanceCount,
draw->firstVertex, draw->firstInstance); draw->firstVertex, draw->firstInstance);
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
DrawElementsCmd* draw = mCommands.NextCommand<DrawElementsCmd>(); DrawIndexedCmd* draw = mCommands.NextCommand<DrawIndexedCmd>();
commandList->DrawIndexedInstanced(draw->indexCount, draw->instanceCount, commandList->DrawIndexedInstanced(draw->indexCount, draw->instanceCount,
draw->firstIndex, 0, draw->firstInstance); draw->firstIndex, 0, draw->firstInstance);
} break; } break;

View File

@ -403,8 +403,8 @@ namespace dawn_native { namespace metal {
return; return;
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
DrawArraysCmd* draw = mCommands.NextCommand<DrawArraysCmd>(); DrawCmd* draw = mCommands.NextCommand<DrawCmd>();
[encoder drawPrimitives:lastPipeline->GetMTLPrimitiveTopology() [encoder drawPrimitives:lastPipeline->GetMTLPrimitiveTopology()
vertexStart:draw->firstVertex vertexStart:draw->firstVertex
@ -413,8 +413,8 @@ namespace dawn_native { namespace metal {
baseInstance:draw->firstInstance]; baseInstance:draw->firstInstance];
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
DrawElementsCmd* draw = mCommands.NextCommand<DrawElementsCmd>(); DrawIndexedCmd* draw = mCommands.NextCommand<DrawIndexedCmd>();
size_t formatSize = IndexFormatSize(lastPipeline->GetIndexFormat()); size_t formatSize = IndexFormatSize(lastPipeline->GetIndexFormat());
[encoder [encoder

View File

@ -583,8 +583,8 @@ namespace dawn_native { namespace opengl {
return; return;
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
DrawArraysCmd* draw = mCommands.NextCommand<DrawArraysCmd>(); DrawCmd* draw = mCommands.NextCommand<DrawCmd>();
pushConstants.Apply(lastPipeline, lastPipeline); pushConstants.Apply(lastPipeline, lastPipeline);
inputBuffers.Apply(); inputBuffers.Apply();
@ -600,8 +600,8 @@ namespace dawn_native { namespace opengl {
} }
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
DrawElementsCmd* draw = mCommands.NextCommand<DrawElementsCmd>(); DrawIndexedCmd* draw = mCommands.NextCommand<DrawIndexedCmd>();
pushConstants.Apply(lastPipeline, lastPipeline); pushConstants.Apply(lastPipeline, lastPipeline);
inputBuffers.Apply(); inputBuffers.Apply();

View File

@ -320,16 +320,16 @@ namespace dawn_native { namespace vulkan {
return; return;
} break; } break;
case Command::DrawArrays: { case Command::Draw: {
DrawArraysCmd* draw = mCommands.NextCommand<DrawArraysCmd>(); DrawCmd* draw = mCommands.NextCommand<DrawCmd>();
descriptorSets.Flush(device, commands, VK_PIPELINE_BIND_POINT_GRAPHICS); descriptorSets.Flush(device, commands, VK_PIPELINE_BIND_POINT_GRAPHICS);
device->fn.CmdDraw(commands, draw->vertexCount, draw->instanceCount, device->fn.CmdDraw(commands, draw->vertexCount, draw->instanceCount,
draw->firstVertex, draw->firstInstance); draw->firstVertex, draw->firstInstance);
} break; } break;
case Command::DrawElements: { case Command::DrawIndexed: {
DrawElementsCmd* draw = mCommands.NextCommand<DrawElementsCmd>(); DrawIndexedCmd* draw = mCommands.NextCommand<DrawIndexedCmd>();
descriptorSets.Flush(device, commands, VK_PIPELINE_BIND_POINT_GRAPHICS); descriptorSets.Flush(device, commands, VK_PIPELINE_BIND_POINT_GRAPHICS);
uint32_t vertexOffset = 0; uint32_t vertexOffset = 0;

View File

@ -143,7 +143,7 @@ TEST_P(BindGroupTests, ReusedUBO) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetBindGroup(0, bindGroup); pass.SetBindGroup(0, bindGroup);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
dawn::CommandBuffer commands = builder.GetResult(); dawn::CommandBuffer commands = builder.GetResult();
@ -257,7 +257,7 @@ TEST_P(BindGroupTests, UBOSamplerAndTexture) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetBindGroup(0, bindGroup); pass.SetBindGroup(0, bindGroup);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
dawn::CommandBuffer commands = builder.GetResult(); dawn::CommandBuffer commands = builder.GetResult();

View File

@ -107,13 +107,13 @@ class BlendStateTest : public DawnTest {
// First use the base pipeline to draw a triangle with no blending // First use the base pipeline to draw a triangle with no blending
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
// Then use the test pipeline to draw the test triangle with blending // Then use the test pipeline to draw the test triangle with blending
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { triangle.color } }))); 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.SetBlendColor(triangle.blendFactor[0], triangle.blendFactor[1], triangle.blendFactor[2], triangle.blendFactor[3]);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -690,7 +690,7 @@ TEST_P(BlendStateTest, ColorWriteMaskBlendingDisabled) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { base } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -826,11 +826,11 @@ TEST_P(BlendStateTest, IndependentBlendState) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { base, base, base, base } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { base, base, base, base } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { color0, color1, color2, color3 } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 4>({ { color0, color1, color2, color3 } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -892,10 +892,10 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -912,11 +912,11 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBlendColor(1, 1, 1, 1); pass.SetBlendColor(1, 1, 1, 1);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -933,21 +933,21 @@ TEST_P(BlendStateTest, DefaultBlendColor) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBlendColor(1, 1, 1, 1); pass.SetBlendColor(1, 1, 1, 1);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(basePipeline); pass.SetRenderPipeline(basePipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(0, 0, 0, 0) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(testPipeline); pass.SetRenderPipeline(testPipeline);
pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } }))); pass.SetBindGroup(0, MakeBindGroupForColors(std::array<RGBA8, 1>({ { RGBA8(255, 255, 255, 255) } })));
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -225,7 +225,7 @@ class DepthStencilStateTest : public DawnTest {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetStencilReference(test.stencil); // Set the stencil reference pass.SetStencilReference(test.stencil); // Set the stencil reference
pass.SetBindGroup(0, bindGroup); // Set the bind group which contains color and depth data pass.SetBindGroup(0, bindGroup); // Set the bind group which contains color and depth data
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
} }
pass.EndPass(); pass.EndPass();

View File

@ -80,7 +80,7 @@ class DrawElementsTest : public DawnTest {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(indexCount, instanceCount, firstIndex, firstInstance); pass.DrawIndexed(indexCount, instanceCount, firstIndex, firstInstance);
pass.EndPass(); pass.EndPass();
} }

View File

@ -84,7 +84,7 @@ TEST_P(IndexFormatTest, Uint32) {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(3, 1, 0, 0); pass.DrawIndexed(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -115,7 +115,7 @@ TEST_P(IndexFormatTest, Uint16) {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(3, 1, 0, 0); pass.DrawIndexed(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -159,7 +159,7 @@ TEST_P(IndexFormatTest, Uint32PrimitiveRestart) {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(7, 1, 0, 0); pass.DrawIndexed(7, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -193,7 +193,7 @@ TEST_P(IndexFormatTest, Uint16PrimitiveRestart) {
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.DrawElements(7, 1, 0, 0); pass.DrawIndexed(7, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -233,7 +233,7 @@ TEST_P(IndexFormatTest, ChangePipelineAfterSetIndexBuffer) {
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.SetRenderPipeline(pipeline32); pass.SetRenderPipeline(pipeline32);
pass.DrawElements(3, 1, 0, 0); pass.DrawIndexed(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -267,7 +267,7 @@ TEST_P(IndexFormatTest, DISABLED_SetIndexBufferBeforeSetPipeline) {
pass.SetIndexBuffer(indexBuffer, 0); pass.SetIndexBuffer(indexBuffer, 0);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset); pass.SetVertexBuffers(0, 1, &vertexBuffer, &zeroOffset);
pass.DrawElements(3, 1, 0, 0); pass.DrawIndexed(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -176,7 +176,7 @@ class InputStateTest : public DawnTest {
pass.SetVertexBuffers(buffer.location, 1, buffer.buffer, &zeroOffset); pass.SetVertexBuffers(buffer.location, 1, buffer.buffer, &zeroOffset);
} }
pass.DrawArrays(triangles * 3, instances, 0, 0); pass.Draw(triangles * 3, instances, 0, 0);
pass.EndPass(); pass.EndPass();
dawn::CommandBuffer commands = builder.GetResult(); dawn::CommandBuffer commands = builder.GetResult();

View File

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

View File

@ -258,7 +258,7 @@ TEST_P(PushConstantTest, RenderPassDefaultsToZero) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
// Test render push constants are set to zero by default. // Test render push constants are set to zero by default.
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.DrawArrays(1, 1, 0, 0); pass.Draw(1, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -386,7 +386,7 @@ TEST_P(PushConstantTest, SeparateVertexAndFragmentConstants) {
pass.SetPushConstants(dawn::ShaderStageBit::Vertex, 0, 1, &one); pass.SetPushConstants(dawn::ShaderStageBit::Vertex, 0, 1, &one);
pass.SetPushConstants(dawn::ShaderStageBit::Fragment, 0, 1, &two); pass.SetPushConstants(dawn::ShaderStageBit::Fragment, 0, 1, &two);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.DrawArrays(1, 1, 0, 0); pass.Draw(1, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -411,7 +411,7 @@ TEST_P(PushConstantTest, SimultaneousVertexAndFragmentConstants) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetPushConstants(dawn::ShaderStageBit::Vertex | dawn::ShaderStageBit::Fragment, 0, 1, &two); pass.SetPushConstants(dawn::ShaderStageBit::Vertex | dawn::ShaderStageBit::Fragment, 0, 1, &two);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.DrawArrays(1, 1, 0, 0); pass.Draw(1, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -40,7 +40,7 @@ class DrawQuad {
.GetResult(); .GetResult();
pass->SetRenderPipeline(renderPipeline); pass->SetRenderPipeline(renderPipeline);
pass->DrawArrays(6, 1, 0, 0); pass->Draw(6, 1, 0, 0);
} }
private: private:

View File

@ -136,7 +136,7 @@ protected:
dawn::RenderPassEncoder pass = builder.BeginRenderPass(mRenderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(mRenderPass.renderPassInfo);
pass.SetRenderPipeline(mPipeline); pass.SetRenderPipeline(mPipeline);
pass.SetBindGroup(0, bindGroup); pass.SetBindGroup(0, bindGroup);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

@ -55,7 +55,7 @@ TEST_P(ScissorTest, DefaultsToWholeRenderTarget) {
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -78,7 +78,7 @@ TEST_P(ScissorTest, LargerThanAttachment) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetScissorRect(0, 0, 200, 200); pass.SetScissorRect(0, 0, 200, 200);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -104,7 +104,7 @@ TEST_P(ScissorTest, EmptyRect) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetScissorRect(0, 0, 0, 0); pass.SetScissorRect(0, 0, 0, 0);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -132,7 +132,7 @@ TEST_P(ScissorTest, PartialRect) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.SetScissorRect(kX, kY, kW, kH); pass.SetScissorRect(kX, kY, kW, kH);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
@ -163,7 +163,7 @@ TEST_P(ScissorTest, NoInheritanceBetweenRenderPass) {
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderPass.renderPassInfo);
pass.SetRenderPipeline(pipeline); pass.SetRenderPipeline(pipeline);
pass.DrawArrays(6, 1, 0, 0); pass.Draw(6, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }

View File

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

View File

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

View File

@ -108,7 +108,7 @@ TEST_F(VertexBufferValidationTest, VertexInputsInheritedBetweenPipelines) {
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1); pass.SetRenderPipeline(pipeline1);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
builder.GetResult(); builder.GetResult();
@ -119,9 +119,9 @@ TEST_F(VertexBufferValidationTest, VertexInputsInheritedBetweenPipelines) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2); pass.SetRenderPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets); pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.SetRenderPipeline(pipeline1); pass.SetRenderPipeline(pipeline1);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
builder.GetResult(); builder.GetResult();
@ -146,14 +146,14 @@ TEST_F(VertexBufferValidationTest, VertexInputsNotInheritedBetweenRendePasses) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2); pass.SetRenderPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets); pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1); pass.SetRenderPipeline(pipeline1);
pass.SetVertexBuffers(0, 1, vertexBuffers.data(), offsets); pass.SetVertexBuffers(0, 1, vertexBuffers.data(), offsets);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
builder.GetResult(); builder.GetResult();
@ -164,13 +164,13 @@ TEST_F(VertexBufferValidationTest, VertexInputsNotInheritedBetweenRendePasses) {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline2); pass.SetRenderPipeline(pipeline2);
pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets); pass.SetVertexBuffers(0, 2, vertexBuffers.data(), offsets);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
{ {
dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass); dawn::RenderPassEncoder pass = builder.BeginRenderPass(renderpass);
pass.SetRenderPipeline(pipeline1); pass.SetRenderPipeline(pipeline1);
pass.DrawArrays(3, 1, 0, 0); pass.Draw(3, 1, 0, 0);
pass.EndPass(); pass.EndPass();
} }
builder.GetResult(); builder.GetResult();