chris1972 opened this issue on Dec 26, 2014 ยท 14 posts
shvrdavid posted Tue, 30 December 2014 at 4:20 PM
Ok, make a frame buffer with OpenGl, and send it a 1024 x 1025 RGDA32F image. It should take just over 16 million octets to store it right???
Well, that depends on the GPU and the driver, some will force it to the next power of two (POT), and use 32 million............
Many drivers force this, and there is no way around it... It has nothing to do with what you program, it is a hardware/driver thing.
Some drivers force it square because it is far faster to process it that way on that particular GPU......... Or they want you to use another protocol entirely.
There are other hardware issues to consider as well.
ATI handles texture_2d completely differently than Nvidia, and sending non square textures with Mip Mips to them is asking for errors and driver crashes, guaranteed crashes on older hardware since the drivers require square mip maps. If you are compiling for all hardware, you usually force the GLSL compiler to omit texture_2d completely if non square textures with Mip Maps are going to be used. Or you use NPOT textures for everything, which cripples it on some hardware due to memory allocation issues when the driver forces POT allocation..
Programming and how the hardware handles it are different things.
Some things are easy to explain, other things are not........ <- Store -> <-Freebies->