Skip to content

Commit c98276d

Browse files
committed
Ported example 21
1 parent dedfb20 commit c98276d

File tree

2 files changed

+88
-118
lines changed

2 files changed

+88
-118
lines changed

examples_tests/21.DynamicTextureIndexing/main.cpp

Lines changed: 77 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,17 @@ class DynamicTextureIndexingApp : public ApplicationBase
4444
nbl::core::smart_refctd_ptr<nbl::video::IUtilities> utilities;
4545
nbl::core::smart_refctd_ptr<nbl::video::ILogicalDevice> logicalDevice;
4646
nbl::video::IPhysicalDevice* gpuPhysicalDevice;
47-
std::array<nbl::video::IGPUQueue*, CommonAPI::InitOutput<SC_IMG_COUNT>::EQT_COUNT> queues = { nullptr, nullptr, nullptr, nullptr };
47+
std::array<nbl::video::IGPUQueue*, CommonAPI::InitOutput::MaxQueuesCount> queues = { nullptr, nullptr, nullptr, nullptr };
4848
nbl::core::smart_refctd_ptr<nbl::video::ISwapchain> swapchain;
4949
nbl::core::smart_refctd_ptr<nbl::video::IGPURenderpass> renderpass;
50-
std::array<nbl::core::smart_refctd_ptr<nbl::video::IGPUFramebuffer>, SC_IMG_COUNT> fbo;
51-
nbl::core::smart_refctd_ptr<nbl::video::IGPUCommandPool> commandPool;
50+
std::array<nbl::core::smart_refctd_ptr<nbl::video::IGPUFramebuffer>, CommonAPI::InitOutput::MaxSwapChainImageCount> fbo;
51+
std::array<nbl::core::smart_refctd_ptr<nbl::video::IGPUCommandPool>, CommonAPI::InitOutput::MaxQueuesCount> commandPools;
5252
nbl::core::smart_refctd_ptr<nbl::system::ISystem> system;
5353
nbl::core::smart_refctd_ptr<nbl::asset::IAssetManager> assetManager;
5454
nbl::video::IGPUObjectFromAssetConverter::SParams cpu2gpuParams;
5555
nbl::core::smart_refctd_ptr<nbl::system::ILogger> logger;
5656
nbl::core::smart_refctd_ptr<CommonAPI::InputSystem> inputSystem;
57-
58-
nbl::core::smart_refctd_ptr<video::IGPUFence> gpuTransferFence;
59-
nbl::core::smart_refctd_ptr<video::IGPUFence> gpuComputeFence;
57+
6058
nbl::video::IGPUObjectFromAssetConverter cpu2gpu;
6159

6260
asset::ICPUMesh* meshRaw = nullptr;
@@ -70,8 +68,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
7068
using GpuDescriptoSetPair = std::pair<core::smart_refctd_ptr<IGPUDescriptorSet>, core::smart_refctd_ptr<IGPUDescriptorSet>>;
7169
core::vector<GpuDescriptoSetPair> desc;
7270

73-
CommonAPI::InputSystem::ChannelReader<IMouseEventChannel> mouse;
74-
CommonAPI::InputSystem::ChannelReader<IKeyboardEventChannel> keyboard;
71+
CommonAPI::InputSystem::ChannelReader<ui::IMouseEventChannel> mouse;
72+
CommonAPI::InputSystem::ChannelReader<ui::IKeyboardEventChannel> keyboard;
7573
Camera camera = Camera(vectorSIMDf(0, 0, 0), vectorSIMDf(0, 0, 0), matrix4SIMD());
7674

