summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/CMakeLists.txt2
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.h42
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourceLayoutVk.h45
-rw-r--r--Graphics/GraphicsEngineVulkan/include/ShaderResourcesVk.h95
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp83
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderResourcesVk.cpp93
6 files changed, 34 insertions, 326 deletions
diff --git a/Graphics/GraphicsEngineVulkan/CMakeLists.txt b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
index b501730a..a1a4dfa6 100644
--- a/Graphics/GraphicsEngineVulkan/CMakeLists.txt
+++ b/Graphics/GraphicsEngineVulkan/CMakeLists.txt
@@ -24,7 +24,6 @@ set(INCLUDE
include/ShaderResourceBindingVkImpl.h
include/ShaderResourceCacheVk.h
include/ShaderResourceLayoutVk.h
- include/ShaderResourcesVk.h
include/SwapChainVkImpl.h
include/TextureVkImpl.h
include/TextureViewVkImpl.h
@@ -81,7 +80,6 @@ set(SRC
src/ShaderResourceBindingVkImpl.cpp
src/ShaderResourceCacheVk.cpp
src/ShaderResourceLayoutVk.cpp
- src/ShaderResourcesVk.cpp
src/SwapChainVkImpl.cpp
src/TextureVkImpl.cpp
src/TextureViewVkImpl.cpp
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.h b/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.h
index 07332660..f0709eb0 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceCacheVk.h
@@ -44,38 +44,17 @@
// Ns = m_NumSets
//
//
-// The cache is also assigned decriptor heap space to store shader visible descriptor handles (for non-dynamic resources).
+// For static and mutable variable types, the cache is also assigned decriptor set
//
//
-// DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV
-// | DescrptHndl[0] ... DescrptHndl[n-1] | DescrptHndl[0] ... DescrptHndl[m-1] |
-// A A
-// | |
-// | TableStartOffset | TableStartOffset
-// | |
-// | DescriptorSet[0] | DescriptorSet[1] | DescriptorSet[2] | .... | DescriptorSet[Nrt] |
-// | |
-// | TableStartOffset | InvalidDescriptorOffset
-// | |
-// V V
-// | DescrptHndl[0] ... DescrptHndl[n-1] | X
-// DESCRIPTOR_HEAP_TYPE_SAMPLER
+// | VkDescriptorSet |
+// A
+// |
+// |
+// | DescriptorSet[0] | DescriptorSet[1] |
//
//
-//
-// The allocation is inexed by the offset from the beginning of the root table
-// Each root table is assigned the space to store exactly m_NumResources resources
-// Dynamic resources are not assigned space in the descriptor heap allocation.
-//
-//
-//
-// | DescriptorSet[i] | Res[0] ... Res[n-1] |
-// \
-// TableStartOffset\____
-// \
-// V
-// ..... | DescrptHndl[0] ... DescrptHndl[n-1] | ....
-//
+// Dynamic resources are not VkDescriptorSet
#include "DescriptorHeap.h"
@@ -144,6 +123,12 @@ public:
inline Uint32 GetSize()const{return m_NumResources; }
+ VkDescriptorSet GetVkDescriptorSet()const
+ {
+ UNSUPPORTED("Not yet implemented");
+ return VK_NULL_HANDLE;
+ }
+
const Uint32 m_NumResources = 0;
private:
@@ -270,6 +255,7 @@ private:
// Allocation in a GPU-visible CBV/SRV/UAV descriptor heap
DescriptorHeapAllocation m_CbvSrvUavHeapSpace;
#endif
+
IMemoryAllocator *m_pAllocator=nullptr;
void *m_pMemory = nullptr;
Uint32 m_NumSets = 0;
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourceLayoutVk.h b/Graphics/GraphicsEngineVulkan/include/ShaderResourceLayoutVk.h
index 0238df8d..6e03dbbf 100644
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourceLayoutVk.h
+++ b/Graphics/GraphicsEngineVulkan/include/ShaderResourceLayoutVk.h
@@ -50,37 +50,34 @@
// references a sampler in ShaderResources, while VkResource::SamplerId references a sampler in ShaderResourceLayoutVk,
// and the two are not the same
//
-//
-// ________________SamplerId____________________
-// | |
-// _________________ ______________|_____________________________________________V________
-// | | unique_ptr | | | | | | |
-// | ShaderResources |--------------->| CBs | TexSRVs | TexUAVs | BufSRVs | BufUAVs | Samplers |
-// |_________________| |________|___________|___________|___________|___________|____________|
-// A A A A
-// | \ / \
-// |shared_ptr Ref Ref Ref
-// ________|__________________ ________\________________________/_________________________\_________________________________________
-// | | unique_ptr | | | | | | |
-// | ShaderResourceLayoutVk |--------------->| VkResource[0] | VkResource[1] | ... | Sampler[0] | Sampler[1] | ... |
-// |___________________________| |___________________|_________________|_______________|__________________|_________________|__________|
-// | | | A | /
-// | Raw ptr | |___________________SamplerId________________________| | /
-// | | / /
-// | \ / /
-// ________V_________________ ________V_______________________________________________________V____V__
+// ______________________ ________________________________________________________________________
+// | | unique_ptr | | | | | | | |
+// | SPIRVShaderResources |--------------->| UBs | SBs | StrgImgs | SmplImgs | ACs | SepImgs | SepSamplers |
+// |______________________| |________|_________|__________|__________|_______|_________|_____________|
+// A A A
+// | \ |
+// |shared_ptr Ref Ref
+// ________|__________________ ________\____________________|_____________________________________________
+// | | unique_ptr | | | | |
+// | ShaderResourceLayoutVk |--------------->| VkResource[0] | VkResource[1] | ... | VkResource[s+m+d-1] |
+// |___________________________| |___________________|_________________|_______________|_____________________|
+// | | |
+// | Raw ptr | |
+// | | /
+// | \ /
+// ________V_________________ ________V_______________________________________________________V_______
// | | | |
-// | ShaderResourceCacheVk |---------------->| Resources |
+// | ShaderResourceCacheVk |---------------->| Resources |
// |__________________________| |________________________________________________________________________|
//
-// Resources in the resource cache are identified by the root index and offset in the descriptor table
+// Resources in the resource cache are identified by the descriptor set index and the offset in from the set start
//
//
// ShaderResourceLayoutVk is used as follows:
// * Every pipeline state object (PipelineStateVkImpl) maintains shader resource layout for every active shader stage
// ** These resource layouts are not bound to a resource cache and are used as reference layouts for shader resource binding objects
// ** All variable types are preserved
-// ** Root indices and descriptor table offsets are assigned during the initialization
+// ** Bindings, descriptor sets and offsets are assigned during the initialization
// ** Resource cache is not assigned
// * Every shader object (ShaderVkImpl) contains shader resource layout that facilitates management of static shader resources
// ** The resource layout defines artificial layout and is bound to a resource cache that actually holds references to resources
@@ -90,7 +87,7 @@
// ** Resource layouts are initialized by clonning reference layouts from the pipeline state object and are bound to the resource
// cache that holds references to resources set by the application
// ** All shader variable types are clonned
-// ** Resource cache is assigned, but not initialized; Initialization is performed by the root signature
+// ** Resource cache is assigned, but not initialized; Initialization is performed by the pipeline layout object
//
#include <array>
@@ -102,10 +99,8 @@
#define USE_VARIABLE_HASH_MAP 0
-
#include "ShaderBase.h"
#include "HashUtils.h"
-#include "ShaderResourcesVk.h"
#include "ShaderResourceCacheVk.h"
#include "SPIRVShaderResources.h"
#include "VulkanUtilities/VulkanLogicalDevice.h"
diff --git a/Graphics/GraphicsEngineVulkan/include/ShaderResourcesVk.h b/Graphics/GraphicsEngineVulkan/include/ShaderResourcesVk.h
deleted file mode 100644
index cb1be120..00000000
--- a/Graphics/GraphicsEngineVulkan/include/ShaderResourcesVk.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* Copyright 2015-2018 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#pragma once
-
-/// \file
-/// Declaration of Diligent::ShaderResourcesD3D12 class
-
-// ShaderResourcesD3D12 are created by ShaderD3D12Impl instances. They are then referenced by ShaderResourceLayoutD3D12 objects, which are in turn
-// created by instances of PipelineStatesD3D12Impl and ShaderResourceBindingsD3D12Impl (and ShaderD3D12Impl too)
-//
-// _________________
-// | |
-// | ShaderD3D12Impl |
-// |_________________|
-// |
-// |shared_ptr
-// ________V_____________ _____________________________________________________________________
-// | | unique_ptr | | | | | | |
-// | ShaderResourcesD3D12 |--------------->| CBs | TexSRVs | TexUAVs | BufSRVs | BufUAVs | Samplers |
-// |______________________| |________|___________|___________|___________|___________|____________|
-// A A A A
-// | \ / \
-// |shared_ptr Ref Ref Ref
-// ________|__________________ ________\________________________/_________________________\_________________________________________
-// | | unique_ptr | | | | | | |
-// | ShaderResourceLayoutD3D12 |--------------->| SRV_CBV_UAV[0] | SRV_CBV_UAV[1] | ... | Sampler[0] | Sampler[1] | ... |
-// |___________________________| |___________________|_________________|_______________|__________________|_________________|__________|
-// A | A
-// | |___________________SamplerId________________________|
-// |
-// __________|_____________
-// | |
-// | PipelineStateD3D12Impl |
-// |________________________|
-//
-//
-// One ShaderResources instance can be referenced by multiple objects
-//
-//
-// ________________________ _<m_ShaderResourceLayouts>_ ____<m_pResourceLayouts>___ ________________________________
-// | | | | | | | |
-// | PipelineStateD3D12Impl |-------->| ShaderResourceLayoutD3D12 | ----| ShaderResourceLayoutD3D12 |<-----| ShaderResourceBindingD3D12Impl |
-// |________________________| |___________________________| | |___________________________| |________________________________|
-// | |
-// | shared_ptr |
-// _________________ ___________V__________ | ____<m_pResourceLayouts>___ ________________________________
-// | | shared_ptr | | shared_ptr| | | | |
-// | ShaderD3D12Impl |--------------->| ShaderResourcesD3D12 |<---------------| ShaderResourceLayoutD3D12 |<-----| ShaderResourceBindingD3D12Impl |
-// |_________________| |______________________| | |___________________________| |________________________________|
-// | A |
-// V | |
-// ____<m_StaticResLayout>____ | | ____<m_pResourceLayouts>___ ________________________________
-// | | shared_ptr | | | | | |
-// | ShaderResourceLayoutD3D12 |------------------- ----| ShaderResourceLayoutD3D12 |<-----| ShaderResourceBindingD3D12Impl |
-// |___________________________| |___________________________| |________________________________|
-//
-//
-
-#if 0
-#include "ShaderResources.h"
-
-namespace Diligent
-{
-
-/// Diligent::ShaderResources class
-class ShaderResourcesD3D12 : public ShaderResources
-{
-public:
- // Loads shader resources from the compiled shader bytecode
- ShaderResourcesD3D12(ID3DBlob *pShaderBytecode, const ShaderDesc &ShdrDesc);
-};
-
-}
-#endif \ No newline at end of file
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
index f1e81392..df7a981c 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineLayout.cpp
@@ -333,89 +333,6 @@ void PipelineLayout::Release(RenderDeviceVkImpl *pDeviceVkImpl)
}
#if 0
-static Vk_SHADER_VISIBILITY ShaderTypeInd2ShaderVisibilityMap[]
-{
- Vk_SHADER_VISIBILITY_VERTEX, // 0
- Vk_SHADER_VISIBILITY_PIXEL, // 1
- Vk_SHADER_VISIBILITY_GEOMETRY, // 2
- Vk_SHADER_VISIBILITY_HULL, // 3
- Vk_SHADER_VISIBILITY_DOMAIN, // 4
- Vk_SHADER_VISIBILITY_ALL // 5
-};
-Vk_SHADER_VISIBILITY GetShaderVisibility(SHADER_TYPE ShaderType)
-{
- auto ShaderInd = GetShaderTypeIndex(ShaderType);
- auto ShaderVisibility = ShaderTypeInd2ShaderVisibilityMap[ShaderInd];
-#ifdef _DEBUG
- switch (ShaderType)
- {
- case SHADER_TYPE_VERTEX: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_VERTEX); break;
- case SHADER_TYPE_PIXEL: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_PIXEL); break;
- case SHADER_TYPE_GEOMETRY: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_GEOMETRY); break;
- case SHADER_TYPE_HULL: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_HULL); break;
- case SHADER_TYPE_DOMAIN: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_DOMAIN); break;
- case SHADER_TYPE_COMPUTE: VERIFY_EXPR(ShaderVisibility == Vk_SHADER_VISIBILITY_ALL); break;
- default: LOG_ERROR("Unknown shader type (", ShaderType, ")"); break;
- }
-#endif
- return ShaderVisibility;
-}
-
-static SHADER_TYPE ShaderVisibility2ShaderTypeMap[] =
-{
- SHADER_TYPE_COMPUTE, // Vk_SHADER_VISIBILITY_ALL = 0
- SHADER_TYPE_VERTEX, // Vk_SHADER_VISIBILITY_VERTEX = 1
- SHADER_TYPE_HULL, // Vk_SHADER_VISIBILITY_HULL = 2
- SHADER_TYPE_DOMAIN, // Vk_SHADER_VISIBILITY_DOMAIN = 3
- SHADER_TYPE_GEOMETRY, // Vk_SHADER_VISIBILITY_GEOMETRY = 4
- SHADER_TYPE_PIXEL // Vk_SHADER_VISIBILITY_PIXEL = 5
-};
-SHADER_TYPE ShaderTypeFromShaderVisibility(Vk_SHADER_VISIBILITY ShaderVisibility)
-{
- VERIFY_EXPR(ShaderVisibility >= Vk_SHADER_VISIBILITY_ALL && ShaderVisibility <= Vk_SHADER_VISIBILITY_PIXEL );
- auto ShaderType = ShaderVisibility2ShaderTypeMap[ShaderVisibility];
-#ifdef _DEBUG
- switch (ShaderVisibility)
- {
- case Vk_SHADER_VISIBILITY_VERTEX: VERIFY_EXPR(ShaderType == SHADER_TYPE_VERTEX); break;
- case Vk_SHADER_VISIBILITY_PIXEL: VERIFY_EXPR(ShaderType == SHADER_TYPE_PIXEL); break;
- case Vk_SHADER_VISIBILITY_GEOMETRY: VERIFY_EXPR(ShaderType == SHADER_TYPE_GEOMETRY); break;
- case Vk_SHADER_VISIBILITY_HULL: VERIFY_EXPR(ShaderType == SHADER_TYPE_HULL); break;
- case Vk_SHADER_VISIBILITY_DOMAIN: VERIFY_EXPR(ShaderType == SHADER_TYPE_DOMAIN); break;
- case Vk_SHADER_VISIBILITY_ALL: VERIFY_EXPR(ShaderType == SHADER_TYPE_COMPUTE); break;
- default: LOG_ERROR("Unknown shader visibility (", ShaderVisibility, ")"); break;
- }
-#endif
- return ShaderType;
-}
-
-
-static Vk_DESCRIPTOR_HEAP_TYPE RangeType2HeapTypeMap[]
-{
- Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, //Vk_DESCRIPTOR_RANGE_TYPE_SRV = 0,
- Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, //Vk_DESCRIPTOR_RANGE_TYPE_UAV = ( Vk_DESCRIPTOR_RANGE_TYPE_SRV + 1 ) ,
- Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, //Vk_DESCRIPTOR_RANGE_TYPE_CBV = ( Vk_DESCRIPTOR_RANGE_TYPE_UAV + 1 ) ,
- Vk_DESCRIPTOR_HEAP_TYPE_SAMPLER //Vk_DESCRIPTOR_RANGE_TYPE_SAMPLER = ( Vk_DESCRIPTOR_RANGE_TYPE_CBV + 1 )
-};
-Vk_DESCRIPTOR_HEAP_TYPE HeapTypeFromRangeType(Vk_DESCRIPTOR_RANGE_TYPE RangeType)
-{
- VERIFY_EXPR(RangeType >= Vk_DESCRIPTOR_RANGE_TYPE_SRV && RangeType <= Vk_DESCRIPTOR_RANGE_TYPE_SAMPLER);
- auto HeapType = RangeType2HeapTypeMap[RangeType];
-
-#ifdef _DEBUG
- switch (RangeType)
- {
- case Vk_DESCRIPTOR_RANGE_TYPE_CBV: VERIFY_EXPR(HeapType == Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); break;
- case Vk_DESCRIPTOR_RANGE_TYPE_SRV: VERIFY_EXPR(HeapType == Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); break;
- case Vk_DESCRIPTOR_RANGE_TYPE_UAV: VERIFY_EXPR(HeapType == Vk_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV); break;
- case Vk_DESCRIPTOR_RANGE_TYPE_SAMPLER: VERIFY_EXPR(HeapType == Vk_DESCRIPTOR_HEAP_TYPE_SAMPLER); break;
- default: UNEXPECTED("Unexpected descriptor range type"); break;
- }
-#endif
- return HeapType;
-}
-
-
void PipelineLayout::InitStaticSampler(SHADER_TYPE ShaderType, const String &TextureName, const D3DShaderResourceAttribs &SamplerAttribs)
{
auto ShaderVisibility = GetShaderVisibility(ShaderType);
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourcesVk.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourcesVk.cpp
deleted file mode 100644
index 82548231..00000000
--- a/Graphics/GraphicsEngineVulkan/src/ShaderResourcesVk.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* Copyright 2015-2018 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#include "pch.h"
-
-#include "ShaderResourcesVk.h"
-//#include "ShaderD3DBase.h"
-#include "ShaderBase.h"
-//#include "D3DShaderResourceLoader.h"
-
-
-namespace Diligent
-{
-
-#if 0
-ShaderResourcesVk::ShaderResourcesVk(ID3DBlob *pShaderBytecode, const ShaderDesc &ShdrDesc) :
- ShaderResources(GetRawAllocator(), ShdrDesc.ShaderType)
-{
- Uint32 CurrCB = 0, CurrTexSRV = 0, CurrTexUAV = 0, CurrBufSRV = 0, CurrBufUAV = 0, CurrSampler = 0;
- LoadD3DShaderResources<Vk_SHADER_DESC, Vk_SHADER_INPUT_BIND_DESC, IVkShaderReflection>(
- pShaderBytecode,
-
- [&](Uint32 NumCBs, Uint32 NumTexSRVs, Uint32 NumTexUAVs, Uint32 NumBufSRVs, Uint32 NumBufUAVs, Uint32 NumSamplers)
- {
- Initialize(GetRawAllocator(), NumCBs, NumTexSRVs, NumTexUAVs, NumBufSRVs, NumBufUAVs, NumSamplers);
- },
-
- [&](D3DShaderResourceAttribs&& CBAttribs)
- {
- new (&GetCB(CurrCB++)) D3DShaderResourceAttribs(std::move(CBAttribs));
- },
-
- [&](D3DShaderResourceAttribs &&TexUAV)
- {
- new (&GetTexUAV(CurrTexUAV++)) D3DShaderResourceAttribs( std::move(TexUAV) );
- },
-
- [&](D3DShaderResourceAttribs &&BuffUAV)
- {
- new (&GetBufUAV(CurrBufUAV++)) D3DShaderResourceAttribs( std::move(BuffUAV) );
- },
-
- [&](D3DShaderResourceAttribs &&BuffSRV)
- {
- new (&GetBufSRV(CurrBufSRV++)) D3DShaderResourceAttribs( std::move(BuffSRV) );
- },
-
- [&](D3DShaderResourceAttribs &&SamplerAttribs)
- {
- new (&GetSampler(CurrSampler++)) D3DShaderResourceAttribs( std::move(SamplerAttribs) );
- },
-
- [&](D3DShaderResourceAttribs &&TexAttribs)
- {
- VERIFY(CurrSampler == GetNumSamplers(), "All samplers must be initialized before texture SRVs" );
-
- auto SamplerId = FindAssignedSamplerId(TexAttribs);
- new (&GetTexSRV(CurrTexSRV++)) D3DShaderResourceAttribs( std::move(TexAttribs), SamplerId);
- },
-
- ShdrDesc,
- D3DSamplerSuffix);
-
- VERIFY(CurrCB == GetNumCBs(), "Not all CBs are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called");
- VERIFY(CurrTexSRV == GetNumTexSRV(), "Not all Tex SRVs are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called" );
- VERIFY(CurrTexUAV == GetNumTexUAV(), "Not all Tex UAVs are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called" );
- VERIFY(CurrBufSRV == GetNumBufSRV(), "Not all Buf SRVs are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called" );
- VERIFY(CurrBufUAV == GetNumBufUAV(), "Not all Buf UAVs are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called" );
- VERIFY(CurrSampler == GetNumSamplers(), "Not all Samplers are initialized, which will result in a crash when ~D3DShaderResourceAttribs() is called" );
-}
-#endif
-
-}