aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_flush.c
Commit message (Collapse)AuthorAgeFilesLines
* st/mesa: use asynchronous flushes in st_finishNicolai Hähnle2017-11-201-1/+1
| | | | | | | | | With threaded gallium, the driver may currently be running in another thread. In that case, we will execute all remaining commands in that thread instead of syncing, which should be better for cache locality. Reviewed-by: Andres Rodriguez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: remove redundant flushes from st_flushNicolai Hähnle2017-11-091-3/+0
| | | | | | | | | | | st_flush should flush state tracker-internal state and the pipe, but not mesa/main state. Of the four callers: - glFlush/glFinish already call FLUSH_{VERTICES,STATE}. - st_vdpau doesn't need to call them. - st_manager will now call them explicitly. Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: remove Windows hack for glFinishBrian Paul2017-08-161-12/+0
| | | | | | | | | | | | | | I see no evidence that opengl32.dll's wglSwapBuffers calls glFinish. It looks like Jose removed that dependency years ago, but this hack remained. Removing this code also fixes the Piglit sync_api test since commit eceb6710024716. No piglit regressions. No glretrace regressions, per Charmaine. Fixes VMware bug 1937990. Reviewed-by: Charmaine Lee <[email protected]>
* gallium/st: Add a method to flush outstanding swapbuffersThomas Hellstrom2017-08-031-0/+2
| | | | | | | | | | | | | Add a state tracker interface method to flush outstanding swapbuffers, and add a call to it from the mesa state tracker during glFinish(). This doesn't strictly mean the outstanding swapbuffers have actually finished executing but is sufficient for glFinish() to be able to be used as a replacement for glXWaitGL(). Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* mesa/st: Reduce the number of frontbuffer flush callsThomas Hellstrom2017-08-021-35/+2
| | | | | | | | | | | | | The mesa state tracker was needlessly flushing the front buffer even if it hadn't been drawn to since the last flush. This was happening during glXSwapBuffers if we at some point previously had set that frontbuffer as a read- or draw renderbuffer, or at glFlush() or glFinish() if we at some point previously had rendered to the front buffer. Since the frontbuffer flush typically means a full drawable copy, it's a pretty big waste. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* st/mesa: set a device reset callback when availableNicolai Hähnle2016-10-051-1/+30
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/mesa: extract conversion from pipe_reset_status to GLenumNicolai Hähnle2016-10-051-11/+18
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-1/+1
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* st/mesa: implement GetGraphicsResetStatusMarek Olšák2015-05-121-1/+34
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* Fix a few typosZoë Blade2015-04-271-1/+1
| | | | Reviewed-by: Francisco Jerez <[email protected]>
* st/mesa: replace INLINE with inlineBrian Paul2015-02-261-1/+1
| | | | Reviewed-by: Alex Deucher <[email protected]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <[email protected]>
* gallium: fix type of flags in pipe_context::flush()Chia-I Wu2013-05-041-1/+1
| | | | | | | | | | | | | | | | It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Marek Olšák <[email protected]> [olv: document the parameter now that the type is unsigned]
* st/mesa: remove what is left from u_blitMarek Olšák2013-02-181-1/+0
| | | | Reviewed-by: Brian Paul <[email protected]>
* gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flagMarek Olšák2013-01-041-5/+6
| | | | | | | | | | | | | | | | | Usage with pipe_context: pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME); Usage with st_context_iface: st->flush(st, ST_FLUSH_END_OF_FRAME, NULL); The flag is only a hint for drivers. Radeon will use it for buffer eviction heuristics in the kernel (e.g. for queries like how many frames have passed since a buffer was used). The flag is currently only generated by st/dri on SwapBuffers. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]>
* st/mesa: make st_flush do what glFlush doesMarek Olšák2012-12-021-0/+1
|
* st/mesa: remove st_flush_bitmap wrapperMarek Olšák2012-07-221-1/+1
| | | | just a cleanup
* gallium/u_gen_mipmap: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-181-4/+0
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* gallium/u_blit: don't release vertex buffer at end of frame / in glFlushMarek Olšák2012-04-181-1/+0
| | | | | There's no reason to do that. The buffer being used for rendering is always mapped as unsynchronized.
* st/mesa: use u_upload_mgr to upload vertices for glClear fallbackMarek Olšák2012-04-181-1/+0
|
* gallium: remove flags from the flush functionMarek Olšák2011-03-111-4/+4
| | | | | | | | | | The drivers have been changed so that they behave as if all of the flags were set. This is already implicit in most hardware drivers and required for multiple contexts. Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag to decide whether flush_frontbuffer should be called. New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
* gallium: cleanup fence_signalled and fence_finishMarek Olšák2011-03-111-1/+1
| | | | So that they don't have the driver-specific param and return type.
* gallium: add timeout parameter to fence_finishMarek Olšák2011-03-081-1/+2
| | | | | This is a follow-up to the ARB_sync patch for st/mesa and completes the ARB_sync implementation.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* Drop GLframebuffer typedef and just use struct gl_framebufferKristian Høgsberg2010-10-131-2/+2
|
* st/mesa: clean-up: use st_context() everywhereBrian Paul2010-04-231-2/+2
|
* st/mesa: Drop st_public support.Chia-I Wu2010-04-131-14/+4
| | | | There is no user of st_public now.
* st/mesa: Implement st_api.h.Chia-I Wu2010-03-121-4/+2
| | | | | | | | There is currently no user of this new interface. As the inteface can coexist with st_public.h, everthing should work as before. ST_TEXTURE_2D is both defined by st_public.h and st_api.h. Reorder the headers in st/dri to avoid conflicts.
* gallium: Do not mix winsys-drawable-handle and context-private.Chia-I Wu2010-03-101-1/+1
| | | | | update_buffer should be called with context-private, not winsys-drawable-handle.
* Revert "st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME)."Francisco Jerez2010-02-181-4/+8
| | | | | | We probably don't want to propagate this condition to the pipe driver, this reverts commit f455ca6490fcb65781b21f81c7117bd923e250d1 and the dri_update_buffer flush altogether until an agreement is reached.
* st/mesa: always call FLUSH_CURRENT before st->pipe->flush()Keith Whitwell2010-02-181-2/+1
| | | | | | Undoes part of commit f455ca6 which would permit pipe->flush() to be called while the VBO module still had its buffers mapped. Some drivers care deeply about this. Sorry for not spotting this earlier.
* st/mesa: Make the frontbuffer visible on st_flush(PIPE_FLUSH_FRAME).Francisco Jerez2010-02-171-9/+6
| | | | | | | | | | | | | So far the frontbuffer was only being flushed on st_glFlush and st_glFinish, however, a co-state tracker may need to make sure that any frontbuffer changes are already on its way to the actual front. The dri2 state tracker will need this for event-driven GL applications to resize properly (It could also be done calling "dri_flush_frontbuffer", but that way we would flush unnecessarily in the double-buffered case). Additionally this patch avoids flushing the mesa rendering cache if PIPE_FLUSH_RENDER_CACHE wasn't specified.
* Merge branch 'mesa_7_5_branch'Brian Paul2009-07-301-0/+12
|\
| * mesa/st: short-circuit glFinish calls on WIN32 onlyKeith Whitwell2009-07-291-0/+12
| | | | | | | | | | | | | | | | | | | | Windows opengl32.dll calls glFinish prior to every swapbuffers, which makes it pretty hard to get decent performance... Work around by mapping finish to flush on PIPE_OS_WINDOWS. This is conformant, though it might confuse poorly-written benchmarks which attempt to measure a single event rather than figuring out the rate of continuous processing.
* | st: added st_renderbuffer::defined flagBrian Paul2009-05-011-1/+10
|/ | | | | | | | | | Indicates whether there's defined image contents, or garbage/don't care. This is set when we draw into a renderbuffer and cleared when we resize/ reallocate a renderbuffer or do a buffer swap (back buffer becomes undefined). We use this to determine whether the front color buffer has been drawn to, and whether to display its contents upon glFlush/Finish(), when the new st_swapbuffers() function is used.
* mesa/st: protect internal flushes with FLUSH_CURRENTKeith Whitwell2009-04-281-1/+1
| | | | Already doing this for driver.flush()
* mesa/st: add check for null front renderbufferKeith Whitwell2009-03-131-9/+12
| | | | | | Not sure if this indicates a problem elsewhere, but without this check trivial/tri-fbo.c segfaults on resize. With the patch, it renders correctly.
* mesa/st: don't call finish in st_glFlush()Keith Whitwell2009-03-131-4/+7
| | | | | | | | | It is not the state tracker's responsibilty to inject sleeps and pessimize performance in the hope of avoiding buffer synchronization issues in buggy drivers. Calling finish() here will just hide problems that need to be fixed elsewhere.
* gallium: make p_winsys internalZack Rusin2009-01-301-5/+5
| | | | | move it to pipe/internal/p_winsys_screen.h and start converting the state trackers to the screen usage
* gallium: avoid mapping same vertex buffer in subsequent framesKeith Whitwell2008-12-121-1/+10
| | | | | | | | | | | Quite a few util modules were maintaining a single vertex buffer over multiple frames, and potentially reusing it in subsequent frames. Unfortunately that would force us into syncrhonous rendering as the buffer manager would be forced to wait for the previous rendering to complete prior to allowing the map. This resolves that issue, but requires the state tracker to issue a few new flush() calls at the end of each frame.
* mesa: Don't call fence_finish with a null fence.José Fonseca2008-11-241-2/+4
|
* mesa: Issue PIPE_FLUSH_FRAME in glSwapBuffers/glFlush/glFinish.José Fonseca2008-08-151-1/+1
|
* gallium: don't set buffer status to undefined in display_front_buffer()Brian Paul2008-04-221-0/+2
|
* gallium: more elaborate tracking of front color buffer stateBrian Paul2008-04-091-23/+4
| | | | | | | This fixes the case where the app calls SwapBuffers then calls glReadPixels to read the front color buffer. We now keep track of when the front buffer is a _logically_ copy of the back buffer (after SwapBuffers) and read from the back color buffer instead of the front.
* gallium: more flush/finish changesBrian Paul2008-04-091-30/+40
| | | | New, separate is_front_buffer_dirty() function.
* gallium: reorder funcsBrian Paul2008-04-091-11/+12
|
* gallium: call_flush_front_buffer() from st_glFinish()Brian Paul2008-04-091-0/+2
|
* gallium: fold st_gl_flush() into st_glFlush()Brian Paul2008-04-091-12/+5
|
* gallium: refactor code, new flush_front_buffer() functionBrian Paul2008-04-091-17/+25
|
* gallium: add new call to st_flush_bitmap_cache() to fix recent regressionBrian Paul2008-04-041-0/+2
|