Skip to content

Commit

Permalink
PostFXContext::Execute: handle camera attribs buffer map failure
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Nov 24, 2024
1 parent 6ce3727 commit 0bc64c1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions PostProcess/Common/src/PostFXContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,11 @@ void PostFXContext::Execute(const RenderAttributes& RenderAttribs)
m_Resources.Insert(RESOURCE_IDENTIFIER_CONSTANT_BUFFER, pBuffer);
}

MapHelper<HLSL::CameraAttribs> CameraAttibs{RenderAttribs.pDeviceContext, m_Resources[RESOURCE_IDENTIFIER_CONSTANT_BUFFER], MAP_WRITE, MAP_FLAG_DISCARD};
CameraAttibs[0] = *RenderAttribs.pCurrCamera;
CameraAttibs[1] = *RenderAttribs.pPrevCamera;
if (MapHelper<HLSL::CameraAttribs> CameraAttibs{RenderAttribs.pDeviceContext, m_Resources[RESOURCE_IDENTIFIER_CONSTANT_BUFFER], MAP_WRITE, MAP_FLAG_DISCARD})
{
CameraAttibs[0] = *RenderAttribs.pCurrCamera;
CameraAttibs[1] = *RenderAttribs.pPrevCamera;
}
}
else
{
Expand Down

0 comments on commit 0bc64c1

Please sign in to comment.