File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
examples_tests/39.DenoiserTonemapper Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ int main(int argc, char* argv[])
79
79
params.Vsync = true ;
80
80
params.Doublebuffer = true ;
81
81
params.Stencilbuffer = false ;
82
- params.StreamingDownloadBufferSize = 1024 *1024 *1024 ; // for 16k images
82
+ // TODO: this is a temporary fix for a problem solved in the Vulkan Branch
83
+ params.StreamingUploadBufferSize = 1024 *1024 *1024 ; // for Color + 2 AoV of 8k images
84
+ params.StreamingDownloadBufferSize = core::roundUp (params.StreamingUploadBufferSize /3u ,256u ); // for output image
83
85
auto device = createDeviceEx (params);
84
86
85
87
if (check_error (!device," Could not create Irrlicht Device!" ))
@@ -1270,8 +1272,17 @@ nbl_glsl_complex nbl_glsl_ext_FFT_getPaddedData(ivec3 coordinate, in uint channe
1270
1272
uint32_t inImageByteOffset[EII_COUNT];
1271
1273
{
1272
1274
asset::ICPUBuffer* buffersToUpload[EII_COUNT];
1275
+ size_t inputSize = 0u ;
1273
1276
for (uint32_t j=0u ; j<denoiserInputCount; j++)
1277
+ {
1274
1278
buffersToUpload[j] = param.image [j]->getBuffer ();
1279
+ inputSize += buffersToUpload[j]->getSize ();
1280
+ }
1281
+ if (inputSize>=params.StreamingUploadBufferSize )
1282
+ {
1283
+ printf (" [ERROR] Denoiser Failed, input too large to fit in VRAM, Streaming Denoise not implemented yet!" );
1284
+ return -1 ;
1285
+ }
1275
1286
auto gpubuffers = driver->getGPUObjectsFromAssets (buffersToUpload,buffersToUpload+denoiserInputCount,&assetConverter);
1276
1287
1277
1288
bool skip = false ;
You can’t perform that action at this time.
0 commit comments