7775
core::smart_refctd_ptr<video::IDescriptorPool> descriptorPool;
@@ -126,22 +124,68 @@ class DynamicTextureIndexingApp : public ApplicationBase
126124
{
127125
window = std::move(wnd);
128126
}
127+
nbl::ui::IWindow* getWindow() override
128+
{
129+
return window.get();
130+
}
129131
void setSystem(core::smart_refctd_ptr<nbl::system::ISystem>&& s) override
130132
{
131133
system = std::move(s);
132134
}
133-
nbl::ui::IWindow* getWindow() override
135+
video::IAPIConnection* getAPIConnection() override
134136
{
135-
return window.get();
137+
return gl.get();
138+
}
139+
video::ILogicalDevice* getLogicalDevice() override
140+
{
141+
return logicalDevice.get();
142+
}
143+
video::IGPURenderpass* getRenderpass() override
144+
{
145+
return renderpass.get();
146+
}
147+
void setSurface(core::smart_refctd_ptr<video::ISurface>&& s) override
148+
{
149+
surface = std::move(s);
150+
}
151+
void setFBOs(std::vector<core::smart_refctd_ptr<video::IGPUFramebuffer>>& f) override
152+
{
153+
for (int i = 0; i < f.size(); i++)
154+
{
155+
fbo[i] = core::smart_refctd_ptr(f[i]);
156+
}
157+
}
158+
void setSwapchain(core::smart_refctd_ptr<video::ISwapchain>&& s) override
159+
{
160+
swapchain = std::move(s);
161+
}
162+
uint32_t getSwapchainImageCount() override
163+
{
164+
return SC_IMG_COUNT;
165+
}
166+
virtual nbl::asset::E_FORMAT getDepthFormat() override
167+
{
168+
return nbl::asset::EF_D32_SFLOAT;
136169
}
137170

138171
APP_CONSTRUCTOR(DynamicTextureIndexingApp)
139172

140173
void onAppInitialized_impl() override
141174
{
142-
CommonAPI::InitOutput<SC_IMG_COUNT> initOutput;
175+
const auto swapchainImageUsage = static_cast<asset::IImage::E_USAGE_FLAGS>(asset::IImage::EUF_COLOR_ATTACHMENT_BIT | asset::IImage::EUF_STORAGE_BIT);
176+
const video::ISurface::SFormat surfaceFormat(asset::EF_B8G8R8A8_UNORM, asset::ECP_COUNT, asset::EOTF_UNKNOWN);
177+
178+
CommonAPI::InitOutput initOutput;
143179
initOutput.window = core::smart_refctd_ptr(window);
144-
CommonAPI::Init<WIN_W, WIN_H, SC_IMG_COUNT>(initOutput, video::EAT_OPENGL, "DynamicTextureIndexingApp", nbl::asset::EF_D32_SFLOAT);
180+
CommonAPI::InitWithDefaultExt(
181+
initOutput,
182+
video::EAT_OPENGL,
183+
"DynamicTextureIndexing",
184+
WIN_W, WIN_H, SC_IMG_COUNT,
185+
swapchainImageUsage,
186+
surfaceFormat,
187+
nbl::asset::EF_D32_SFLOAT);
188+
145189
window = std::move(initOutput.window);
146190
windowCb = std::move(initOutput.windowCb);
147191
gl = std::move(initOutput.apiConnection);
@@ -153,7 +197,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
153197
swapchain = std::move(initOutput.swapchain);
154198
renderpass = std::move(initOutput.renderpass);
155199
fbo = std::move(initOutput.fbo);
156-
commandPool = std::move(initOutput.commandPool);
200+
commandPools = std::move(initOutput.commandPools);
157201
system = std::move(initOutput.system);
158202
assetManager = std::move(initOutput.assetManager);
159203
cpu2gpuParams = std::move(initOutput.cpu2gpuParams);
@@ -162,15 +206,6 @@ class DynamicTextureIndexingApp : public ApplicationBase
162206

163207
descriptorPool = createDescriptorPool(1u);
164208

165-
gpuTransferFence = logicalDevice->createFence(static_cast<video::IGPUFence::E_CREATE_FLAGS>(0));
166-
gpuComputeFence = logicalDevice->createFence(static_cast<video::IGPUFence::E_CREATE_FLAGS>(0));
167-
168-
nbl::video::IGPUObjectFromAssetConverter cpu2gpu;
169-
{
170-
cpu2gpuParams.perQueue[nbl::video::IGPUObjectFromAssetConverter::EQU_TRANSFER].fence = &gpuTransferFence;
171-
cpu2gpuParams.perQueue[nbl::video::IGPUObjectFromAssetConverter::EQU_COMPUTE].fence = &gpuComputeFence;
172-
}
173-
174209
{
175210
auto* quantNormalCache = assetManager->getMeshManipulator()->getQuantNormalCache();
176211
quantNormalCache->loadCacheFromFile<asset::EF_A2B10G10R10_SNORM_PACK32>(system.get(), "../../tmp/normalCache101010.sse");
@@ -199,7 +234,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
199234
//divide mesh buffers into sets, where sum of textures used by meshes in one set is <= 16
200235
struct MBRangeTexturesPair
201236
{
202-
core::SRange<void, core::vector<ICPUMeshBuffer*>::iterator> mbRanges;
237+
core::SRange<core::vector<ICPUMeshBuffer*>::iterator, core::vector<ICPUMeshBuffer*>::iterator> mbRanges;
203238
core::unordered_map<ICPUImageView*, uint32_t> textures;
204239
};
205240

@@ -314,14 +349,14 @@ class DynamicTextureIndexingApp : public ApplicationBase
314349
assert(pmbData.mdiParameterCount == meshBuffersInRangeCnt);
315350

316351
//create draw call inputs
317-
mdiCallParams[i].indexBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput<SC_IMG_COUNT>::EQT_TRANSFER_UP], packedMeshBuffer[i].indexBuffer.buffer->getSize(), packedMeshBuffer[i].indexBuffer.buffer->getPointer());
352+
mdiCallParams[i].indexBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], packedMeshBuffer[i].indexBuffer.buffer->getSize(), packedMeshBuffer[i].indexBuffer.buffer->getPointer());
318353

