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

@@ -122,9 +122,6 @@ void init() {
input.stride = 4 * sizeof(float);
input.stepMode = dawn::InputStepMode::Vertex;
auto inputState =
device.CreateInputStateBuilder().SetAttribute(&attribute).SetInput(&input).GetResult();
auto bgl = utils::MakeBindGroupLayout(
device, {
{0, dawn::ShaderStageBit::Fragment, dawn::BindingType::Sampler},
@@ -139,7 +136,10 @@ void init() {
descriptor.layout = utils::MakeBasicPipelineLayout(device, &bgl);
descriptor.cVertexStage.module = vsModule;
descriptor.cFragmentStage.module = fsModule;
descriptor.inputState = inputState;
descriptor.cInputState.numAttributes = 1;
descriptor.cInputState.attributes = &attribute;
descriptor.cInputState.numInputs = 1;
descriptor.cInputState.inputs = &input;
descriptor.depthStencilState = &descriptor.cDepthStencilState;
descriptor.cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();