Move vertex index format from RenderPipelineDesc to InputStateDesc

Bug=dawn:107

Change-Id: Ia88232848995d5c4c3ac0f3137ffa518e85aa0a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6140
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Yunchao He
2019-03-28 17:09:23 +00:00
committed by Commit Bot service account
parent 27a294c2e8
commit f856903154
18 changed files with 19 additions and 25 deletions

View File

@@ -46,7 +46,6 @@ class DestroyTest : public DawnTest {
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.primitiveTopology = dawn::PrimitiveTopology::TriangleStrip;
descriptor.indexFormat = dawn::IndexFormat::Uint32;
descriptor.cInputState.numInputs = 1;
descriptor.cInputState.cInputs[0].stride = 4 * sizeof(float);
descriptor.cInputState.numAttributes = 1;

View File

@@ -46,7 +46,6 @@ class DrawIndexedTest : public DawnTest {
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.primitiveTopology = dawn::PrimitiveTopology::TriangleStrip;
descriptor.indexFormat = dawn::IndexFormat::Uint32;
descriptor.cInputState.numInputs = 1;
descriptor.cInputState.cInputs[0].stride = 4 * sizeof(float);
descriptor.cInputState.numAttributes = 1;

View File

@@ -46,7 +46,6 @@ class DrawTest : public DawnTest {
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.primitiveTopology = dawn::PrimitiveTopology::TriangleStrip;
descriptor.indexFormat = dawn::IndexFormat::Uint32;
descriptor.cInputState.numInputs = 1;
descriptor.cInputState.cInputs[0].stride = 4 * sizeof(float);
descriptor.cInputState.numAttributes = 1;

View File

@@ -52,7 +52,7 @@ class IndexFormatTest : public DawnTest {
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.primitiveTopology = dawn::PrimitiveTopology::TriangleStrip;
descriptor.indexFormat = format;
descriptor.cInputState.indexFormat = format;
descriptor.cInputState.numInputs = 1;
descriptor.cInputState.cInputs[0].stride = 4 * sizeof(float);
descriptor.cInputState.numAttributes = 1;

View File

@@ -47,7 +47,6 @@ protected:
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.primitiveTopology = dawn::PrimitiveTopology::TriangleStrip;
descriptor.indexFormat = dawn::IndexFormat::Uint32;
descriptor.cColorStates[0]->format = kFormat;
pipeline = device.CreateRenderPipeline(&descriptor);

View File

@@ -99,6 +99,7 @@ TEST_F(WireArgumentTests, CStringArgument) {
// Create the input state
DawnInputStateDescriptor inputState;
inputState.nextInChain = nullptr;
inputState.indexFormat = DAWN_INDEX_FORMAT_UINT32;
inputState.numInputs = 0;
inputState.inputs = nullptr;
inputState.numAttributes = 0;
@@ -153,7 +154,6 @@ TEST_F(WireArgumentTests, CStringArgument) {
pipelineDescriptor.sampleCount = 1;
pipelineDescriptor.layout = layout;
pipelineDescriptor.inputState = &inputState;
pipelineDescriptor.indexFormat = DAWN_INDEX_FORMAT_UINT32;
pipelineDescriptor.primitiveTopology = DAWN_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
pipelineDescriptor.depthStencilState = &depthStencilState;

View File

@@ -87,6 +87,7 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
// Create the input state
DawnInputStateDescriptor inputState;
inputState.nextInChain = nullptr;
inputState.indexFormat = DAWN_INDEX_FORMAT_UINT32;
inputState.numInputs = 0;
inputState.inputs = nullptr;
inputState.numAttributes = 0;
@@ -141,7 +142,6 @@ TEST_F(WireOptionalTests, OptionalStructPointer) {
pipelineDescriptor.sampleCount = 1;
pipelineDescriptor.layout = layout;
pipelineDescriptor.inputState = &inputState;
pipelineDescriptor.indexFormat = DAWN_INDEX_FORMAT_UINT32;
pipelineDescriptor.primitiveTopology = DAWN_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
// First case: depthStencilState is not null.