Short note on local: Those work a little different than global. Global -> System RAM
local -> CPU memory located if there is room for it
So unless you flood the cache, it won't be in RAM.
But I think the error / missassumption you are making is: Loading image -> whole image in RAM and not only the reference (ie 4bytes)
Because the image will normally reside in VRAM
You would need to create something RAM based like an array etc.
local -> CPU memory located if there is room for it
So unless you flood the cache, it won't be in RAM.
But I think the error / missassumption you are making is: Loading image -> whole image in RAM and not only the reference (ie 4bytes)
Because the image will normally reside in VRAM
You would need to create something RAM based like an array etc.