@@ -141,6 +141,20 @@ class RayQuerySampleApp : public ApplicationBase
141
141
core::smart_refctd_ptr<video::IGPUDescriptorSet> descriptorSets0[FBO_COUNT] = {};
142
142
core::smart_refctd_ptr<video::IGPUDescriptorSet> descriptorSet2 = nullptr ;
143
143
core::smart_refctd_ptr<video::IGPUDescriptorSet> uboDescriptorSet1 = nullptr ;
144
+
145
+ core::smart_refctd_ptr<IGPUBuffer> aabbsBuffer = nullptr ;
146
+ core::smart_refctd_ptr<IGPUAccelerationStructure> gpuBlas = nullptr ;
147
+ core::smart_refctd_ptr<IGPUAccelerationStructure> gpuTlas = nullptr ;
148
+ core::smart_refctd_ptr<IGPUBuffer> instancesBuffer = nullptr ;
149
+
150
+ core::smart_refctd_ptr<IGPUBufferView> gpuSequenceBufferView = nullptr ;
151
+
152
+ core::smart_refctd_ptr<video::IGPUSampler> sampler0 = nullptr ;
153
+ core::smart_refctd_ptr<video::IGPUSampler> sampler1 = nullptr ;
154
+
155
+ core::smart_refctd_ptr<IGPUBuffer> gpuSequenceBuffer = nullptr ;
156
+
157
+ core::smart_refctd_ptr<IGPUBuffer> spheresBuffer = nullptr ;
144
158
145
159
// TODO: Temp Fix because of validation error: VkPhysicalDeviceLimits::nonCoherentAtomSize
146
160
struct alignas (64 ) SBasicViewParametersAligned
@@ -180,7 +194,7 @@ class RayQuerySampleApp : public ApplicationBase
180
194
181
195
CommonAPI::SFeatureRequest< video::ILogicalDevice::E_FEATURE> optionalDeviceFeatures = {};
182
196
183
- const auto swapchainImageUsage = static_cast <asset::IImage::E_USAGE_FLAGS>(asset::IImage::EUF_COLOR_ATTACHMENT_BIT);
197
+ const auto swapchainImageUsage = static_cast <asset::IImage::E_USAGE_FLAGS>(asset::IImage::EUF_COLOR_ATTACHMENT_BIT | asset::IImage::EUF_TRANSFER_DST_BIT );
184
198
const video::ISurface::SFormat surfaceFormat (asset::EF_B8G8R8A8_SRGB, asset::ECP_COUNT, asset::EOTF_UNKNOWN);
185
199
186
200
CommonAPI::InitOutput initOutput;
@@ -310,8 +324,8 @@ class RayQuerySampleApp : public ApplicationBase
310
324
spheres[6 ] = Sphere (core::vector3df (-3.0 ,0.0 ,1.0 ), 0.5 , 5u , INVALID_ID_16BIT);
311
325
spheres[7 ] = Sphere (core::vector3df (0.5 ,1.0 ,0.5 ), 0.5 , 6u , INVALID_ID_16BIT);
312
326
spheres[8 ] = Sphere (core::vector3df (-1.5 ,1.5 ,0.0 ), 0.3 , INVALID_ID_16BIT, 0u );
327
+
313
328
// Create Spheres Buffer
314
- core::smart_refctd_ptr<IGPUBuffer> spheresBuffer;
315
329
uint32_t spheresBufferSize = sizeof (Sphere) * SphereCount;
316
330
317
331
{
@@ -384,8 +398,6 @@ class RayQuerySampleApp : public ApplicationBase
384
398
}
385
399
#endif
386
400
387
- core::smart_refctd_ptr<IGPUBuffer> aabbsBuffer;
388
- core::smart_refctd_ptr<IGPUAccelerationStructure> gpuBlas;
389
401
// Create + Build BLAS
390
402
{
391
403
// Build BLAS with AABBS
@@ -482,8 +494,6 @@ class RayQuerySampleApp : public ApplicationBase
482
494
}
483
495
}
484
496
485
- core::smart_refctd_ptr<IGPUAccelerationStructure> gpuTlas;
486
- core::smart_refctd_ptr<IGPUBuffer> instancesBuffer;
487
497
// Create + Build TLAS
488
498
{
489
499
// TODO: Temp fix before nonCoherentAtomSize fix
@@ -670,7 +680,6 @@ class RayQuerySampleApp : public ApplicationBase
670
680
671
681
gpuEnvmapImageView = createGPUImageView (" ../../media/envmap/envmap_0.exr" );
672
682
673
- smart_refctd_ptr<IGPUBufferView> gpuSequenceBufferView;
674
683
{
675
684
const uint32_t MaxDimensions = 3u <<kShaderParameters .MaxDepthLog2 ;
676
685
const uint32_t MaxSamples = 1u <<kShaderParameters .MaxSamplesLog2 ;
@@ -689,7 +698,6 @@ class RayQuerySampleApp : public ApplicationBase
689
698
690
699
// TODO: Temp Fix because createFilledDeviceLocalGPUBufferOnDedMem doesn't take in params
691
700
// auto gpuSequenceBuffer = utilities->createFilledDeviceLocalGPUBufferOnDedMem(graphicsQueue, sampleSequence->getSize(), sampleSequence->getPointer());
692
- core::smart_refctd_ptr<IGPUBuffer> gpuSequenceBuffer;
693
701
{
694
702
IGPUBuffer::SCreationParams params = {};
695
703
const size_t size = sampleSequence->getSize ();
@@ -801,9 +809,9 @@ class RayQuerySampleApp : public ApplicationBase
801
809
}
802
810
803
811
ISampler::SParams samplerParams0 = { ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETBC_FLOAT_OPAQUE_BLACK, ISampler::ETF_LINEAR, ISampler::ETF_LINEAR, ISampler::ESMM_LINEAR, 0u , false , ECO_ALWAYS };
804
- auto sampler0 = logicalDevice->createGPUSampler (samplerParams0);
812
+ sampler0 = logicalDevice->createGPUSampler (samplerParams0);
805
813
ISampler::SParams samplerParams1 = { ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETC_CLAMP_TO_EDGE, ISampler::ETBC_INT_OPAQUE_BLACK, ISampler::ETF_NEAREST, ISampler::ETF_NEAREST, ISampler::ESMM_NEAREST, 0u , false , ECO_ALWAYS };
806
- auto sampler1 = logicalDevice->createGPUSampler (samplerParams1);
814
+ sampler1 = logicalDevice->createGPUSampler (samplerParams1);
807
815
808
816
descriptorSet2 = logicalDevice->createGPUDescriptorSet (descriptorPool.get (), core::smart_refctd_ptr (gpuDescriptorSetLayout2));
809
817
{
0 commit comments