Skip to content

Commit 2f178a5

Browse files
committed
GLTF loader extended, null SRV value supported, and descriptor table in EZ
1. GLTF loader extended for PBR textures. 2. Null SRV value mapping. 3. Descriptor table setting in EZ for hybrid DX11 and DX12 bindless styles.
1 parent bd4026c commit 2f178a5

9 files changed

Lines changed: 589 additions & 301 deletions

File tree

Optional/XUSGGltfLoader.cpp

Lines changed: 365 additions & 152 deletions
Large diffs are not rendered by default.

Optional/XUSGGltfLoader.h

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@
44

55
#pragma once
66

7+
#include <map>
8+
79
namespace XUSG
810
{
911
class GltfLoader
1012
{
1113
public:
14+
enum AlphaMode : uint8_t
15+
{
16+
ALPHA_OPAQUE,
17+
ALPHA_MASK,
18+
ALPHA_BLEND
19+
};
20+
1221
struct float2
1322
{
1423
float x;
1524
float y;
1625

1726
float2() = default;
18-
constexpr float2(float _x, float _y, float _z) : x(_x), y(_y) {}
27+
constexpr float2(float _x, float _y) : x(_x), y(_y) {}
1928
explicit float2(const float* pArray) : x(pArray[0]), y(pArray[1]) {}
2029
explicit float2(float v) : x(v), y(v) {}
2130

@@ -52,6 +61,25 @@ namespace XUSG
5261
float4& operator= (const float4& v) { x = v.x; y = v.y; z = v.z; w = v.w; return *this; }
5362
};
5463

64+
struct Texture
65+
{
66+
uint32_t Width;
67+
uint32_t Height;
68+
uint8_t Channels;
69+
std::vector<uint8_t> Data;
70+
};
71+
72+
struct Subset
73+
{
74+
uint32_t IndexOffset;
75+
uint32_t NumIndices;
76+
uint32_t BaseColorTexIdx;
77+
uint32_t NormalTexIdx;
78+
uint32_t MtlRghTexIdx;
79+
AlphaMode AlphaMode;
80+
float2 LightMapScl;
81+
};
82+
5583
struct LightSource
5684
{
5785
float4 Min;
@@ -68,14 +96,18 @@ namespace XUSG
6896
GltfLoader();
6997
virtual ~GltfLoader();
7098

71-
bool Import(const char* pszFilename, bool needNorm = true,
72-
bool needColor = true, bool needBound = true, bool forDX = true);
99+
bool Import(const char* pszFilename, bool needNorm = true, bool needColor = true,
100+
bool needBound = true, bool invertZ = true);
73101

74102
const uint32_t GetNumVertices() const;
75103
const uint32_t GetNumIndices() const;
104+
const uint32_t GetNumSubSets() const;
105+
const uint32_t GetNumTextures() const;
76106
const uint32_t GetVertexStride() const;
77107
const uint8_t* GetVertices() const;
78108
const uint32_t* GetIndices() const;
109+
const Subset* GetSubsets() const;
110+
const Texture* GetTextures() const;
79111

80112
const AABB& GetAABB() const;
81113

@@ -86,11 +118,13 @@ namespace XUSG
86118
void fillVertexScalars(uint32_t offset, uint32_t size, float scalar);
87119
void recomputeNormals();
88120
void computeAABB();
121+
void regenerateUV1(uint32_t vertexOffset, uint32_t texcoordCount, bool useInputMeshUvs);
89122

90123
uint8_t* getVertex(uint32_t i);
91124
float3& getPosition(uint32_t i);
92125
float3& getNormal(uint32_t i);
93-
float2& getTexcoord(uint32_t i);
126+
float4& getTexcoord(uint32_t i);
127+
float4& getTangent(uint32_t i);
94128
uint32_t& getVertexColor(uint32_t i);
95129
float& getVertexScalar(uint32_t i);
96130

@@ -100,12 +134,17 @@ namespace XUSG
100134

101135
std::vector<uint8_t> m_vertices;
102136
std::vector<uint32_t> m_indices;
137+
std::vector<Subset> m_subsets;
103138
std::vector<LightSource> m_lightSources;
104-
139+
140+
std::vector<Texture> m_textures;
141+
std::map<void*, uint32_t> m_texIndexMap;
142+
105143
uint32_t m_stride;
106144
uint32_t m_posOffset;
107145
uint32_t m_nrmOffset;
108146
uint32_t m_txcOffset;
147+
uint32_t m_tanOffset;
109148
uint32_t m_colorOffset;
110149
uint32_t m_scalarOffset;
111150

XUSG-EZ/XUSG-EZ.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ namespace XUSG
179179
uint32_t numSamplers, const SamplerPreset* pSamplerPresets) = 0;
180180
virtual void SetResources(Shader::Stage stage, DescriptorType descriptorType, uint32_t startBinding,
181181
uint32_t numResources, const ResourceView* pResourceViews, uint32_t space = 0) = 0;
182+
virtual void SetGraphicsDescriptorTable(Shader::Stage stage, DescriptorType descriptorType, const DescriptorTable& descriptorTable, uint32_t space) = 0;
183+
virtual void SetComputeDescriptorTable(DescriptorType descriptorType, const DescriptorTable& descriptorTable, uint32_t space) = 0;
182184
virtual void IASetPrimitiveTopology(PrimitiveTopology primitiveTopology) = 0;
183185
virtual void IASetIndexBuffer(const IndexBufferView& view) = 0;
184186
virtual void IASetVertexBuffers(uint32_t startSlot, uint32_t numViews, const VertexBufferView* pViews) = 0;
@@ -206,7 +208,6 @@ namespace XUSG
206208
virtual void BeginEvent(uint32_t metaData, const void* pData, uint32_t size) const = 0;
207209
virtual void EndEvent() = 0;
208210

209-
virtual void ResetDescriptorHeap(DescriptorHeapType type) = 0;
210211
virtual void Resize() = 0;
211212

212213
virtual void Blit(Texture* pDstResource, Texture* pSrcResource, SamplerPreset sampler,
@@ -221,6 +222,8 @@ namespace XUSG
221222
virtual const Graphics::Rasterizer* GetRasterizer(Graphics::RasterizerPreset preset) = 0;
222223
virtual const Graphics::DepthStencil* GetDepthStencil(Graphics::DepthStencilPreset preset) = 0;
223224

225+
virtual DescriptorTableLib* GetDescriptorTableLib() = 0;
226+
224227
virtual const XUSG::PipelineLayout& GetGraphicsPipelineLayout() const = 0;
225228
virtual const XUSG::PipelineLayout& GetComputePipelineLayout() const = 0;
226229

XUSG-EZ/XUSG-EZ_DX12.cpp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,19 @@ void EZ::CommandList_DX12::SetResources(Shader::Stage stage, DescriptorType desc
462462
setBarriers(numResources, pResourceViews);
463463
}
464464

465+
void EZ::CommandList_DX12::SetGraphicsDescriptorTable(Shader::Stage stage, DescriptorType descriptorType,
466+
const DescriptorTable& descriptorTable, uint32_t space)
467+
{
468+
XUSG::CommandList_DX12::SetGraphicsDescriptorTable(
469+
m_graphicsSpaceToParamIndexMap[stage][static_cast<uint32_t>(descriptorType)][space], descriptorTable);
470+
}
471+
472+
void EZ::CommandList_DX12::SetComputeDescriptorTable(DescriptorType descriptorType, const DescriptorTable& descriptorTable, uint32_t space)
473+
{
474+
XUSG::CommandList_DX12::SetGraphicsDescriptorTable(
475+
m_computeSpaceToParamIndexMap[static_cast<uint32_t>(descriptorType)][space], descriptorTable);
476+
}
477+
465478
void EZ::CommandList_DX12::IASetPrimitiveTopology(PrimitiveTopology primitiveTopology)
466479
{
467480
assert(m_graphicsState);
@@ -626,14 +639,9 @@ void EZ::CommandList_DX12::ClearUnorderedAccessViewFloat(const ResourceView& uno
626639
for (auto i = 0u; i < numRects; ++i) clearView.Rects[i] = pRects[i];
627640
}
628641

629-
void EZ::CommandList_DX12::ResetDescriptorHeap(DescriptorHeapType type)
630-
{
631-
m_descriptorTableLib->ResetDescriptorHeap(type);
632-
}
633-
634642
void EZ::CommandList_DX12::Resize()
635643
{
636-
ResetDescriptorHeap(DescriptorHeapType::CBV_SRV_UAV_HEAP);
644+
m_descriptorTableLib->ResetDescriptorHeap(CBV_SRV_UAV_HEAP);
637645
}
638646

639647
void EZ::CommandList_DX12::Blit(Texture* pDstResource, Texture* pSrcResource, SamplerPreset sampler,
@@ -771,6 +779,11 @@ const Graphics::DepthStencil* EZ::CommandList_DX12::GetDepthStencil(Graphics::De
771779
return m_graphicsPipelineLib->GetDepthStencil(preset);
772780
}
773781

782+
DescriptorTableLib* EZ::CommandList_DX12::GetDescriptorTableLib()
783+
{
784+
return m_descriptorTableLib.get();
785+
}
786+
774787
const PipelineLayout& EZ::CommandList_DX12::GetGraphicsPipelineLayout() const
775788
{
776789
return m_pipelineLayouts[GRAPHICS];

XUSG-EZ/XUSG-EZ_DX12.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ namespace XUSG
123123
void SetSamplerStates(Shader::Stage stage, uint32_t startBinding, uint32_t numSamplers, const SamplerPreset* pSamplerPresets);
124124
void SetResources(Shader::Stage stage, DescriptorType descriptorType, uint32_t startBinding,
125125
uint32_t numResources, const ResourceView* pResourceViews, uint32_t space = 0);
126+
void SetGraphicsDescriptorTable(Shader::Stage stage, DescriptorType descriptorType, const DescriptorTable& descriptorTable, uint32_t space);
127+
void SetComputeDescriptorTable(DescriptorType descriptorType, const DescriptorTable& descriptorTable, uint32_t space);
126128
void IASetPrimitiveTopology(PrimitiveTopology primitiveTopology);
127129
void IASetIndexBuffer(const IndexBufferView& view);
128130
void IASetVertexBuffers(uint32_t startSlot, uint32_t numViews, const VertexBufferView* pViews);
@@ -181,7 +183,6 @@ namespace XUSG
181183
void EndEvent() { XUSG::CommandList_DX12::EndEvent(); }
182184

183185
// For resize window
184-
void ResetDescriptorHeap(DescriptorHeapType type);
185186
void Resize();
186187

187188
void Blit(Texture* pDstResource, Texture* pSrcResource, SamplerPreset sampler,
@@ -196,6 +197,8 @@ namespace XUSG
196197
const Graphics::Rasterizer* GetRasterizer(Graphics::RasterizerPreset preset);
197198
const Graphics::DepthStencil* GetDepthStencil(Graphics::DepthStencilPreset preset);
198199

200+
DescriptorTableLib* GetDescriptorTableLib();
201+
199202
const XUSG::PipelineLayout& GetGraphicsPipelineLayout() const;
200203
const XUSG::PipelineLayout& GetComputePipelineLayout() const;
201204

XUSG/Core/XUSG.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,3 @@ uint8_t XUSG::CalculateMipLevels(uint64_t width, uint32_t height, uint32_t depth
395395
{
396396
return CalculateMipLevels(static_cast<uint32_t>(width), height, depth);
397397
}
398-
399-
uint32_t XUSG::CalcSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice)
400-
{
401-
return mipSlice + arraySlice * numMips + planeSlice * numMips * arraySize;
402-
}

XUSG/Core/XUSG.h

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ namespace XUSG
14601460
uint16_t arraySize = 1, ResourceFlag resourceFlags = ResourceFlag::NONE,
14611461
uint8_t numMips = 1, uint8_t sampleCount = 1, bool isCubeMap = false,
14621462
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
1463-
uint32_t maxThreads = 1) = 0;
1463+
uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
14641464
virtual bool Upload(CommandList* pCommandList, Resource* pUploader,
14651465
const SubresourceData* pSubresourceData, uint32_t numSubresources = 1,
14661466
ResourceState dstState = ResourceState::COMMON, uint32_t firstSubresource = 0,
@@ -1472,9 +1472,9 @@ namespace XUSG
14721472
uint32_t numSubresources = 1, uint32_t firstSubresource = 0, size_t offset = 0,
14731473
ResourceState dstState = ResourceState::COMMON, uint32_t threadIdx = 0) = 0;
14741474
virtual bool CreateSRVs(uint16_t arraySize, Format format = Format::UNKNOWN, uint8_t numMips = 1,
1475-
uint8_t sampleCount = 1, bool isCubeMap = false) = 0;
1475+
uint8_t sampleCount = 1, bool isCubeMap = false, uint8_t nullSrvValue = 0xff) = 0;
14761476
virtual bool CreateSRVLevels(uint16_t arraySize, uint8_t numMips, Format format = Format::UNKNOWN,
1477-
uint8_t sampleCount = 1, bool isCubeMap = false) = 0;
1477+
uint8_t sampleCount = 1, bool isCubeMap = false, uint8_t nullSrvValue = 0xff) = 0;
14781478
virtual bool CreateUAVs(uint16_t arraySize, Format format = Format::UNKNOWN, uint8_t numMips = 1,
14791479
std::vector<Descriptor>* pUavs = nullptr) = 0;
14801480

@@ -1543,13 +1543,13 @@ namespace XUSG
15431543
uint16_t arraySize = 1, ResourceFlag resourceFlags = ResourceFlag::NONE,
15441544
uint8_t numMips = 1, uint8_t sampleCount = 1, const float* pClearColor = nullptr,
15451545
bool isCubeMap = false, MemoryFlag memoryFlags = MemoryFlag::NONE,
1546-
const wchar_t* name = nullptr, uint32_t maxThreads = 1) = 0;
1546+
const wchar_t* name = nullptr, uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
15471547
// CreateArray() will create a single array RTV of n slices
15481548
virtual bool CreateArray(const Device* pDevice, uint32_t width, uint32_t height, uint16_t arraySize,
15491549
Format format, ResourceFlag resourceFlags = ResourceFlag::NONE, uint8_t numMips = 1,
15501550
uint8_t sampleCount = 1, const float* pClearColor = nullptr, bool isCubeMap = false,
15511551
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
1552-
uint32_t maxThreads = 1) = 0;
1552+
uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
15531553
virtual bool CreateFromSwapChain(const Device* pDevice, const SwapChain* pSwapChain,
15541554
uint32_t bufferIndex, uint32_t maxThreads = 1) = 0;
15551555

@@ -1593,12 +1593,12 @@ namespace XUSG
15931593
uint16_t arraySize = 1, uint8_t numMips = 1, uint8_t sampleCount = 1,
15941594
float clearDepth = 1.0f, uint8_t clearStencil = 0, bool isCubeMap = false,
15951595
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
1596-
uint32_t maxThreads = 1) = 0;
1596+
uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
15971597
virtual bool CreateArray(const Device* pDevice, uint32_t width, uint32_t height, uint16_t arraySize,
15981598
Format format = Format::UNKNOWN, ResourceFlag resourceFlags = ResourceFlag::NONE,
15991599
uint8_t numMips = 1, uint8_t sampleCount = 1, float clearDepth = 1.0f,
16001600
uint8_t clearStencil = 0, bool isCubeMap = false, MemoryFlag memoryFlags = MemoryFlag::NONE,
1601-
const wchar_t* name = nullptr, uint32_t maxThreads = 1) = 0;
1601+
const wchar_t* name = nullptr, uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
16021602

16031603
virtual const Descriptor& GetDSV(uint16_t slice = 0, uint8_t mipLevel = 0) const = 0;
16041604
virtual const Descriptor& GetReadOnlyDSV(uint16_t slice = 0, uint8_t mipLevel = 0) const = 0;
@@ -1624,9 +1624,9 @@ namespace XUSG
16241624
virtual bool Create(const Device* pDevice, uint32_t width, uint32_t height, uint16_t depth,
16251625
Format format, ResourceFlag resourceFlags = ResourceFlag::NONE, uint8_t numMips = 1,
16261626
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
1627-
uint32_t maxThreads = 1) = 0;
1628-
virtual bool CreateSRVs(Format format = Format::UNKNOWN, uint8_t numMips = 1) = 0;
1629-
virtual bool CreateSRVLevels(uint8_t numMips, Format format = Format::UNKNOWN) = 0;
1627+
uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
1628+
virtual bool CreateSRVs(Format format = Format::UNKNOWN, uint8_t numMips = 1, uint8_t nullSrvValue = 0xff) = 0;
1629+
virtual bool CreateSRVLevels(uint8_t numMips, Format format = Format::UNKNOWN, uint8_t nullSrvValue = 0xff) = 0;
16301630
virtual bool CreateUAVs(Format format = Format::UNKNOWN, uint8_t numMips = 1,
16311631
std::vector<Descriptor>* pUavs = nullptr) = 0;
16321632

@@ -1651,8 +1651,8 @@ namespace XUSG
16511651

16521652
virtual bool Create(const Device* pDevice, size_t byteWidth, ResourceFlag resourceFlags = ResourceFlag::NONE,
16531653
MemoryType memoryType = MemoryType::DEFAULT, uint32_t numSRVs = 1,
1654-
const uint32_t* firstSRVElements = nullptr, uint32_t numUAVs = 1,
1655-
const uint32_t* firstUAVElements = nullptr, MemoryFlag memoryFlags = MemoryFlag::NONE,
1654+
const uint32_t* firstSrvElements = nullptr, uint32_t numUAVs = 1,
1655+
const uint32_t* firstUavElements = nullptr, MemoryFlag memoryFlags = MemoryFlag::NONE,
16561656
const wchar_t* name = nullptr, uint32_t maxThreads = 1) = 0;
16571657
virtual bool Upload(CommandList* pCommandList, Resource* pUploader, const void* pData, size_t size,
16581658
size_t offset = 0, ResourceState dstState = ResourceState::COMMON, uint32_t threadIdx = 0) = 0;
@@ -1695,8 +1695,8 @@ namespace XUSG
16951695

16961696
virtual bool Create(const Device* pDevice, uint32_t numElements, uint32_t stride,
16971697
ResourceFlag resourceFlags = ResourceFlag::NONE, MemoryType memoryType = MemoryType::DEFAULT,
1698-
uint32_t numSRVs = 1, const uint32_t* firstSRVElements = nullptr,
1699-
uint32_t numUAVs = 1, const uint32_t* firstUAVElements = nullptr,
1698+
uint32_t numSRVs = 1, const uint32_t* firstSrvElements = nullptr,
1699+
uint32_t numUAVs = 1, const uint32_t* firstUavElements = nullptr,
17001700
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
17011701
const size_t* counterOffsetsInBytes = nullptr, uint32_t maxThreads = 1) = 0;
17021702

@@ -1728,16 +1728,15 @@ namespace XUSG
17281728

17291729
virtual bool Create(const Device* pDevice, uint32_t numElements, uint32_t stride, Format format,
17301730
ResourceFlag resourceFlags = ResourceFlag::NONE, MemoryType memoryType = MemoryType::DEFAULT,
1731-
uint32_t numSRVs = 1, const uint32_t* firstSRVElements = nullptr,
1732-
uint32_t numUAVs = 1, const uint32_t* firstUAVElements = nullptr,
1731+
uint32_t numSRVs = 1, const uint32_t* firstSrvElements = nullptr,
1732+
uint32_t numUAVs = 1, const uint32_t* firstUavElements = nullptr,
17331733
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr,
1734-
uint32_t maxThreads = 1) = 0;
1734+
uint8_t nullSrvValue = 0xff, uint32_t maxThreads = 1) = 0;
17351735

1736-
virtual bool CreateSRVs(uint32_t numElements, Format format, uint32_t stride,
1737-
const uint32_t* firstElements = nullptr, uint32_t numDescriptors = 1) = 0;
1738-
virtual bool CreateUAVs(uint32_t numElements, Format format, uint32_t stride,
1739-
const uint32_t* firstElements = nullptr, uint32_t numDescriptors = 1,
1740-
std::vector<Descriptor>* pUavs = nullptr) = 0;
1736+
virtual bool CreateSRVs(uint32_t numElements, Format format, uint32_t stride, const uint32_t* firstElements = nullptr,
1737+
uint32_t numDescriptors = 1, uint8_t nullSrvValue = 0xff) = 0;
1738+
virtual bool CreateUAVs(uint32_t numElements, Format format, uint32_t stride, const uint32_t* firstElements = nullptr,
1739+
uint32_t numDescriptors = 1, std::vector<Descriptor>* pUavs = nullptr) = 0;
17411740

17421741
virtual const Descriptor& GetPackedUAV(uint32_t index = 0) const = 0;
17431742

@@ -1761,14 +1760,14 @@ namespace XUSG
17611760
virtual bool Create(const Device* pDevice, uint32_t numVertices, uint32_t stride,
17621761
ResourceFlag resourceFlags = ResourceFlag::NONE, MemoryType memoryType = MemoryType::DEFAULT,
17631762
uint32_t numVBVs = 1, const uint32_t* firstVertices = nullptr,
1764-
uint32_t numSRVs = 1, const uint32_t* firstSRVElements = nullptr,
1765-
uint32_t numUAVs = 1, const uint32_t* firstUAVElements = nullptr,
1763+
uint32_t numSRVs = 1, const uint32_t* firstSrvElements = nullptr,
1764+
uint32_t numUAVs = 1, const uint32_t* firstUavElements = nullptr,
17661765
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr) = 0;
17671766
virtual bool CreateAsRaw(const Device* pDevice, uint32_t numVertices, uint32_t stride,
17681767
ResourceFlag resourceFlags = ResourceFlag::NONE, MemoryType memoryType = MemoryType::DEFAULT,
17691768
uint32_t numVBVs = 1, const uint32_t* firstVertices = nullptr,
1770-
uint32_t numSRVs = 1, const uint32_t* firstSRVElements = nullptr,
1771-
uint32_t numUAVs = 1, const uint32_t* firstUAVElements = nullptr,
1769+
uint32_t numSRVs = 1, const uint32_t* firstSrvElements = nullptr,
1770+
uint32_t numUAVs = 1, const uint32_t* firstUavElements = nullptr,
17721771
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr) = 0;
17731772

17741773
virtual const VertexBufferView& GetVBV(uint32_t index = 0) const = 0;
@@ -1794,8 +1793,8 @@ namespace XUSG
17941793
ResourceFlag resourceFlags = ResourceFlag::DENY_SHADER_RESOURCE,
17951794
MemoryType memoryType = MemoryType::DEFAULT,
17961795
uint32_t numIBVs = 1, const size_t* offsets = nullptr,
1797-
uint32_t numSRVs = 1, const uint32_t* firstSRVElements = nullptr,
1798-
uint32_t numUAVs = 1, const uint32_t* firstUAVElements = nullptr,
1796+
uint32_t numSRVs = 1, const uint32_t* firstSrvElements = nullptr,
1797+
uint32_t numUAVs = 1, const uint32_t* firstUavElements = nullptr,
17991798
MemoryFlag memoryFlags = MemoryFlag::NONE, const wchar_t* name = nullptr) = 0;
18001799

18011800
virtual const IndexBufferView& GetIBV(uint32_t index = 0) const = 0;
@@ -2323,6 +2322,4 @@ namespace XUSG
23232322
XUSG_INTERFACE uint8_t Log2(uint32_t value);
23242323
XUSG_INTERFACE uint8_t CalculateMipLevels(uint32_t width, uint32_t height, uint32_t depth = 1);
23252324
XUSG_INTERFACE uint8_t CalculateMipLevels(uint64_t width, uint32_t height, uint32_t depth = 1);
2326-
2327-
XUSG_INTERFACE uint32_t CalcSubresource(uint8_t mipSlice, uint8_t numMips, uint32_t arraySlice, uint32_t arraySize, uint8_t planeSlice);
23282325
}

0 commit comments

Comments
 (0)