[D3D12] Rough outline of render target architecture

This commit is contained in:
Triang3l
2018-08-07 22:40:24 +03:00
parent 83cf482a50
commit 52a1a80200
6 changed files with 598 additions and 20 deletions

View File

@@ -196,7 +196,6 @@ bool TextureCache::Initialize() {
}
}
ClearBindings();
return true;
}
@@ -215,6 +214,18 @@ void TextureCache::Shutdown() {
}
}
void TextureCache::ClearCache() {
// Destroy all the textures.
for (auto texture_pair : textures_) {
Texture* texture = texture_pair.second;
if (texture->resource != nullptr) {
texture->resource->Release();
}
delete texture;
}
textures_.clear();
}
void TextureCache::TextureFetchConstantWritten(uint32_t index) {
texture_keys_in_sync_ &= ~(1u << index);
}
@@ -300,20 +311,6 @@ void TextureCache::RequestTextures(uint32_t used_vertex_texture_mask,
}
}
void TextureCache::ClearCache() {
ClearBindings();
// Destroy all the textures.
for (auto texture_pair : textures_) {
Texture* texture = texture_pair.second;
if (texture->resource != nullptr) {
texture->resource->Release();
}
delete texture;
}
textures_.clear();
}
void TextureCache::WriteTextureSRV(uint32_t fetch_constant,
TextureDimension shader_dimension,
D3D12_CPU_DESCRIPTOR_HANDLE handle) {