Various optimizations

This commit is contained in:
Wojtek Figat
2025-08-06 18:48:18 +02:00
parent a5838f739d
commit cf9c203855
12 changed files with 22 additions and 16 deletions

View File

@@ -20,6 +20,7 @@ void GPUContext::LogInvalidResourceUsage(int32 slot, const GPUResourceView* view
GPUResource* resource = view ? view->GetParent() : nullptr;
const Char* resourceType = TEXT("resource");
const Char* flagType = TEXT("flags");
StringView resourceName;
if (resource)
{
switch (resource->GetResourceType())
@@ -36,6 +37,7 @@ void GPUContext::LogInvalidResourceUsage(int32 slot, const GPUResourceView* view
flagType = TEXT("GPUBufferFlags");
break;
}
resourceName = resource->GetName();
}
const Char* usage = TEXT("-");
switch (bindPoint)
@@ -53,7 +55,7 @@ void GPUContext::LogInvalidResourceUsage(int32 slot, const GPUResourceView* view
usage = TEXT("render target");
break;
}
LOG(Error, "Incorrect {} bind at slot {} as {} (ensure to setup correct {} when creating that resource)", resourceType, slot, usage, flagType);
LOG(Error, "Incorrect {} '{}' bind at slot {} as {} (ensure to setup correct {} when creating that resource)", resourceType, resourceName, slot, usage, flagType);
}
#endif