Change vulkan/D3D12 to always re-record any cmd buffers being submitted

* Previously we'd cache a copy of each command buffer at load time, and
  submit it any time we're not partially re-recording. This has a couple
  of drawbacks though:
  - Technically we do some things that invalidate those command buffers,
    like updating descriptor sets (with initial state application) and
    so for 100% correctness we'd need to re-record.
  - It also means that any edits we apply, like modified shaders, don't
    properly apply to the whole frame, they only apply to whichever
    command buffer is currently being partially recorded.
* We refactor out the 're-record all commands' behaviour previously
  reserved just for applying GPU counters, and use that for re-recording
  any command buffers that are wholly or partially submitted. Note that
  it's still true that only one primary and one secondary at most are
  actually *partially* re-recorded. The others are re-recorded in their
  entirety.
This commit is contained in:
baldurk
2017-12-11 19:37:40 +00:00
parent 9099e7a8c5
commit 1c44f91cb8
21 changed files with 811 additions and 1013 deletions
-1
View File
@@ -234,7 +234,6 @@ struct VulkanGPUTimerCallback : public VulkanDrawcallCallback
void PreMisc(uint32_t eid, DrawFlags flags, VkCommandBuffer cmd) { PreDraw(eid, cmd); }
bool PostMisc(uint32_t eid, DrawFlags flags, VkCommandBuffer cmd) { return PostDraw(eid, cmd); }
void PostRemisc(uint32_t eid, DrawFlags flags, VkCommandBuffer cmd) { PostRedraw(eid, cmd); }
bool RecordAllCmds() { return true; }
void AliasEvent(uint32_t primary, uint32_t alias)
{
m_AliasEvents.push_back(std::make_pair(primary, alias));