Add better error handling for failed loading of the LyShine shader (#6761)

Signed-off-by: abrmich <abrmich@amazon.com>
This commit is contained in:
michabr
2022-01-10 12:11:15 -08:00
committed by GitHub
parent 73a023b0c3
commit df7a2fbd9d
3 changed files with 34 additions and 23 deletions
@@ -141,6 +141,7 @@ namespace AZ
void DynamicDrawContext::InitVertexFormat(const AZStd::vector<VertexChannel>& vertexChannels)
{
AZ_Assert(!m_initialized, "Can't call InitVertexFormat after context was initialized (EndInit was called)");
AZ_Assert(m_pipelineState, "Can't call InitVertexFormat before InitShader is called with a valid shader");
m_perVertexDataSize = 0;
RHI::InputStreamLayoutBuilder layoutBuilder;
@@ -150,7 +151,10 @@ namespace AZ
bufferBuilder->Channel(channel.m_channel, channel.m_format);
m_perVertexDataSize += RHI::GetFormatSize(channel.m_format);
}
m_pipelineState->InputStreamLayout() = layoutBuilder.End();
if (m_pipelineState)
{
m_pipelineState->InputStreamLayout() = layoutBuilder.End();
}
}
void DynamicDrawContext::InitDrawListTag(RHI::DrawListTag drawListTag)