[D3D12] Rough outline of render target architecture
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user