Skip to content

Commit 1b3a341

Browse files
author
devsh
committed
Find the bug causing us to crash on mesh reload.
1 parent 13a835b commit 1b3a341

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

12_MeshLoaders/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "../3rdparty/portable-file-dialogs/portable-file-dialogs.h"
77

8-
#ifdef _NBL_COMPILE_WITH_MITSUBA_SERIALIZED_LOADER_
8+
#ifdef NBL_BUILD_MITSUBA_LOADER
99
#include "nbl/ext/MitsubaLoader/CSerializedLoader.h"
1010
#endif
1111

@@ -23,7 +23,7 @@ class MeshLoadersApp final : public MonoWindowApplication, public BuiltinResourc
2323
{
2424
if (!asset_base_t::onAppInitialized(smart_refctd_ptr(system)))
2525
return false;
26-
#ifdef _NBL_COMPILE_WITH_MITSUBA_SERIALIZED_LOADER_
26+
#ifdef NBL_BUILD_MITSUBA_LOADER
2727
m_assetMgr->addAssetLoader(make_smart_refctd_ptr<ext::MitsubaLoader::CSerializedLoader>());
2828
#endif
2929
if (!device_base_t::onAppInitialized(smart_refctd_ptr(system)))
@@ -218,9 +218,9 @@ class MeshLoadersApp final : public MonoWindowApplication, public BuiltinResourc
218218

219219
private:
220220
// TODO: standardise this across examples, and take from `argv`
221-
bool m_nonInteractiveTest = true;
221+
bool m_nonInteractiveTest = false;
222222

223-
inline bool reloadModel()
223+
bool reloadModel()
224224
{
225225
if (m_nonInteractiveTest) // TODO: maybe also take from argv and argc
226226
m_modelPath = (sharedInputCWD/"ply/Spanner-ply.ply").string();

common/include/nbl/examples/geometry/SPushConstants.hlsl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ struct SInstanceMatrices
2222

2323
struct SPushConstants
2424
{
25-
NBL_CONSTEXPR_STATIC_INLINE uint32_t DescriptorCount = 255;
25+
NBL_CONSTEXPR_STATIC_INLINE uint32_t DescriptorCount = (0x1<<16)-1;
2626

2727
SInstanceMatrices matrices;
28-
uint32_t positionView : 11;
29-
uint32_t normalView : 10;
30-
uint32_t uvView : 11;
28+
uint32_t positionView : 16;
29+
uint32_t normalView : 16;
3130
};
3231

3332
}

0 commit comments

Comments
 (0)