Skip to content

Commit dbfbb1a

Browse files
committed
Fix IGPUVirtualTexture for new buffer API
1 parent 7085043 commit dbfbb1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/nbl/video/utilities/IGPUVirtualTexture.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,14 @@ class NBL_API IGPUVirtualTexture final : public asset::IVirtualTexture<IGPUImage
4141
{
4242
core::smart_refctd_ptr<IGPUImage> gpuImage;
4343
{
44-
auto cpuImageParams = _cpuimg->getCreationParameters();
44+
IGPUImage::SCreationParams cpuImageParams;
45+
cpuImageParams = _cpuimg->getCreationParameters();
4546
cpuImageParams.initialLayout = asset::IImage::EL_TRANSFER_DST_OPTIMAL;
4647

4748
// TODO: Look at issue #167 on Nabla repo, at some point
4849
IGPUBuffer::SCreationParams bufferCreationParams = {};
4950
bufferCreationParams.size = _cpuimg->getBuffer()->getSize();
50-
auto gpuTexelBuffer = logicalDevice->createBuffer(bufferCreationParams);
51+
auto gpuTexelBuffer = logicalDevice->createBuffer(std::move(bufferCreationParams));
5152
auto mreqs = gpuTexelBuffer->getMemoryReqs();
5253
mreqs.memoryTypeBits &= logicalDevice->getPhysicalDevice()->getDeviceLocalMemoryTypeBits();
5354
auto gpubufMem = logicalDevice->allocate(mreqs, gpuTexelBuffer.get());

0 commit comments

Comments
 (0)