319354
auto& cpuVtxBuff = packedMeshBuffer[i].vertexBufferBindings[0].buffer;
320355

321-
gpuIndirectDrawBuffer[i] = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput<SC_IMG_COUNT>::EQT_TRANSFER_UP], sizeof(CustomIndirectCommand) * pmbData.mdiParameterCount, packedMeshBuffer[i].MDIDataBuffer->getPointer());
356+
gpuIndirectDrawBuffer[i] = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], sizeof(CustomIndirectCommand) * pmbData.mdiParameterCount, packedMeshBuffer[i].MDIDataBuffer->getPointer());
322357
mdiCallParams[i].indirectDrawBuff = core::smart_refctd_ptr(gpuIndirectDrawBuffer[i]);
323358

324-
auto gpuVtxBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput<SC_IMG_COUNT>::EQT_TRANSFER_UP], cpuVtxBuff->getSize(), cpuVtxBuff->getPointer());
359+
auto gpuVtxBuff = utilities->createFilledDeviceLocalGPUBufferOnDedMem(queues[CommonAPI::InitOutput::EQT_TRANSFER_UP], cpuVtxBuff->getSize(), cpuVtxBuff->getPointer());
325360

326361
for (uint32_t j = 0u; j < video::IGPUMeshBuffer::MAX_ATTR_BUF_BINDING_COUNT; j++)
327362
{
@@ -352,7 +387,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
352387
sp.MaxFilter = ISampler::E_TEXTURE_FILTER::ETF_LINEAR;
353388
auto sampler = logicalDevice->createGPUSampler(sp);
354389
{
355-
asset::SPushConstantRange range[1] = { asset::ISpecializedShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD) };
390+
asset::SPushConstantRange range[1] = { asset::IShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD) };
356391

357392
core::smart_refctd_ptr<IGPUSampler> samplerArray[16u] = { nullptr };
358393
for (uint32_t i = 0u; i < 16u; i++)
@@ -364,7 +399,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
364399
b[0].binding = 1u;
365400
b[0].count = 16u;
366401
b[0].type = EDT_COMBINED_IMAGE_SAMPLER;
367-
b[0].stageFlags = ISpecializedShader::ESS_FRAGMENT;
402+
b[0].stageFlags = IShader::ESS_FRAGMENT;
368403
b[0].samplers = samplerArray;
369404

