by dpJudas » Sun May 19, 2019 9:52 am
What it does right now is generate the mipmap always. The sampler then controls if it is used or not. The consequence of that is of course wasted memory for any texture only used for 2D (approx 50% high memory usage for those textures). It isn't ideal, but I can personally live with it.
Only alternative is to default to not create mipmap, then create a new texture if anyone attempts to bind a mipmapping sampler. That will fragment allocations and due to that probably only save maybe half of the memory. All in all we're just lucky Doom is so old that texture memory usage is pretty low by today's standard anyway.
What it does right now is generate the mipmap always. The sampler then controls if it is used or not. The consequence of that is of course wasted memory for any texture only used for 2D (approx 50% high memory usage for those textures). It isn't ideal, but I can personally live with it.
Only alternative is to default to not create mipmap, then create a new texture if anyone attempts to bind a mipmapping sampler. That will fragment allocations and due to that probably only save maybe half of the memory. All in all we're just lucky Doom is so old that texture memory usage is pretty low by today's standard anyway.