summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_framebuffer.c
AgeCommit message (Collapse)Author
2009-07-04Merge branch 'mesa_7_5_branch'Jakob Bornecrantz
2009-07-07gallium: Only set FRONT_STATUS_COPY_OF_BACK if there is a back buffer.Michel Dänzer
Fixes potential crash when SwapBuffers is called but there's no back buffer.
2009-06-17mesa: rework viewport/scissor initialization codeBrian Paul
The first time a context is bound to a drawable, the viewport and scissor bounds are initialized to the buffer's size. This is actually a bit tricky. A new _mesa_check_init_viewport() function is called in several places to check if the viewport has been initialized. We also use a new ctx->ViewportInitialized flag instead of the overloaded ctx->FirstTimeCurrent flag.
2009-06-24Merge branch 'mesa_7_5_branch'Brian Paul
Conflicts: src/mesa/drivers/dri/i915/i915_tex_layout.c src/mesa/drivers/dri/i965/brw_wm_glsl.c src/mesa/drivers/dri/intel/intel_buffer_objects.c src/mesa/drivers/dri/intel/intel_pixel_bitmap.c src/mesa/drivers/dri/intel/intel_pixel_draw.c src/mesa/main/enums.c src/mesa/main/texstate.c src/mesa/vbo/vbo_exec_array.c
2009-06-11Merge branch 'mesa_7_5_branch'José Fonseca
Conflicts: src/mesa/state_tracker/st_cb_fbo.c src/mesa/state_tracker/st_framebuffer.c
2009-06-10mesa: Pure software accum buffer.José Fonseca
The existing implementation was already implemented on software, but relied on the pipe driver to always support the R16G16B16A16_SNORM format. This patch eliminates that, without prejudice against a future hardware-only implementation. It also avoids some of the short <-> float conversions, and only does a read transfer of the color buffer on GL_RETURN if absolutely necessary.
2009-05-01st: if st_swapbuffers() is called for single-buffered visual don't crashBrian Paul
Furthermore, return pointer(s) to the front color buffer(s).
2009-05-01st: added st_renderbuffer::defined flagBrian Paul
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.
2009-05-01set: new st_swapbuffers() which does a true front/back buffer swapBrian Paul
The pointers to the front/back renderbuffers are exchanged. This new function isn't actually used yet...
2009-05-01st: when double buffered, only create front color buffer on demandBrian Paul
Before we always created the front color buffer, even if was never used. This can save some memory.
2009-03-26gallium: Remove some little-used fields from struct pipe_surface.Michel Dänzer
2009-03-07mesa: move glViewport and glDepthRange functions into new viewport.c fileBrian Paul
A bit of refactoring with an eye toward ES2 and GL 3.1
2009-03-07mesa: remove last of _mesa_unreference_framebuffer() callsBrian Paul
2009-03-04gallium: Remove some superfluous instances of #include "p_inlines.h".Michel Dänzer
2009-02-12mesa: use new ST_CALLOC_STRUCT() macro in gallium state trackerBrian Paul
2009-01-23gallium: change the st_get_framebuffer_surface/texture functionsAlan Hourihane
to return TRUE/FALSE if the st_framebuffer is valid, and if it is return the surface/texture in the passed pointer.
2008-12-30gallium: Remove unused variables.José Fonseca
2008-12-19gallium: set ST_NEW_FRAMEBUFFER when setting new surfacesAlan Hourihane
2008-12-10Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
2008-12-10gallium: only mark back color buffer surfaces as undefined after swapbuffersBrian Paul
Marking all surfaces as undefined was wrong and cause some glean failures because glReadPixels was used after SwapBuffers.
2008-11-05Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
Conflicts: src/gallium/auxiliary/rtasm/rtasm_execmem.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_log.c src/mesa/state_tracker/st_atom_framebuffer.c
2008-11-03gallium: no renderbuffer, so just exit.Alan Hourihane
2008-10-18gallium: add some checks for null surface pointers in state trackerBrian Paul
Fixes some segfaults in low memory situations.
2008-09-26st: add prototype for st_get_framebuffer_dimensions()Alan Hourihane
2008-09-26st: export st_get_framebuffer_dimensions() to retrieveAlan Hourihane
the width & height of the fb
2008-09-26st: change from ** to * for st_unreference_framebuffer()Alan Hourihane
2008-09-17gallium: clean-up/fix msaa override in state trackerBrian Paul
2008-08-28gallium: change the conditional which tests for combined Z+stencil buffersBrian Paul
The caller might be requesting 16-bit Z + 8-bit stencil be placed in a PIPE_FORMAT_S8Z24 or PIPE_FORMAT_Z24S8 buffer.
2008-08-15mesa: Issue PIPE_FLUSH_FRAME in glSwapBuffers/glFlush/glFinish.José Fonseca
2008-07-22add env var to override msaa visual selectionRoland Scheidegger
2008-06-27gallium: handle msaaRoland Scheidegger
2008-06-23gallium: Add accessor functions to get textures from a st_framebufferJakob Bornecrantz
2008-06-18gallium: added new st_set_framebuffer_surface()Brian Paul
This allows the winsys to explicitly specify gallium surfaces for a framebuffer object.
2008-06-09gallium: include scissor.hBrian Paul
2008-04-09gallium: more elaborate tracking of front color buffer stateBrian Paul
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.
2008-04-07gallium: accum buffer fixesBrian Paul
If the driver can't create a PIPE_FORMAT_R16G16B16A16_SNORM surface, create an accum surface using a shallower format and taller height. Since only the accum buffer code accesses the surface the actual format doesn't really matter, just that there's enough memory.
2008-03-26gallium: Change pipe->flush() interface to optionally return a fence.Michel Dänzer
The cell driver still uses an internal CELL_FLUSH_WAIT flag, in the long run proper fencing should be implemented for it.
2008-02-26gallium: #includes to silence warningsBrian
2008-02-26gallium: fix zero-sized viewport bugBrian
If st_create_framebuffer() is called with width=0, height=0 and the program never called glViewport, the viewport wasn't properly initalized. This fixes that.
2008-01-26gallium: add notify_swapbuffers_complete, use it to set surfaces to ↵Keith Whitwell
undefined state
2008-01-26gallium: specialize glFlush vs other flush semanticsKeith Whitwell
2007-12-20gallium: make state tracker explictly ask for rendercache flushesKeith Whitwell
2007-12-19Fix problem with initial viewport/scissor size.Brian
If an app never called glViewport, the viewport size was always 0 by 0 pixels. Now pass initial size to st_create_framebuffer() and initialize the viewport and scissor bounds in st_make_current(). This could also be fixed by ensuring the gl_framebuffers passed to _mesa_make_current() were initialized to the right size. But that involves allocating the renderbuffers/pipe_surfaces earlier and that runs into some other issues ATM. Also remove obsolete createRenderbuffers param to st_create_framebuffer().
2007-12-12Re-org of st_create_framebuffer() and renderbuffer format selection.Brian
st_create_framebuffer() now takes pipe_formats for the color, depth, stencil buffers. This avoids a round-about chain of calls to pipe->is_format_supported() for window renderbuffers (their format never changes). Renderbuffer format selection code in st_format.c is simpler now too.
2007-12-10Add 'type' parameter to is_format_supported() to specify texture vs. drawing ↵Brian
surface, etc. Additional types may be added in the future.
2007-12-07added ST_SURFACE_DEPTHBrian
2007-11-07New PIPE_FLUSH_WAIT flag for pipe->flush().Brian
The state tracker doesn't have to directly call winsys->wait_idle() anymore. glFlush and glFinish both go through pipe->flush() now.
2007-11-06Improved logic for setting up depth/stencil buffers in st_create_framebuffer()Brian
2007-11-06Handle the corner case of 24bit depth buffer with 0bit stencil buffer.José Fonseca
2007-11-05don't include mtypes.h in st_public.hBrian