@@ -361,8 +361,6 @@ void FEngine::init() {
361
361
}
362
362
363
363
// initialize the dummy textures so that their contents are not undefined
364
- static constexpr uint32_t zeroes[6 ] = {};
365
- static constexpr uint32_t ones = 0xffffffff ;
366
364
367
365
mDefaultIblTexture = downcast (Texture::Builder ()
368
366
.width (1 ).height (1 ).levels (1 )
@@ -371,7 +369,8 @@ void FEngine::init() {
371
369
.build (*this ));
372
370
373
371
driverApi.update3DImage (mDefaultIblTexture ->getHwHandle (), 0 , 0 , 0 , 0 , 1 , 1 , 6 ,
374
- { zeroes, sizeof (zeroes), Texture::Format::RGBA, Texture::Type::UBYTE });
372
+ { std::array<uint8_t , 6 >{}.data (), 6 ,
373
+ Texture::Format::RGBA, Texture::Type::UBYTE });
375
374
376
375
// 3 bands = 9 float3
377
376
constexpr float sh[9 * 3 ] = { 0 .0f };
@@ -393,10 +392,12 @@ void FEngine::init() {
393
392
TextureFormat::RGBA8, 1 , 1 , 1 , 1 , TextureUsage::DEFAULT);
394
393
395
394
driverApi.update3DImage (mDummyOneTexture , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
396
- { &ones, 4 , Texture::Format::RGBA, Texture::Type::UBYTE });
395
+ { std::array<uint8_t , 4 >{0xff , 0xff , 0xff , 0xff }.data (), 4 ,
396
+ Texture::Format::RGBA, Texture::Type::UBYTE });
397
397
398
398
driverApi.update3DImage (mDummyZeroTexture , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
399
- { zeroes, 4 , Texture::Format::RGBA, Texture::Type::UBYTE });
399
+ { std::array<uint8_t , 4 >{}.data (), 4 ,
400
+ Texture::Format::RGBA, Texture::Type::UBYTE });
400
401
401
402
402
403
mPerViewDescriptorSetLayoutSsrVariant = {
@@ -451,14 +452,23 @@ void FEngine::init() {
451
452
mDummyOneTextureArray = driverApi.createTexture (SamplerType::SAMPLER_2D_ARRAY, 1 ,
452
453
TextureFormat::RGBA8, 1 , 1 , 1 , 1 , TextureUsage::DEFAULT);
453
454
455
+ mDummyOneTextureArrayDepth = driverApi.createTexture (SamplerType::SAMPLER_2D_ARRAY, 1 ,
456
+ TextureFormat::DEPTH32F, 1 , 1 , 1 , 1 , TextureUsage::DEFAULT);
457
+
454
458
mDummyZeroTextureArray = driverApi.createTexture (SamplerType::SAMPLER_2D_ARRAY, 1 ,
455
459
TextureFormat::RGBA8, 1 , 1 , 1 , 1 , TextureUsage::DEFAULT);
456
460
457
461
driverApi.update3DImage (mDummyOneTextureArray , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
458
- { &ones, 4 , Texture::Format::RGBA, Texture::Type::UBYTE });
462
+ { std::array<uint8_t , 4 >{0xff , 0xff , 0xff , 0xff }.data (), 4 ,
463
+ Texture::Format::RGBA, Texture::Type::UBYTE });
464
+
465
+ driverApi.update3DImage (mDummyOneTextureArrayDepth , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
466
+ { std::array<float , 1 >{1 .0f }.data (), 4 ,
467
+ Texture::Format::DEPTH_COMPONENT, Texture::Type::FLOAT });
459
468
460
469
driverApi.update3DImage (mDummyZeroTextureArray , 0 , 0 , 0 , 0 , 1 , 1 , 1 ,
461
- { zeroes, 4 , Texture::Format::RGBA, Texture::Type::UBYTE });
470
+ { std::array<uint8_t , 4 >{}.data (), 4 ,
471
+ Texture::Format::RGBA, Texture::Type::UBYTE });
462
472
463
473
mLightManager .init (*this );
464
474
mDFG .init (*this );
0 commit comments