mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-08 21:17:45 +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
@@ -95,13 +95,13 @@ void init() {
|
||||
|
||||
DawnInputStateDescriptor inputState;
|
||||
inputState.nextInChain = nullptr;
|
||||
inputState.indexFormat = DAWN_INDEX_FORMAT_UINT32;
|
||||
inputState.numInputs = 0;
|
||||
inputState.inputs = nullptr;
|
||||
inputState.numAttributes = 0;
|
||||
inputState.attributes = nullptr;
|
||||
descriptor.inputState = &inputState;
|
||||
|
||||
descriptor.indexFormat = DAWN_INDEX_FORMAT_UINT32;
|
||||
descriptor.primitiveTopology = DAWN_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
|
||||
|
||||
descriptor.depthStencilState = nullptr;
|
||||
|
||||
@@ -238,6 +238,7 @@ namespace {
|
||||
auto oFSModule = utils::CreateShaderModule(device, dawn::ShaderStage::Fragment, hasTexture ? oFSSourceTextured : oFSSourceUntextured);
|
||||
|
||||
utils::ComboRenderPipelineDescriptor descriptor(device);
|
||||
descriptor.cInputState.indexFormat = dawn::IndexFormat::Uint16;
|
||||
uint32_t numAttributes = 0;
|
||||
uint32_t numInputs = 0;
|
||||
std::bitset<3> slotsSet;
|
||||
@@ -306,7 +307,6 @@ namespace {
|
||||
descriptor.layout = pipelineLayout;
|
||||
descriptor.cVertexStage.module = oVSModule;
|
||||
descriptor.cFragmentStage.module = oFSModule;
|
||||
descriptor.indexFormat = dawn::IndexFormat::Uint16;
|
||||
descriptor.depthStencilState = &descriptor.cDepthStencilState;
|
||||
descriptor.cDepthStencilState.format = dawn::TextureFormat::D32FloatS8Uint;
|
||||
descriptor.cColorStates[0]->format = GetPreferredSwapChainTextureFormat();
|
||||
|
||||
Reference in New Issue
Block a user