370405
ds0layout = logicalDevice->createGPUDescriptorSetLayout(b, b + 1);
@@ -374,7 +409,7 @@ class DynamicTextureIndexingApp : public ApplicationBase
374409
b[0].binding = 0u;
375410
b[0].count = 1u;
376411
b[0].type = EDT_STORAGE_BUFFER;
377-
b[0].stageFlags = ISpecializedShader::ESS_FRAGMENT;
412+
b[0].stageFlags = IShader::ESS_FRAGMENT;
378413

379414
ds1layout = logicalDevice->createGPUDescriptorSetLayout(b, b + 1);
380415
}
@@ -384,7 +419,9 @@ class DynamicTextureIndexingApp : public ApplicationBase
384419
IGPUSpecializedShader* shaders[2] = { gpuShaders->operator[](0).get(), gpuShaders->operator[](1).get() };
385420

386421
gpuPipelineLayout = logicalDevice->createGPUPipelineLayout(range, range + 1, core::smart_refctd_ptr(ds0layout), core::smart_refctd_ptr(ds1layout));
387-
gpuPipeline = logicalDevice->createGPURenderpassIndependentPipeline(nullptr, core::smart_refctd_ptr(gpuPipelineLayout), shaders, shaders + 2u, packedMeshBuffer[0].vertexInputParams, asset::SBlendParams(), asset::SPrimitiveAssemblyParams(), SRasterizationParams());
422+
asset::SRasterizationParams rp;
423+
424+
gpuPipeline = logicalDevice->createGPURenderpassIndependentPipeline(nullptr, core::smart_refctd_ptr(gpuPipelineLayout), shaders, shaders + 2u, packedMeshBuffer[0].vertexInputParams, asset::SBlendParams(), asset::SPrimitiveAssemblyParams(), rp);
388425

389426
nbl::video::IGPUGraphicsPipeline::SCreationParams graphicsPipelineParams;
390427
graphicsPipelineParams.renderpassIndependent = core::smart_refctd_ptr<nbl::video::IGPURenderpassIndependentPipeline>(const_cast<video::IGPURenderpassIndependentPipeline*>(gpuPipeline.get()));
@@ -449,15 +486,15 @@ class DynamicTextureIndexingApp : public ApplicationBase
449486
}
450487

451488
core::vectorSIMDf cameraPosition(-4, 0, 0);
452-
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 1000);
453-
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 10.f, 1.f);
489+
matrix4SIMD projectionMatrix = matrix4SIMD::buildProjectionMatrixPerspectiveFovLH(core::radians(60.0f), float(WIN_W) / WIN_H, 0.1, 100000);
490+
camera = Camera(cameraPosition, core::vectorSIMDf(0, 0, 0), projectionMatrix, 1.f, 1.f);
454491

455492
uint64_t lastFPSTime = 0;
456493

457494
for (size_t i = 0ull; i < NBL_FRAMES_TO_AVERAGE; ++i)
458495
dtList[i] = 0.0;
459496

