summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_manager.h
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-07-10 23:06:11 -0700
committerCharmaine Lee <[email protected]>2017-07-11 19:40:17 -0700
commit147d7fb772a7e6b5207c70d02d133af324b0ccf2 (patch)
tree43bb9284d387bc85119e76a7a385accdeb6aedf1 /src/mesa/state_tracker/st_manager.h
parent76acbd07fcc62ea3a6ecd499a553e7a99ec77f47 (diff)
st/mesa: add a winsys buffers list in st_context
Commit a5e733c6b52e93de3000647d075f5ca2f55fcb71 fixes the dangling framebuffer object by unreferencing the window system draw/read buffers when context is released. However this can prematurely destroy the resources associated with these window system buffers. The problem is reproducible with Turbine Demo running with VMware driver. In this case, the depth buffer content was lost when the context is rebound to a drawable. To prevent premature destroy of the resources associated with window system buffers, this patch maintains a list of these buffers in the context, making sure the reference counts of these buffers will not reach zero until the associated framebuffer interface objects no longer exist. This also helps to avoid unnecessary destruction and re-construction of the resources associated with the framebuffer. Fixes VMware bug 1909807. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_manager.h')
-rw-r--r--src/mesa/state_tracker/st_manager.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_manager.h b/src/mesa/state_tracker/st_manager.h
index 65874b00401..68adf2fa1a4 100644
--- a/src/mesa/state_tracker/st_manager.h
+++ b/src/mesa/state_tracker/st_manager.h
@@ -33,6 +33,7 @@
#include "pipe/p_compiler.h"
struct st_context;
+struct st_framebuffer;
void
st_manager_flush_frontbuffer(struct st_context *st);
@@ -44,4 +45,7 @@ boolean
st_manager_add_color_renderbuffer(struct st_context *st, struct gl_framebuffer *fb,
gl_buffer_index idx);
+void
+st_framebuffer_reference(struct st_framebuffer **ptr,
+ struct st_framebuffer *stfb);
#endif /* ST_MANAGER_H */