[D3D12] d3d12_break_on_error + fix PerformSwap descriptor heap wrap

This commit is contained in:
Triang3l
2020-05-17 00:26:04 +03:00
parent 8341a48210
commit b7a5c24bb1
7 changed files with 88 additions and 34 deletions

View File

@@ -159,9 +159,12 @@ class TextureCache {
uint32_t first_unscaled_4kb_page,
uint32_t unscaled_4kb_page_count);
// Returns a descriptor of the front buffer in PIXEL_SHADER_RESOURCE state.
bool RequestSwapTexture(D3D12_CPU_DESCRIPTOR_HANDLE handle,
TextureFormat& format_out);
// Returns the ID3D12Resource of the front buffer texture (in
// PIXEL_SHADER_RESOURCE state), or nullptr in case of failure, and writes the
// description of its SRV. May call LoadTextureData, so the same restrictions
// (such as about descriptor heap change possibility) apply.
ID3D12Resource* RequestSwapTexture(
D3D12_SHADER_RESOURCE_VIEW_DESC& srv_desc_out, TextureFormat& format_out);
private:
enum class LoadMode {