460-
logicalDevice->createCommandBuffers(commandPool.get(), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
497+
logicalDevice->createCommandBuffers(commandPools[CommonAPI::InitOutput::EQT_GRAPHICS].get(), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
461498

462499
for (uint32_t i = 0u; i < FRAMES_IN_FLIGHT; i++)
463500
{
@@ -513,8 +550,8 @@ class DynamicTextureIndexingApp : public ApplicationBase
513550
inputSystem->getDefaultKeyboard(&keyboard);
514551

515552
camera.beginInputProcessing(nextPresentationTimeStamp);
516-
mouse.consumeEvents([&](const IMouseEventChannel::range_t& events) -> void { camera.mouseProcess(events); }, logger.get());
517-
keyboard.consumeEvents([&](const IKeyboardEventChannel::range_t& events) -> void { camera.keyboardProcess(events); }, logger.get());
553+
mouse.consumeEvents([&](const ui::IMouseEventChannel::range_t& events) -> void { camera.mouseProcess(events); }, logger.get());
554+
keyboard.consumeEvents([&](const ui::IKeyboardEventChannel::range_t& events) -> void { camera.keyboardProcess(events); }, logger.get());
518555
camera.endInputProcessing(nextPresentationTimeStamp);
519556

520557
const auto& viewMatrix = camera.getViewMatrix();
@@ -564,76 +601,29 @@ class DynamicTextureIndexingApp : public ApplicationBase
564601

565602
for (uint32_t i = 0u; i < mdiCallParams.size(); i++)
566603
{
567-
commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuPipeline->getLayout(), 0u, 2u, &desc[i].first.get(), nullptr);
604+
commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuPipeline->getLayout(), 0u, 2u, &desc[i].first.get(), 0u);
568605
commandBuffer->bindIndexBuffer(mdiCallParams[i].indexBuff.get(), 0ull, mdiCallParams[i].indexType);
569606
commandBuffer->bindVertexBuffers(0u, 1u, mdiCallParams[i].vtxBindingsBuffers, &mdiCallParams[i].vtxBindingsOffsets[0]);
570607
commandBuffer->bindVertexBuffers(2u, 1u, mdiCallParams[i].vtxBindingsBuffers, &mdiCallParams[i].vtxBindingsOffsets[2]);
571608
commandBuffer->bindVertexBuffers(3u, 1u, mdiCallParams[i].vtxBindingsBuffers, &mdiCallParams[i].vtxBindingsOffsets[3]);
572-
commandBuffer->pushConstants(gpuPipeline->getLayout(), video::IGPUSpecializedShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD), camera.getConcatenatedMatrix().pointer());
609+
commandBuffer->pushConstants(gpuPipeline->getLayout(), video::IGPUShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD), camera.getConcatenatedMatrix().pointer());
573610

574611
commandBuffer->drawIndexedIndirect(mdiCallParams[i].indirectDrawBuff.get(), mdiCallParams[i].offset, mdiCallParams[i].maxCount, mdiCallParams[i].stride);
575612
}
576613

577-
/*core::vector<uint8_t> uboData(gpuubo->getSize());
578-
for (const auto& shdrIn : pipelineMetadata->m_inputSemantics)
579-
{
580-
if (shdrIn.descriptorSection.type == asset::IRenderpassIndependentPipelineMetadata::ShaderInput::ET_UNIFORM_BUFFER && shdrIn.descriptorSection.uniformBufferObject.set == 1u && shdrIn.descriptorSection.uniformBufferObject.binding == ds1UboBinding)
581-
{
582-
switch (shdrIn.type)
583-
{
584-
case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW_PROJ:
585-
{
586-
memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, mvp.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
587-
} break;
588-
589-
case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW:
590-
{
591-
memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, viewMatrix.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
592-
} break;
593-
594-
case asset::IRenderpassIndependentPipelineMetadata::ECSI_WORLD_VIEW_INVERSE_TRANSPOSE:
595-
{
596-
memcpy(uboData.data() + shdrIn.descriptorSection.uniformBufferObject.relByteoffset, viewMatrix.pointer(), shdrIn.descriptorSection.uniformBufferObject.bytesize);
597-
} break;
598-
}
599-
}
600-
}
601-
602-
commandBuffer->updateBuffer(gpuubo.get(), 0ull, gpuubo->getSize(), uboData.data());
603-
604-
for (size_t i = 0; i < gpumesh->getMeshBuffers().size(); ++i)
605-
{
606-
auto gpuMeshBuffer = gpumesh->getMeshBuffers().begin()[i];
607-
auto gpuGraphicsPipeline = gpuPipelines[reinterpret_cast<RENDERPASS_INDEPENDENT_PIPELINE_ADRESS>(gpuMeshBuffer->getPipeline())];
608-
609-
const video::IGPURenderpassIndependentPipeline* gpuRenderpassIndependentPipeline = gpuMeshBuffer->getPipeline();
610-
const video::IGPUDescriptorSet* ds3 = gpuMeshBuffer->getAttachedDescriptorSet();
611-
612-
commandBuffer->bindGraphicsPipeline(gpuGraphicsPipeline.get());
613-
614-
const video::IGPUDescriptorSet* gpuds1_ptr = gpuds1.get();
615-
commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuRenderpassIndependentPipeline->getLayout(), 1u, 1u, &gpuds1_ptr, nullptr);
616-
const video::IGPUDescriptorSet* gpuds3_ptr = gpuMeshBuffer->getAttachedDescriptorSet();
617-
if (gpuds3_ptr)
618-
commandBuffer->bindDescriptorSets(asset::EPBP_GRAPHICS, gpuRenderpassIndependentPipeline->getLayout(), 3u, 1u, &gpuds3_ptr, nullptr);
619-
commandBuffer->pushConstants(gpuRenderpassIndependentPipeline->getLayout(), video::IGPUSpecializedShader::ESS_FRAGMENT, 0u, gpuMeshBuffer->MAX_PUSH_CONSTANT_BYTESIZE, gpuMeshBuffer->getPushConstantsDataPtr());
620-
621-
commandBuffer->drawMeshBuffer(gpuMeshBuffer);
622-
}*/
623-
624614
commandBuffer->endRenderPass();
625615
commandBuffer->end();
626616

