Skip to content

Commit c47480b

Browse files
committed
Merge branch 'examples-fixes'
2 parents b0d9a01 + 5edab27 commit c47480b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

include/nbl/scene/CLevelOfDetailLibrary.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class NBL_API CLevelOfDetailLibrary : public ILevelOfDetailLibrary
6262

6363
//
6464
bufferParams.size = lodBufferSize;
65-
auto lodInfoBuffer = params.device->createBuffer(lodBufferSize);
65+
auto lodInfoBuffer = params.device->createBuffer(bufferParams);
6666
auto lodInfoMReqs = lodInfoBuffer->getMemoryReqs();
6767
lodInfoMReqs.memoryTypeBits &= deviceLocalMemTypeBits;
6868
params.device->allocate(lodInfoMReqs, lodInfoBuffer.get());

include/nbl/video/utilities/IGPUVirtualTexture.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class NBL_API IGPUVirtualTexture final : public asset::IVirtualTexture<IGPUImage
2020
static inline core::smart_refctd_ptr<IGPUCommandBuffer> createTransferCommandBuffer(ILogicalDevice* logicalDevice, IGPUQueue* queue)
2121
{
2222
const auto queueFamilyIndex = queue->getFamilyIndex();
23-
assert(logicalDevice->getPhysicalDevice()->getQueueFamilyProperties().begin()[queueFamilyIndex].queueFlags&IPhysicalDevice::EQF_TRANSFER_BIT);
23+
assert((logicalDevice->getPhysicalDevice()->getQueueFamilyProperties().begin()[queueFamilyIndex].queueFlags&IPhysicalDevice::EQF_TRANSFER_BIT).value);
2424
//now copy from CPU counterpart resources that can be shared (i.e. just copy state) between CPU and GPU
2525
//and convert to GPU those which can't be "shared": page table and VT resident storages along with their images and views
2626
core::smart_refctd_ptr<IGPUCommandBuffer> gpuCommandBuffer;
@@ -166,7 +166,8 @@ class NBL_API IGPUVirtualTexture final : public asset::IVirtualTexture<IGPUImage
166166
params.flags = static_cast<asset::IImage::E_CREATE_FLAGS>(0);
167167
// TODO: final layout should be readonly (if there's transfer necessary, then we start in transfer dst) and usage is shader sampled texture
168168

169-
image = m_logicalDevice->createDeviceLocalGPUImageOnDedMem(std::move(params));
169+
image = m_logicalDevice->createImage(std::move(params));
170+
m_logicalDevice->allocate(image->getMemoryReqs(), image.get());
170171
}
171172

172173
private:
@@ -316,7 +317,9 @@ class NBL_API IGPUVirtualTexture final : public asset::IVirtualTexture<IGPUImage
316317
}
317318
core::smart_refctd_ptr<IGPUImage> createPageTableImage(IGPUImage::SCreationParams&& _params) const override
318319
{
319-
return m_logicalDevice->createDeviceLocalGPUImageOnDedMem(std::move(_params));
320+
auto img = m_logicalDevice->createImage(std::move(_params));
321+
m_logicalDevice->allocate(img->getMemoryReqs(), img.get());
322+
return img;
320323
}
321324
core::smart_refctd_ptr<IGPUSampler> createSampler(const asset::ISampler::SParams& _params) const override
322325
{

0 commit comments

Comments
 (0)