Skip to content

Commit 8f931b9

Browse files
committed
Merge branch 'expose_nabla_apis_rebased' into hlsl-compiler-impl
# Conflicts: # include/nbl/asset/utils/CHLSLCompiler.h
2 parents 86f8403 + 2eb79ee commit 8f931b9

File tree

13 files changed

+29
-37
lines changed

13 files changed

+29
-37
lines changed

include/nbl/asset/IAsset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class IAssetManager;
3939
@see IReferenceCounted
4040
*/
4141

42-
class NBL_API IAsset : virtual public core::IReferenceCounted
42+
class NBL_API2 IAsset : virtual public core::IReferenceCounted
4343
{
4444
public:
4545
enum E_MUTABILITY : uint32_t

include/nbl/asset/IAssetManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ std::function<void(SAssetBundle&)> makeAssetDisposeFunc(const IAssetManager* con
4545
@see IAsset
4646
4747
*/
48-
class NBL_API IAssetManager : public core::IReferenceCounted, public core::QuitSignalling
48+
class NBL_API2 IAssetManager : public core::IReferenceCounted, public core::QuitSignalling
4949
{
5050
// the point of those functions is that lambdas returned by them "inherits" friendship
5151
friend std::function<void(SAssetBundle&)> makeAssetGreetFunc(const IAssetManager* const _mgr);

include/nbl/asset/ICPUBuffer.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class NBL_API ICPUBuffer : public asset::IBuffer, public asset::IAsset
3333
}
3434

3535
//! Non-allocating constructor for CCustormAllocatorCPUBuffer derivative
36-
ICPUBuffer(size_t sizeInBytes, void* dat) : asset::IBuffer({dat ? sizeInBytes:0,EUF_TRANSFER_DST_BIT}), data(dat) {}
36+
ICPUBuffer(size_t sizeInBytes, void* dat) : asset::IBuffer({ dat ? sizeInBytes : 0,EUF_TRANSFER_DST_BIT }), data(dat) {}
3737
public:
3838
//! Constructor. TODO: remove, alloc can fail, should be a static create method instead!
3939
/** @param sizeInBytes Size in bytes. If `dat` argument is present, it denotes size of data pointed by `dat`, otherwise - size of data to be allocated.
@@ -56,7 +56,7 @@ class NBL_API ICPUBuffer : public asset::IBuffer, public asset::IAsset
5656
return cp;
5757
}
5858

59-
virtual void convertToDummyObject(uint32_t referenceLevelsBelowToConvert=0u) override
59+
virtual void convertToDummyObject(uint32_t referenceLevelsBelowToConvert = 0u) override
6060
{
6161
if (!canBeConvertedToDummy())
6262
return;
@@ -79,7 +79,7 @@ class NBL_API ICPUBuffer : public asset::IBuffer, public asset::IAsset
7979
virtual void* getPointer()
8080
{
8181
assert(!isImmutable_debug());
82-
return data;
82+
return data;
8383
}
8484

8585
bool canBeRestoredFrom(const IAsset* _other) const override
@@ -115,15 +115,15 @@ class NBL_API ICPUBuffer : public asset::IBuffer, public asset::IAsset
115115
if (willBeRestoredFrom(_other))
116116
std::swap(data, other->data);
117117
}
118-
118+
119119
void* data;
120-
};
120+
};
121121

122-
template<
123-
typename Allocator = _NBL_DEFAULT_ALLOCATOR_METATYPE<uint8_t>,
124-
bool = std::is_same<Allocator, core::null_allocator<typename Allocator::value_type> >::value
125-
>
126-
class NBL_API CCustomAllocatorCPUBuffer;
122+
template<
123+
typename Allocator = _NBL_DEFAULT_ALLOCATOR_METATYPE<uint8_t>,
124+
bool = std::is_same<Allocator, core::null_allocator<typename Allocator::value_type> >::value
125+
>
126+
class NBL_API CCustomAllocatorCPUBuffer;
127127

128128
using CDummyCPUBuffer = CCustomAllocatorCPUBuffer<core::null_allocator<uint8_t>, true>;
129129

@@ -133,11 +133,11 @@ using CDummyCPUBuffer = CCustomAllocatorCPUBuffer<core::null_allocator<uint8_t>,
133133
passing an object type for allocation and a pointer to allocated
134134
data for it's storage by ICPUBuffer.
135135
136-
So the need for the class existence is for common following tricks - among others creating an
137-
\bICPUBuffer\b over an already existing \bvoid*\b array without any \imemcpy\i or \itaking over the memory ownership\i.
138-
You can use it with a \bnull_allocator\b that adopts memory (it is a bit counter intuitive because \badopt = take\b ownership,
139-
but a \inull allocator\i doesn't do anything, even free the memory, so you're all good).
140-
*/
136+
So the need for the class existence is for common following tricks - among others creating an
137+
\bICPUBuffer\b over an already existing \bvoid*\b array without any \imemcpy\i or \itaking over the memory ownership\i.
138+
You can use it with a \bnull_allocator\b that adopts memory (it is a bit counter intuitive because \badopt = take\b ownership,
139+
but a \inull allocator\i doesn't do anything, even free the memory, so you're all good).
140+
*/
141141

142142
template<typename Allocator>
143143
class NBL_API CCustomAllocatorCPUBuffer<Allocator, true> : public ICPUBuffer

include/nbl/asset/filters/CBasicImageFilterCommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ class NBL_API CBasicImageFilterCommon
332332
}
333333

334334
protected:
335-
virtual ~CBasicImageFilterCommon() =0;
335+
virtual NBL_API2 ~CBasicImageFilterCommon() =0;
336336

337337
static inline bool validateSubresourceAndRange( const ICPUImage::SSubresourceLayers& subresource,
338338
const IImageFilter::IState::TexelRange& range,

include/nbl/asset/interchange/IAssetLoader.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class IMeshManipulator;
5858
@see IAssetWriter
5959
*/
6060

61-
class NBL_API IAssetLoader : public virtual core::IReferenceCounted
61+
class NBL_API2 IAssetLoader : public virtual core::IReferenceCounted
6262
{
6363
public:
6464
enum E_CACHING_FLAGS : uint64_t
@@ -171,15 +171,15 @@ class NBL_API IAssetLoader : public virtual core::IReferenceCounted
171171
}
172172

173173
//! Override class to facilitate changing how assets are loaded
174-
class IAssetLoaderOverride
174+
class IAssetLoaderOverride
175175
{
176176
protected:
177177
_NBL_STATIC_INLINE_CONSTEXPR IAsset::E_MUTABILITY ASSET_MUTABILITY_ON_CACHE_INSERT = IAsset::EM_MUTABLE;
178178

179179
IAssetManager* m_manager;
180180
system::ISystem* m_system;
181181
public:
182-
IAssetLoaderOverride(IAssetManager* _manager);
182+
NBL_API2 IAssetLoaderOverride(IAssetManager* _manager);
183183

184184
//!
185185
template<class AssetT>

include/nbl/asset/utils/CHLSLCompiler.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
#include "nbl/asset/utils/IShaderCompiler.h"
1010

1111
#include <wrl.h>
12+
#include <combaseapi.h>
13+
#include <dxc/dxc/include/dxc/dxcapi.h>
1214

1315
using Microsoft::WRL::ComPtr;
1416

15-
class IDxcUtils;
16-
class IDxcCompiler3;
17-
class DxcCompilationResult;
18-
1917
namespace nbl::asset
2018
{
2119

include/nbl/video/CVulkanSwapchain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CVulkanSwapchain final : public ISwapchain
2222
m_vkSwapchainKHR(swapchain), m_imgMemRequirements(std::move(imgMemRequirements))
2323
{}
2424

25-
static core::smart_refctd_ptr<CVulkanSwapchain> create(const core::smart_refctd_ptr<ILogicalDevice>&& logicalDevice, ISwapchain::SCreationParams&& params);
25+
NBL_API2 static core::smart_refctd_ptr<CVulkanSwapchain> create(const core::smart_refctd_ptr<ILogicalDevice>&& logicalDevice, ISwapchain::SCreationParams&& params);
2626

2727
~CVulkanSwapchain();
2828

include/nbl/video/IDeviceMemoryBacked.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace nbl::video
1111
{
1212
//! If you bound an "exotic" memory object to the resource, you might require "special" cleanups in the destructor
13-
struct ICleanup
13+
struct NBL_API2 ICleanup
1414
{
1515
virtual ~ICleanup() = 0;
1616
};

include/nbl/video/IGPUFence.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class NBL_API IGPUFence : public core::IReferenceCounted, public IBackendObject
3939
};
4040

4141

42-
class NBL_API GPUEventWrapper : public core::Uncopyable
42+
class NBL_API2 GPUEventWrapper : public core::Uncopyable
4343
{
4444
protected:
4545
ILogicalDevice* mDevice;

include/nbl/video/ILogicalDevice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace nbl::video
3737
class IDescriptorPool;
3838
class IPhysicalDevice;
3939

40-
class NBL_API ILogicalDevice : public core::IReferenceCounted, public IDeviceMemoryAllocator
40+
class NBL_API2 ILogicalDevice : public core::IReferenceCounted, public IDeviceMemoryAllocator
4141
{
4242
public:
4343
struct SQueueCreationParams

0 commit comments

Comments
 (0)