627617
CommonAPI::Submit(logicalDevice.get(),
628618
swapchain.get(),
629619
commandBuffer.get(),
630-
queues[CommonAPI::InitOutput<1>::EQT_GRAPHICS],
620+
queues[CommonAPI::InitOutput::EQT_GRAPHICS],
631621
imageAcquire[resourceIx].get(),
632622
renderFinished[resourceIx].get(),
633623
fence.get());
634624
CommonAPI::Present(logicalDevice.get(),
635625
swapchain.get(),
636-
queues[CommonAPI::InitOutput<1>::EQT_GRAPHICS], renderFinished[resourceIx].get(), acquiredNextFBO);
626+
queues[CommonAPI::InitOutput::EQT_GRAPHICS], renderFinished[resourceIx].get(), acquiredNextFBO);
637627
}
638628

639629
bool keepRunning() override
@@ -642,24 +632,4 @@ class DynamicTextureIndexingApp : public ApplicationBase
642632
}
643633
};
644634

645-
NBL_COMMON_API_MAIN(DynamicTextureIndexingApp, DynamicTextureIndexingApp::Nabla)
646-
647-
/*
648-
driver->bindGraphicsPipeline(gpuPipeline.get());
649-
650-
driver->beginScene(true, true, video::SColor(255, 0, 0, 255));
651-
652-
//! This animates (moves) the camera and sets the transforms
653-
camera->OnAnimate(std::chrono::duration_cast<std::chrono::milliseconds>(device->getTimer()->getTime()).count());
654-
camera->render();
655-
656-
driver->pushConstants(gpuPipelineLayout.get(), asset::ISpecializedShader::ESS_VERTEX, 0u, sizeof(core::matrix4SIMD), camera->getConcatenatedMatrix().pointer());
657-
658-
for (uint32_t i = 0u; i < mdiCallParams.size(); i++)
659-
{
660-
driver->bindDescriptorSets(video::EPBP_GRAPHICS, gpuPipeline->getLayout(), 0u, 2u, &desc[i].first.get(), nullptr);
661-
driver->drawIndexedIndirect(mdiCallParams[i].vtxBindings, mdiCallParams[i].mode, mdiCallParams[i].indexType, mdiCallParams[i].indexBuff.get(), mdiCallParams[i].indirectDrawBuff.get(), mdiCallParams[i].offset, mdiCallParams[i].maxCount, mdiCallParams[i].stride);
662-
}
663-
664-
driver->endScene();
665-
*/
635+
NBL_COMMON_API_MAIN(DynamicTextureIndexingApp, DynamicTextureIndexingApp::Nabla)

0 commit comments

Comments
 (0)