From aa405dc4c31397346b6a24b3b8171fc0aa8de5b3 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Wed, 15 Jan 2025 13:57:40 +0100 Subject: [PATCH] GFX: improve CreateTexture error by logging the texture GUID as well Most textures in the retail product do not have debug names. A GUID however is still very useful to have. Log the GUID here too. The CreateShaderResourceView call already logs the GUID along with the texture debug name. --- src/windows/id3dx.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/windows/id3dx.cpp b/src/windows/id3dx.cpp index 49fa5c49..a63b7430 100644 --- a/src/windows/id3dx.cpp +++ b/src/windows/id3dx.cpp @@ -191,7 +191,8 @@ void CreateTextureResource(TextureAsset_s* textureHeader, INT_PTR imageData) const HRESULT createTextureRes = D3D11Device()->CreateTexture2D(&textureDesc, subResData, &textureHeader->pInputTexture); if (createTextureRes < S_OK) - Error(eDLL_T::RTECH, EXIT_FAILURE, "Couldn't create texture \"%s\": error code = %08x\n", textureHeader->debugName, createTextureRes); + Error(eDLL_T::RTECH, EXIT_FAILURE, "Couldn't create texture \"%s\" (%llX): error code = %08x\n", + textureHeader->debugName, textureHeader->assetGuid, createTextureRes); D3D11_SHADER_RESOURCE_VIEW_DESC shaderResource{}; shaderResource.Format = dxgiFormat;