From 6f479d4aa4e49b1ac4b1a6fbfc8b52dbd3bf58d6 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 2 Mar 2019 23:57:57 -0800 Subject: Partially reworked ShaderResourceLayoutD3D11 --- .../include/ShaderResources.h | 11 +++ .../GraphicsEngineD3DBase/src/ShaderResources.cpp | 78 ++++++++++++++++++++++ 2 files changed, 89 insertions(+) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h index 97fe7490..64c8fe61 100644 --- a/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h +++ b/Graphics/GraphicsEngineD3DBase/include/ShaderResources.h @@ -62,6 +62,7 @@ #include "HashUtils.h" #include "StringPool.h" #include "D3DShaderResourceLoader.h" +#include "PipelineState.h" namespace Diligent { @@ -223,6 +224,10 @@ public: SamplerOrTexSRVId == Attribs.SamplerOrTexSRVId; } + SHADER_RESOURCE_VARIABLE_TYPE FindVariableType(SHADER_TYPE ShaderType, + const PipelineResourceLayoutDesc& ResourceLayoutDesc, + const char* CombinedSamplerSuffix)const; + size_t GetHash()const { return ComputeHash(BindPoint, BindCount, InputType, SRVDimension, SamplerOrTexSRVId); @@ -318,6 +323,12 @@ public: size_t GetHash()const; + D3DShaderResourceCounters CountResources(const PipelineResourceLayoutDesc& ResourceLayout, + SHADER_TYPE ShaderStage, + const char* CombinedSamplerSuffix, + const SHADER_RESOURCE_VARIABLE_TYPE* AllowedVarTypes, + Uint32 NumAllowedTypes)const noexcept; + protected: template