Tags: yjaelex/renderdoc
Tags
Add a 'garbage collection' for cached state objects * In extreme cases a program can create lots and lots of unique short- lived state objects, we cache them all and run out of the 4096 state objects that can be around, then further creates fail out. * To handle this, if we have 4000 total state objects, we release any that are purely being held by us (not the program). This isn't an ideal solution but it's quite simple and non-invasive, and only has a slight impact on rare Create calls. * Most programs will either create a few up-front (as intended), or at worst create a few dozen or even few hundred then re-use them as they are cached.