mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
gallium: add notify_swapbuffers_complete, use it to set surfaces to undefined state
This commit is contained in:
parent
596a92ee75
commit
6d2d41294c
2 changed files with 21 additions and 0 deletions
|
|
@ -177,6 +177,26 @@ st_notify_swapbuffers(struct st_framebuffer *stfb)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Quick hack - allows the winsys to inform the driver that surface
|
||||
* states are now undefined after a glXSwapBuffers or similar.
|
||||
*/
|
||||
void
|
||||
st_notify_swapbuffers_complete(struct st_framebuffer *stfb)
|
||||
{
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
if (ctx && ctx->DrawBuffer == &stfb->Base) {
|
||||
struct st_renderbuffer *strb;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BUFFER_COUNT; i++) {
|
||||
if (stfb->Base.Attachment[i].Renderbuffer) {
|
||||
strb = st_renderbuffer(stfb->Base.Attachment[i].Renderbuffer);
|
||||
strb->surface->status = PIPE_SURFACE_STATUS_UNDEFINED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,5 +81,6 @@ void st_make_current(struct st_context *st,
|
|||
void st_flush( struct st_context *st, uint pipeFlushFlags );
|
||||
|
||||
void st_notify_swapbuffers(struct st_framebuffer *stfb);
|
||||
void st_notify_swapbuffers_complete(struct st_framebuffer *stfb);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue