diff options
author | Andreas Grois <andi@grois.info> | 2018-03-18 21:11:39 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-18 21:11:39 +0100 |
commit | dc193156a82a80cc8d2321cf065019035855516f (patch) | |
tree | d665ca5bd8b0b1aec7caf835814b2fe5d5b87347 /BuddhaTest/src/Helpers.cpp | |
parent | db2ea861c688aadf59fc35ff6cfca69149a1a94c (diff) |
Undo splitting of buffers in three. Makes buffer access much faster
Not kidding here. For the default parameters this increased the maximum pixel brightness in the image by a factor of 2.25.
This has the drawback that the maximum possible image size got reduced, but hey, there's a command line switch to ignore all size limits ;-)
Diffstat (limited to 'BuddhaTest/src/Helpers.cpp')
-rw-r--r-- | BuddhaTest/src/Helpers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/BuddhaTest/src/Helpers.cpp b/BuddhaTest/src/Helpers.cpp index e499f0c..2a687d2 100644 --- a/BuddhaTest/src/Helpers.cpp +++ b/BuddhaTest/src/Helpers.cpp @@ -264,9 +264,9 @@ namespace Helpers } int maxSSBOSize; glGetIntegerv(GL_MAX_SHADER_STORAGE_BLOCK_SIZE,&maxSSBOSize); - if((static_cast<unsigned long>(imageWidth) * static_cast<unsigned long>(imageHeight)) > static_cast<unsigned long>(maxSSBOSize)/2) //divided by 2, as we have 4 bytes per int, but only half the image height + if((static_cast<unsigned long>(imageWidth) * static_cast<unsigned long>(imageHeight)) > static_cast<unsigned long>(maxSSBOSize)/6) //divided by 3*2, as we have three colors per pixel, 4 bytes per int, but only half the image height { - std::cerr << "Requested buffer size is larger than maximum allowed by graphics driver. Max pixel number: " << maxSSBOSize/2 << std::endl; + std::cerr << "Requested buffer size is larger than maximum allowed by graphics driver. Max pixel number: " << maxSSBOSize/6 << std::endl; std::cerr << "You can override this limit check using the --ignoreMaxBufferSize 1 command line parameter, but doing so is your own risk." << std::endl; if(ignoreMaxBufferSize == 0) return false; |