Fix assert following reflection changes. (#1717)

DxilModule::GetTessellatorPartitioning didn't follow the model of other methods of returning Undefined when it does not apply to the shader stage and would assert.
This commit is contained in:
Tristan Labelle 2018-11-16 17:05:16 -08:00 коммит произвёл GitHub
Родитель 147eddb112
Коммит 80ee93547a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -563,8 +563,9 @@ void DxilModule::SetOutputControlPointCount(unsigned NumOCPs) {
}
DXIL::TessellatorPartitioning DxilModule::GetTessellatorPartitioning() const {
DXASSERT(m_DxilEntryPropsMap.size() == 1 && m_pSM->IsHS(),
"only works for HS profile");
if (!m_pSM->IsHS())
return DXIL::TessellatorPartitioning::Undefined;
DXASSERT(m_DxilEntryPropsMap.size() == 1, "should have one entry prop");
DxilFunctionProps &props = m_DxilEntryPropsMap.begin()->second->props;
DXASSERT(props.IsHS(), "Must be HS profile");
return props.ShaderProps.HS.partition;