Implement 'baseVertex' in drawIndexed() on D3D12, Metal and Vulkan

This patch adds the support of the parameter 'baseVertex' of drawIndexed
on D3D12, Metal and Vulkan back-ends.

BUG=dawn:51
TEST=dawn_end2end_tests

Change-Id: Ibd25884ad2abceaaed744d74c4ee6b0ae6b3fa1b
Reviewed-on: https://dawn-review.googlesource.com/c/3221
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Jiawei Shao
2018-12-13 01:05:26 +00:00
committed by Commit Bot service account
parent 8d08d23a66
commit ff9562f792
13 changed files with 57 additions and 29 deletions

View File

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