GPU: Add host/hardware stats
This commit is contained in:
@ -40,6 +40,7 @@ std::unique_ptr<GPUDevice> g_gpu_device;
|
||||
|
||||
static std::string s_pipeline_cache_path;
|
||||
size_t GPUDevice::s_total_vram_usage = 0;
|
||||
GPUDevice::Statistics GPUDevice::s_stats = {};
|
||||
|
||||
GPUSampler::GPUSampler() = default;
|
||||
|
||||
@ -206,6 +207,11 @@ size_t GPUFramebufferManagerBase::KeyHash::operator()(const Key& key) const
|
||||
return XXH32(&key, sizeof(key), 0x1337);
|
||||
}
|
||||
|
||||
GPUDevice::GPUDevice()
|
||||
{
|
||||
ResetStatistics();
|
||||
}
|
||||
|
||||
GPUDevice::~GPUDevice() = default;
|
||||
|
||||
RenderAPI GPUDevice::GetPreferredAPI()
|
||||
@ -993,6 +999,11 @@ float GPUDevice::GetAndResetAccumulatedGPUTime()
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
void GPUDevice::ResetStatistics()
|
||||
{
|
||||
s_stats = {};
|
||||
}
|
||||
|
||||
std::unique_ptr<GPUDevice> GPUDevice::CreateDeviceForAPI(RenderAPI api)
|
||||
{
|
||||
switch (api)
|
||||
|
||||
Reference in New Issue
Block a user