Skip to content

Commit f91ccdc

Browse files
committed
Got sampled images working. Samplers are next
1 parent 870e1d5 commit f91ccdc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

07_StagingAndMultipleQueues/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
269269
smart_refctd_ptr<IGPUDescriptorSetLayout> dsLayout;
270270
core::smart_refctd_ptr<IGPUDescriptorSet> descSets[FRAMES_IN_FLIGHT];
271271
{
272-
nbl::video::IGPUDescriptorSetLayout::SBinding bindings[2] = {
272+
const nbl::video::IGPUDescriptorSetLayout::SBinding bindings[2] = {
273273
{
274274
.binding = 0,
275-
.type = nbl::asset::IDescriptor::E_TYPE::ET_COMBINED_IMAGE_SAMPLER, // TODO: just an image descriptor type when separable samplers arrive
275+
.type = nbl::asset::IDescriptor::E_TYPE::ET_SAMPLED_IMAGE, // TODO: just an image descriptor type when separable samplers arrive
276276
.createFlags = IGPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS::ECF_NONE,
277277
.stageFlags = IGPUShader::E_SHADER_STAGE::ESS_COMPUTE,
278278
.count = 1,
@@ -379,10 +379,10 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
379379
m_histogramBufferMemPtrs[2] = m_histogramBufferMemPtrs[1] + HISTOGRAM_SIZE;
380380
}
381381

382-
// TODO: will no longer be necessary after separable samplers and images
383-
IGPUSampler::SParams samplerParams;
382+
// TODO: Remove commented stuff below
383+
/*IGPUSampler::SParams samplerParams;
384384
samplerParams.AnisotropicFilter = false;
385-
core::smart_refctd_ptr<IGPUSampler> sampler = m_device->createSampler(samplerParams);
385+
core::smart_refctd_ptr<IGPUSampler> sampler = m_device->createSampler(samplerParams);*/
386386

387387
IGPUDescriptorSet::SDescriptorInfo bufInfo;
388388
bufInfo.desc = smart_refctd_ptr(histogramBuffer);
@@ -425,7 +425,7 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
425425
logFailAndTerminate("Couldn't create descriptor.");
426426
view->setObjectDebugName(("Image View #"+std::to_string(imageToProcessId)).c_str());
427427
imgInfo.desc = std::move(view);
428-
imgInfo.info.image = { .sampler = sampler, .imageLayout = IImage::LAYOUT::READ_ONLY_OPTIMAL };
428+
imgInfo.info.image = { .sampler = nullptr, .imageLayout = IImage::LAYOUT::READ_ONLY_OPTIMAL };
429429

430430
IGPUDescriptorSet::SWriteDescriptorSet write[1] = {
431431
{.dstSet = descSets[resourceIdx].get(), .binding = 0, .arrayElement = 0, .count = 1, .info = &imgInfo }

0 commit comments

Comments
 (0)