Hello, I'm working on mobile game industry.
We are suffering from opengl link program failure.....
I think this is because of too many opengl program count.
If we applied lru cache for shader count, the problem was gone...
I wanna know "Limit of program(compiled shader) count is determined based on memory usage at the time?"
And "Can too many program(compiled shader) count impact to other gpu resource like texture, constant buffer...? ( Memory size that compiled shader takes up is fixed?? )"
It depends on the driver; older ones use a fixed-size 16MB heap as mentioned, while newer drivers use an expandable heap thus there's no fixed limit. I wish I could tell you an specific driver version for where the fix is in place, but unfortunately it differs between vendors. I would be surprised to hear problems on post-R19 drivers however. :)
Then, If it has no fixed limit, it still doesn't impact to other gpu resource. right?
Not beyond sharing the available physical RAM, same as other resources, no.
Um... Ok, I have one more question...
All processes share internal 16MB heap for shader code? If I play game for a while and drop it to background and launch another game. Then Shade codes compiled in game i played still takes up the heap memory and it impacts to another game i played after the game?
No, the heap is an unique allocation for each process. Not shared between processes.