[D3D12] CP: Separate guest frame and non-frame submissions

This commit is contained in:
Triang3l
2019-10-28 22:00:59 +03:00
parent d3b6f71ae1
commit 6e5a0ebf7b
10 changed files with 207 additions and 193 deletions

View File

@@ -451,8 +451,8 @@ void RenderTargetCache::ClearCache() {
#endif
}
void RenderTargetCache::BeginFrame() {
// A frame does not always end in a resolve (for example, when memexport
void RenderTargetCache::BeginSubmission() {
// A submission does not always end in a resolve (for example, when memexport
// readback happens) or something else that would surely submit the UAV
// barrier, so we need to preserve the `current_` variables.
if (!command_processor_->IsROVUsedForEDRAM()) {
@@ -460,6 +460,8 @@ void RenderTargetCache::BeginFrame() {
}
}
void RenderTargetCache::EndSubmission() { UnbindRenderTargets(); }
bool RenderTargetCache::UpdateRenderTargets(const D3D12Shader* pixel_shader) {
// There are two kinds of render target binding updates in this implementation
// in case something has been changed - full and partial.
@@ -2116,8 +2118,6 @@ void RenderTargetCache::WriteEDRAMUint32UAVDescriptor(
D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
}
void RenderTargetCache::EndFrame() { UnbindRenderTargets(); }
ColorRenderTargetFormat RenderTargetCache::GetBaseColorFormat(
ColorRenderTargetFormat format) {
switch (format) {