summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_scene.h
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2016-01-15 20:12:24 +0100
committerRoland Scheidegger <[email protected]>2016-01-15 20:13:45 +0100
commit2f9a325b6ac1609a9986b4bee161610730da7da5 (patch)
tree1082961ba8c12b464e063e7e336ee0e71e85e61d /src/gallium/drivers/llvmpipe/lp_scene.h
parent781d2787bc1cf975757a95d0d9324f734fa61c09 (diff)
llvmpipe: fix "leaking" textures
This was not really a leak per se, but we were referencing the textures for longer than intended. If textures were set via llvmpipe_set_sampler_views() (for fs) and then picked up by lp_setup_set_fragment_sampler_views(), they were referenced in the setup state. However, the only way to unreference them was by replacing them with another texture, and not when the texture slot was replaced with a NULL sampler view. (They were then further also referenced by the scene too which might have additional minor side effects as we limit the memory size which is allowed to be referenced by a scene in a rather crude way.) Only setup destruction (at context destruction time) then finally would get rid of the references. Fix this by noting the number of textures the last time, and unreference things if the new view is NULL (avoiding having to unreference things always up to PIPE_MAX_SHADER_SAMPLER_VIEWS which would also have worked). Found by code inspection, no test... v2: rename var Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.h')
0 files changed, 0 insertions, 0 deletions