Skip to content

Commit 2519b83

Browse files
add a layout_t to IDescriptorSet, and change the default float UTB count for VG
1 parent 2656b21 commit 2519b83

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

include/nbl/asset/IDescriptorSet.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class IDescriptorSet : public virtual core::IReferenceCounted
5757
using this_type = IDescriptorSet<LayoutType>;
5858

5959
public:
60+
using layout_t = LayoutType;
6061
struct SDescriptorInfo
6162
{
6263
struct SBufferInfo
@@ -66,7 +67,7 @@ class IDescriptorSet : public virtual core::IReferenceCounted
6667
};
6768
struct SImageInfo
6869
{
69-
core::smart_refctd_ptr<typename LayoutType::sampler_type> sampler;
70+
core::smart_refctd_ptr<typename layout_t::sampler_type> sampler;
7071
//! Irrelevant in OpenGL backend
7172
E_IMAGE_LAYOUT imageLayout;
7273
};
@@ -131,15 +132,15 @@ class IDescriptorSet : public virtual core::IReferenceCounted
131132
uint32_t count;
132133
};
133134

134-
const LayoutType* getLayout() const { return m_layout.get(); }
135+
const layout_t* getLayout() const { return m_layout.get(); }
135136

136137
protected:
137-
IDescriptorSet(core::smart_refctd_ptr<LayoutType>&& _layout) : m_layout(std::move(_layout))
138+
IDescriptorSet(core::smart_refctd_ptr<layout_t>&& _layout) : m_layout(std::move(_layout))
138139
{
139140
}
140141
virtual ~IDescriptorSet() = default;
141142

142-
core::smart_refctd_ptr<LayoutType> m_layout;
143+
core::smart_refctd_ptr<layout_t> m_layout;
143144
};
144145

145146

include/nbl/builtin/glsl/virtual_geometry/descriptors.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#endif
2121
#ifndef _NBL_VG_FLOAT_BUFFERS
2222
#define _NBL_VG_FLOAT_BUFFERS_BINDING 1
23-
#define _NBL_VG_FLOAT_BUFFERS_COUNT 15
23+
#define _NBL_VG_FLOAT_BUFFERS_COUNT 4
2424
#endif
2525
#ifndef _NBL_VG_INT_BUFFERS
2626
#define _NBL_VG_INT_BUFFERS_BINDING 2

0 commit comments

Comments
 (0)