Handle state changes on first event in a command buffer. Closes #2648

* When selecting the first event in a command buffer the render state wouldn't
  properly be updated. This is particularly bad if the state that changed is
  being in/out of a renderpass.
This commit is contained in:
baldurk
2022-07-13 12:10:40 +01:00
parent c7e41000c3
commit 2833ea4a84
@@ -1090,7 +1090,8 @@ bool WrappedVulkan::Serialise_vkBeginCommandBuffer(SerialiserType &ser, VkComman
for(auto it = submissions.begin(); it != submissions.end(); ++it)
{
if(it->baseEvent <= m_LastEventID && m_LastEventID < (it->baseEvent + length))
if(RDCMAX(1U, it->baseEvent) - 1 <= m_LastEventID &&
m_LastEventID < (it->baseEvent + length))
{
#if ENABLED(VERBOSE_PARTIAL_REPLAY)
RDCDEBUG("vkBegin - partial detected %u < %u < %u, %s -> %s", it->baseEvent,