Input State Descriptorization

This change also removes InputState object.

BUG=dawn:107

Change-Id: Ia3fd2d348658f5719de0279bfe7bb10a4f183523
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5660
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Yunchao He
2019-03-27 18:08:50 +00:00
committed by Commit Bot service account
parent 5490e9aca1
commit 889d743baa
63 changed files with 1141 additions and 1465 deletions

View File

@@ -37,6 +37,15 @@ namespace utils {
cFragmentStage.entryPoint = "main";
}
// Set defaults for the input state descriptors.
{
descriptor->inputState = &cInputState;
cInputState.numInputs = 0;
cInputState.inputs = nullptr;
cInputState.numAttributes = 0;
cInputState.attributes = nullptr;
}
// Set defaults for the color state descriptors.
{
descriptor->colorStateCount = 1;
@@ -75,7 +84,6 @@ namespace utils {
descriptor->depthStencilState = nullptr;
}
descriptor->inputState = device.CreateInputStateBuilder().GetResult();
descriptor->layout = utils::MakeBasicPipelineLayout(device, nullptr);
}

View File

@@ -30,6 +30,7 @@ namespace utils {
dawn::PipelineStageDescriptor cVertexStage;
dawn::PipelineStageDescriptor cFragmentStage;
dawn::InputStateDescriptor cInputState;
std::array<dawn::ColorStateDescriptor*, kMaxColorAttachments> cColorStates;
dawn::DepthStencilStateDescriptor cDepthStencilState;