mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 15:16:16 +00:00
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:
committed by
Commit Bot service account
parent
5490e9aca1
commit
889d743baa
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user