@@ -44,27 +44,21 @@ int main()
44
44
{
45
45
constexpr std::string_view APP_NAME = " RGB18E7S3 utility test" ;
46
46
47
- auto initOutput = CommonAPI::Init (video::EAT_OPENGL, APP_NAME.data ());
47
+ CommonAPI::InitOutput initOutput;
48
+ CommonAPI::InitWithNoExt (initOutput, video::EAT_OPENGL, APP_NAME.data ());
48
49
auto system = std::move (initOutput.system );
49
50
auto gl = std::move (initOutput.apiConnection );
50
51
auto logger = std::move (initOutput.logger );
51
52
auto gpuPhysicalDevice = std::move (initOutput.physicalDevice );
52
53
auto logicalDevice = std::move (initOutput.logicalDevice );
53
54
auto queues = std::move (initOutput.queues );
54
55
auto renderpass = std::move (initOutput.renderpass );
55
- auto commandPool = std::move (initOutput.commandPool );
56
+ auto commandPools = std::move (initOutput.commandPools );
56
57
auto assetManager = std::move (initOutput.assetManager );
57
58
auto cpu2gpuParams = std::move (initOutput.cpu2gpuParams );
58
59
auto utilities = std::move (initOutput.utilities );
59
60
60
- core::smart_refctd_ptr<video::IGPUFence> gpuTransferFence = nullptr ;
61
- core::smart_refctd_ptr<video::IGPUFence> gpuComputeFence = nullptr ;
62
-
63
61
nbl::video::IGPUObjectFromAssetConverter cpu2gpu;
64
- {
65
- cpu2gpuParams.perQueue [nbl::video::IGPUObjectFromAssetConverter::EQU_TRANSFER].fence = &gpuTransferFence;
66
- cpu2gpuParams.perQueue [nbl::video::IGPUObjectFromAssetConverter::EQU_COMPUTE].fence = &gpuComputeFence;
67
- }
68
62
69
63
auto createDescriptorPool = [&](const uint32_t count, asset::E_DESCRIPTOR_TYPE type)
70
64
{
@@ -144,11 +138,11 @@ int main()
144
138
145
139
video::IGPUDescriptorSetLayout::SBinding gpuBindingsLayout[ES_COUNT] =
146
140
{
147
- {ES_RGB, asset::EDT_STORAGE_BUFFER, 1u , video::IGPUSpecializedShader ::ESS_COMPUTE, nullptr },
148
- {ES_RGB_CPP_DECODED, asset::EDT_STORAGE_BUFFER, 1u , video::IGPUSpecializedShader ::ESS_COMPUTE, nullptr },
149
- {ES_RGB_GLSL_DECODED, asset::EDT_STORAGE_BUFFER, 1u , video::IGPUSpecializedShader ::ESS_COMPUTE, nullptr },
150
- {ES_RGB_CPP_ENCODED, asset::EDT_STORAGE_BUFFER, 1u , video::IGPUSpecializedShader ::ESS_COMPUTE, nullptr },
151
- {ES_RGB_GLSL_ENCODED, asset::EDT_STORAGE_BUFFER, 1u , video::IGPUSpecializedShader ::ESS_COMPUTE, nullptr }
141
+ {ES_RGB, asset::EDT_STORAGE_BUFFER, 1u , asset::IShader ::ESS_COMPUTE, nullptr },
142
+ {ES_RGB_CPP_DECODED, asset::EDT_STORAGE_BUFFER, 1u , asset::IShader ::ESS_COMPUTE, nullptr },
143
+ {ES_RGB_GLSL_DECODED, asset::EDT_STORAGE_BUFFER, 1u , asset::IShader ::ESS_COMPUTE, nullptr },
144
+ {ES_RGB_CPP_ENCODED, asset::EDT_STORAGE_BUFFER, 1u , asset::IShader ::ESS_COMPUTE, nullptr },
145
+ {ES_RGB_GLSL_ENCODED, asset::EDT_STORAGE_BUFFER, 1u , asset::IShader ::ESS_COMPUTE, nullptr }
152
146
};
153
147
154
148
auto gpuCDescriptorPool = createDescriptorPool (ES_COUNT, asset::EDT_STORAGE_BUFFER);
@@ -189,7 +183,7 @@ int main()
189
183
auto gpuComputePipeline = logicalDevice->createGPUComputePipeline (nullptr , std::move (gpuCPipelineLayout), std::move (gpuComputeShader));
190
184
191
185
core::smart_refctd_ptr<video::IGPUCommandBuffer> commandBuffers[FRAMES_IN_FLIGHT];
192
- logicalDevice->createCommandBuffers (commandPool .get (), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
186
+ logicalDevice->createCommandBuffers (commandPools[CommonAPI::InitOutput::EQT_COMPUTE] .get (), video::IGPUCommandBuffer::EL_PRIMARY, FRAMES_IN_FLIGHT, commandBuffers);
193
187
auto gpuFence = logicalDevice->createFence (static_cast <video::IGPUFence::E_CREATE_FLAGS>(0 ));
194
188
195
189
for (size_t i = 0 ; i < FRAMES_IN_FLIGHT; ++i)
@@ -199,7 +193,7 @@ int main()
199
193
commandBuffer->begin (0 );
200
194
201
195
commandBuffer->bindComputePipeline (gpuComputePipeline.get ());
202
- commandBuffer->bindDescriptorSets (asset::EPBP_COMPUTE, gpuComputePipeline->getLayout (), 0 , 1 , &gpuCDescriptorSet.get (), nullptr );
196
+ commandBuffer->bindDescriptorSets (asset::EPBP_COMPUTE, gpuComputePipeline->getLayout (), 0 , 1 , &gpuCDescriptorSet.get ());
203
197
204
198
static_assert (MAX_TEST_RGB_VALUES % WORK_GROUP_SIZE == 0 , " Inccorect amount!" );
205
199
_NBL_STATIC_INLINE_CONSTEXPR size_t groupCountX = MAX_TEST_RGB_VALUES / WORK_GROUP_SIZE;
0 commit comments