[D3D12] ROV: Check if supported

This commit is contained in:
Triang3l
2018-10-10 14:30:29 +03:00
parent 90f700c785
commit 6d2e74325c
9 changed files with 83 additions and 16 deletions

View File

@@ -9,6 +9,8 @@
#include "xenia/gpu/d3d12/render_target_cache.h"
#include <gflags/gflags.h>
#include <algorithm>
#include <cmath>
#include <cstring>
@@ -23,6 +25,10 @@
#include "xenia/gpu/texture_util.h"
#include "xenia/ui/d3d12/d3d12_util.h"
DEFINE_bool(d3d12_rov, false,
"Use rasterizer-ordered views for render target emulation where "
"available (experimental and currently largely unimplemented).");
namespace xe {
namespace gpu {
namespace d3d12 {
@@ -330,6 +336,14 @@ void RenderTargetCache::ClearCache() {
}
}
bool RenderTargetCache::IsROVUsedForEDRAM() const {
if (!FLAGS_d3d12_rov) {
return false;
}
auto provider = command_processor_->GetD3D12Context()->GetD3D12Provider();
return provider->AreRasterizerOrderedViewsSupported();
}
void RenderTargetCache::BeginFrame() {
ClearBindings();