mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 00:47:13 +00:00
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:
committed by
Commit Bot service account
parent
27a294c2e8
commit
f856903154
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user