From 91dbc2c143a371bf0584e6c6a3cd2feb16535f8b Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 2 Mar 2019 23:01:28 -0800 Subject: Reworked ShaderResourcesD3D11 to comply with the updated API --- Graphics/GraphicsEngineD3DBase/include/ShaderResources.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h index aa3867f3..97fe7490 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h @@ -325,7 +325,7 @@ protected: typename TNewResourceHandler> void Initialize(ID3DBlob* pShaderByteCode, TNewResourceHandler NewResHandler, - const ShaderDesc& ShdrDesc, + const Char* ShaderName, const Char* SamplerSuffix); @@ -382,8 +382,8 @@ template void ShaderResources::Initialize(ID3DBlob* pShaderByteCode, - TNewResourceHandler NewResHandler, - const ShaderDesc& ShdrDesc, + TNewResourceHandler NewResHandler, + const Char* ShaderName, const Char* CombinedSamplerSuffix) { Uint32 CurrCB = 0, CurrTexSRV = 0, CurrTexUAV = 0, CurrBufSRV = 0, CurrBufUAV = 0, CurrSampler = 0; @@ -446,10 +446,7 @@ void ShaderResources::Initialize(ID3DBlob* pShaderByteCode, } ++CurrTexSRV; NewResHandler.OnNewTexSRV(*pNewTexSRV); - }, - - ShdrDesc, - CombinedSamplerSuffix); + }); if (CombinedSamplerSuffix != nullptr) { @@ -460,7 +457,7 @@ void ShaderResources::Initialize(ID3DBlob* pShaderByteCode, { const auto& Sampler = GetSampler(n); if (!Sampler.ValidTexSRVAssigned()) - LOG_ERROR_MESSAGE("Shader '", ShdrDesc.Name, "' uses combined texture samplers, but sampler '", Sampler.Name, "' is not assigned to any texture"); + LOG_ERROR_MESSAGE("Shader '", ShaderName, "' uses combined texture samplers, but sampler '", Sampler.Name, "' is not assigned to any texture"); } #endif } -- cgit v1.2.3