mesa/src/gallium/include/frontend
Marek Olšák 3a406688f2 st/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers
Hopefully this doesn't break anything.

There are a lot of places that invalidate drawables, but no place attempted
to call the context directly like this. A few places don't even have
the context.

Explanation:

The DRI frontend uses a global atomic counter per drawable that is
incremented when that drawable changed buffers.
st_manager_validate_framebuffers checks for that atomic counter and
updates the framebuffer state if there is any change. This was called at
every state update, so likely before almost every draw (!!!).

This commit changes that. Everything is the same except that the change
of buffers will not be noticed until the beginning of the next frame or
when the framebuffer state update is triggered by something else.

The effect is that we don't waste time calling
st_manager_validate_framebuffers a million times per frame.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19775>
2022-11-23 20:37:02 +00:00
..
api.h st/mesa: only call st_manager_validate_framebuffers at FBO change or SwapBuffers 2022-11-23 20:37:02 +00:00
drisw_api.h
drm_driver.h driconf: Make the driver's declarations be structs instead of XML. 2020-10-02 23:59:52 +00:00
opencl_interop.h
sw_driver.h gallium: Learn about kopper 2022-04-07 00:17:40 +00:00
sw_winsys.h util: Move src/gallium/include/pipe/p_format.h to src/util/format/u_formats.h 2022-11-19 03:38:19 +00:00
vdpau_dmabuf.h
vdpau_funcs.h
vdpau_interop.h
winsys_handle.h mesa: #include "util/glheader.h" instead GL/gl.h in shared code 2022-11-03 16:07:31 +00:00
xlibsw_api.h