[GPU] Make TextureCache constructors explicit

This commit is contained in:
Triang3l 2022-05-14 18:28:32 +03:00
parent d280b3953d
commit 26cf717394
2 changed files with 16 additions and 15 deletions

View File

@ -268,8 +268,8 @@ class D3D12TextureCache final : public TextureCache {
class D3D12Texture final : public Texture {
public:
D3D12Texture(D3D12TextureCache& texture_cache, const TextureKey& key,
ID3D12Resource* resource,
explicit D3D12Texture(D3D12TextureCache& texture_cache,
const TextureKey& key, ID3D12Resource* resource,
D3D12_RESOURCE_STATES resource_state);
~D3D12Texture();
@ -346,7 +346,7 @@ class D3D12TextureCache final : public TextureCache {
class ScaledResolveVirtualBuffer {
public:
ScaledResolveVirtualBuffer(ID3D12Resource* resource,
explicit ScaledResolveVirtualBuffer(ID3D12Resource* resource,
D3D12_RESOURCE_STATES resource_state)
: resource_(resource), resource_state_(resource_state) {}
ID3D12Resource* resource() const { return resource_.Get(); }
@ -373,7 +373,7 @@ class D3D12TextureCache final : public TextureCache {
bool uav_barrier_pending_ = false;
};
D3D12TextureCache(const RegisterFile& register_file,
explicit D3D12TextureCache(const RegisterFile& register_file,
D3D12SharedMemory& shared_memory,
uint32_t draw_resolution_scale_x,
uint32_t draw_resolution_scale_y,

View File

@ -248,7 +248,7 @@ class TextureCache {
void LogAction(const char* action) const;
protected:
Texture(TextureCache& texture_cache, const TextureKey& key);
explicit Texture(TextureCache& texture_cache, const TextureKey& key);
void SetHostMemoryUsage(uint64_t new_host_memory_usage) {
texture_cache_.UpdateTexturesTotalHostMemoryUsage(new_host_memory_usage,
@ -420,7 +420,8 @@ class TextureCache {
}
};
TextureCache(const RegisterFile& register_file, SharedMemory& shared_memory,
explicit TextureCache(const RegisterFile& register_file,
SharedMemory& shared_memory,
uint32_t draw_resolution_scale_x,
uint32_t draw_resolution_scale_y);