summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Flush vertices before updating drawbuffer computed state.Eric Anholt2011-05-261-7/+7
| | | | | | | Otherwise, the driver is likely to draw the flushed vertices to the new drawbuffer instead of the old one, missing the point of the flush. Reviewed-by: Brian Paul <[email protected]>
* mesa: Trigger FBO validation on DrawBuffers change in non-ES2 mode.Eric Anholt2011-05-261-10/+26
| | | | | | | | | glDrawBuffers pointing at an unattached buffer is supposed to be incomplete without ARB_ES2_compatibility. The testcase to catch the bug of not implementing that bit of the spec was tricked by this missing piece of state update. Reviewed-by: Brian Paul <[email protected]>
* mesa: Also update the color draw buffer if it's explicitly set to GL_NONE.Henri Verbeet2011-04-101-1/+1
| | | | | | NOTE: This is a candidate for the 7.10 branch. Signed-off-by: Henri Verbeet <[email protected]>
* mesa: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-3/+3
|
* mesa: Remove unnecessary headers from buffers.c.Vinson Lee2010-01-181-2/+0
|
* mesa: remove old commentBrian Paul2009-11-171-1/+0
|
* mesa: remove a bit of old codeBrian Paul2009-11-171-1/+0
|
* mesa: fix infinite loop bug in _mesa_drawbuffers()Brian Paul2009-11-051-1/+2
| | | | | Fixes bug 24946. This regression came from 8df699b3bb1aa05b633f05b121d09d812c86a22d.
* mesa: clean-up formattingBrian Paul2009-11-031-1/+1
|
* mesa: use FLUSH_VERTICES() in _mesa_drawbuffers()Brian Paul2009-11-031-1/+1
|
* mesa: avoid extraneous _NEW_BUFFER state in _mesa_drawbuffers()Brian Paul2009-11-031-9/+29
|
* mesa: use ffs() to shorten loop in _mesa_drawbuffers()Brian Paul2009-11-031-6/+10
|
* mesa: added assertion, another commentBrian Paul2009-11-031-1/+3
|
* mesa: in glReadBufer() set _NEW_BUFFERS, not _NEW_PIXELBrian Paul2009-05-011-1/+1
| | | | | | | | | | | | | | | Since GL_READ_BUFFER is historically part of the gl_pixel_attrib group it made sense to signal changes with _NEW_PIXEL. But now with FBOs it's also part of the framebuffer state. Now _NEW_PIXEL strictly indicates pixels transfer state changes. This change avoids framebuffer state validation when any random bit of pixel-transfer state is set. DRI drivers updated too: don't check _NEW_COLOR when updating framebuffer state. I think that was just copied from the Xlib driver because we care about dither enable/disable state there.
* mesa: fix glRead/DrawBuffer(GL_AUXn) error valueBrian Paul2009-03-121-0/+8
| | | | | | | If GL_AUX[123] are passed to glRead/DrawBuffer() when those buffers don't exist, need to generate GL_INVALID_OPERATION, not GL_INVALID_ENUM. This regression came from commit 555f0a88182e2b1af809b2d97abdac02814a2f28
* mesa: remove unused AUX buffersBrian Paul2009-03-021-12/+0
| | | | | | Remove all references to aux buffers 1..3. Keep AUX0 around for now just in case, but it'll probably go too someday. I don't know of any OpenGL drivers since the IRIX days that support aux color buffers.
* glDrawBuffers(n==0) is validRobert Ellison2009-02-121-3/+8
| | | | | | | | | | | | | | According to the GL spec, calling glDrawBuffers() with n == 0 is a valid operation (and essentially prevents drawing to any buffers). But _msa_DrawBuffersARB() was producing a GL_INVALID_VALUE error in this case. This fix adjusts the error check, and makes a small change to the ctx->Driver.DrawBuffer() call below to ensure that, if n == 0, Driver.DrawBuffer() is called with GL_NONE and that buffers[0] is *not* referenced in this case (since we don't know whether it is valid). Internal identifier: 365833
* mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul2009-02-091-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge commit 'origin/gallium-0.2' into gallium-master-merge Conflicts: Makefile docs/relnotes-7.4.html docs/relnotes.html src/mesa/drivers/dri/i965/brw_wm.h src/mesa/main/imports.c src/mesa/main/mtypes.h src/mesa/main/texcompress.c src/mesa/main/texenvprogram.c src/mesa/main/version.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_draw.c
| * Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-339/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A first attempt at moving gallium onto a branch directly off master... It will be interesting to see how much work this takes to get running. Have resolved the conflicts semi-arbitarily, not compiled or tested. Conflicts: .gitignore Makefile configs/config.mgw configs/darwin configs/darwin-x86ppc configs/default configs/freebsd-dri configs/linux-dri configs/linux-dri-xcb configs/linux-fbdev configs/linux-static configs/linux-x86-64-static configs/linux-x86-static doxygen/Makefile include/GL/gl.h progs/demos/Makefile progs/demos/descrip.mms progs/demos/texenv.c progs/egl/.gitignore progs/egl/Makefile progs/glsl/.gitignore progs/glsl/Makefile progs/glsl/convolutions.c progs/samples/Makefile.mgw progs/tests/.gitignore progs/trivial/.gitignore progs/trivial/point-param.c progs/trivial/tri.c progs/xdemos/.gitignore progs/xdemos/glthreads.c src/egl/drivers/demo/Makefile src/egl/drivers/dri/Makefile src/egl/main/Makefile src/glu/Makefile src/glu/sgi/Makefile src/glu/sgi/Makefile.mgw src/glut/glx/Makefile.mgw src/glut/os2/WarpWin.cpp src/glut/os2/glut_cindex.cpp src/glut/os2/glut_gamemode.cpp src/glut/os2/glut_win.cpp src/glut/os2/glut_winmisc.cpp src/glut/os2/os2_glx.cpp src/glut/os2/os2_menu.cpp src/glut/os2/os2_winproc.cpp src/glw/Makefile src/glx/x11/dri_glx.c src/glx/x11/glxext.c src/mesa/Makefile src/mesa/Makefile.mgw src/mesa/descrip.mms src/mesa/drivers/beos/Makefile src/mesa/drivers/common/descrip.mms src/mesa/drivers/common/driverfuncs.c src/mesa/drivers/directfb/Makefile src/mesa/drivers/dri/Makefile.template src/mesa/drivers/dri/common/dri_bufmgr.c src/mesa/drivers/dri/common/dri_bufmgr.h src/mesa/drivers/dri/common/dri_util.c src/mesa/drivers/dri/common/extension_helper.h src/mesa/drivers/dri/common/mmio.h src/mesa/drivers/dri/common/utils.c src/mesa/drivers/dri/common/utils.h src/mesa/drivers/dri/glcore/Makefile src/mesa/drivers/dri/i810/i810screen.c src/mesa/drivers/dri/i915/intel_ioctl.c src/mesa/drivers/dri/i915/intel_ioctl.h src/mesa/drivers/dri/i915/intel_screen.c src/mesa/drivers/dri/i915/server/i830_common.h src/mesa/drivers/dri/i915/server/i830_dri.h src/mesa/drivers/dri/i965/intel_screen.c src/mesa/drivers/dri/i965/server/i830_common.h src/mesa/drivers/dri/i965/server/i830_dri.h src/mesa/drivers/dri/mach64/mach64_screen.c src/mesa/drivers/dri/nouveau/nouveau_context.h src/mesa/drivers/dri/nouveau/nouveau_fifo.c src/mesa/drivers/dri/nouveau/nouveau_fifo.h src/mesa/drivers/dri/nouveau/nouveau_screen.c src/mesa/drivers/dri/nouveau/nouveau_screen.h src/mesa/drivers/dri/r128/r128_tex.h src/mesa/drivers/dri/savage/savageioctl.h src/mesa/drivers/fbdev/Makefile src/mesa/drivers/osmesa/Makefile src/mesa/drivers/osmesa/descrip.mms src/mesa/drivers/x11/Makefile src/mesa/drivers/x11/descrip.mms src/mesa/drivers/x11/xm_dd.c src/mesa/glapi/glapi.c src/mesa/glapi/glthread.c src/mesa/main/api_validate.c src/mesa/main/attrib.c src/mesa/main/bufferobj.c src/mesa/main/bufferobj.h src/mesa/main/buffers.c src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/descrip.mms src/mesa/main/drawpix.c src/mesa/main/enums.c src/mesa/main/fbobject.c src/mesa/main/glheader.h src/mesa/main/imports.c src/mesa/main/mipmap.c src/mesa/main/mm.c src/mesa/main/mm.h src/mesa/main/mtypes.h src/mesa/main/points.c src/mesa/main/sources src/mesa/main/state.c src/mesa/main/texcompress_fxt1.c src/mesa/main/texenvprogram.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c src/mesa/math/descrip.mms src/mesa/shader/arbprogram.c src/mesa/shader/descrip.mms src/mesa/shader/prog_execute.c src/mesa/shader/prog_statevars.c src/mesa/shader/prog_statevars.h src/mesa/shader/prog_uniform.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/shader_api.c src/mesa/shader/slang/descrip.mms src/mesa/shader/slang/library/slang_vertex_builtin_gc.h src/mesa/sources src/mesa/swrast/descrip.mms src/mesa/swrast/s_drawpix.c src/mesa/swrast/s_fragprog.c src/mesa/swrast/s_readpix.c src/mesa/swrast/s_span.c src/mesa/swrast_setup/descrip.mms src/mesa/tnl/descrip.mms src/mesa/tnl/t_context.h src/mesa/tnl/t_vp_build.c src/mesa/tnl/tnl.h src/mesa/vbo/descrip.mms src/mesa/vbo/vbo_context.c src/mesa/vbo/vbo_exec_array.c src/mesa/x86-64/xform4.S src/mesa/x86/rtasm/x86sse.c src/mesa/x86/rtasm/x86sse.h windows/VC6/progs/glut/glut.dsp windows/VC7/mesa/gdi/gdi.vcproj windows/VC7/mesa/glu/glu.vcproj windows/VC7/mesa/mesa.sln windows/VC7/mesa/mesa/mesa.vcproj windows/VC7/mesa/osmesa/osmesa.vcproj windows/VC7/progs/glut/glut.vcproj windows/VC8/mesa/gdi/gdi.vcproj windows/VC8/mesa/glu/glu.vcproj windows/VC8/mesa/mesa.sln windows/VC8/mesa/mesa/mesa.vcproj windows/VC8/progs/glut/glut.vcproj
| | * mesa: refactor: move multisample-related functions into new multisample.c fileBrian Paul2008-06-091-38/+0
| | |
| | * mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to ↵Brian Paul2008-06-091-79/+0
| | | | | | | | | | | | framebuffer.c
| | * mesa: refactor: move glClear, glClearColor into new clear.c file.Brian Paul2008-06-091-143/+1
| | |
| | * mesa: refactor: move scissor functions into new scissor.c fileBrian Paul2008-06-091-75/+0
| | |
| | * Set _NEW_BUFFERS in glRead/DrawBuffer().Brian2007-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we set _NEW_PIXEL and _NEW_COLOR in these functions, respectively. That correponds to the GL attribute groups, but doesn't make much sense otherwise. This could improve validation efficiency in a few places too. It looks like all the drivers are already checking for _NEW_BUFFERS in the right places (since that's the bit for FBO state) so we can trim out _NEW_PIXEL and _NEW_COLOR at any time.
| | * Add some FLUSH_CURRENT() calls.Brian2007-10-171-0/+2
| | | | | | | | | | | | | | | | | | | | | Without these we can find ourselves in _mesa_load_state_parameters() computing derived lighting/material values whhen the current material properties haven't been updated from the VBO. This may be a somewhat wide-spread problem that needs more attention...
| | * remove st_draw.h includeBrian2007-08-021-2/+0
| | |
| | * Reroute some clear functionality.Keith Whitwell2007-08-021-8/+0
| | | | | | | | | | | | | | | Still require the intelClear() call to flush batchbuffers. That will be removed later...
| | * Checkpoint: glClear changes - working, bug very rough.Brian2007-08-011-0/+10
| | |
* | | mesa: more info in error messagesBrian Paul2009-02-041-2/+3
| | |
* | | Make GL_ARB_draw_buffers mandatoryIan Romanick2009-01-281-4/+0
| | | | | | | | | | | | Signed-off-by: Ian Romanick <[email protected]>
* | | mesa: refactor: move multisample-related functions into new multisample.c fileBrian Paul2008-09-211-38/+0
| | |
* | | mesa: refactor: move _mesa_resizebuffers(), _mesa_ResizeBuffersMESA() to ↵Brian Paul2008-09-211-79/+0
| | | | | | | | | | | | | | | | | | framebuffer.c (cherry picked from commit 9091015a9782ad15e58540a8fd61df83ea2bfe31)
* | | mesa: refactor: move glClear, glClearColor into new clear.c file.Brian Paul2008-09-211-148/+1
| | |
* | | mesa: refactor: move scissor functions into new scissor.c fileBrian Paul2008-09-211-75/+0
| | | | | | | | | | | | (cherry picked from commit 4be7296bfcba22a849f949d105ea385e6964cc25)
* | | Add some FLUSH_CURRENT() calls.Brian2008-09-211-0/+2
|/ / | | | | | | | | | | | | | | Without these we can find ourselves in _mesa_load_state_parameters() computing derived lighting/material values whhen the current material properties haven't been updated from the VBO. This may be a somewhat wide-spread problem that needs more attention... (cherry picked from commit 49adf51eeec31c9f3c995a70acc5008522689708)
* | mesa: fix issues around multisample enableRoland Scheidegger2008-07-021-1/+1
| | | | | | | | | | multisample enable is enabled by default, however gl mandates multisample rendering rules only apply if there's also a multisampled buffer.
* | fix bug 13978: glDrawBuffersARB() didn't set all necessary stateBrian2008-01-091-0/+2
| |
* | Replace gl_framebuffer's _ColorDrawBufferMask with _ColorDrawBufferIndexesBrian2008-01-061-45/+44
| | | | | | | | | | | | | | Each array element is now a BUFFER_x token rather than a BUFFER_BIT_x bitmask. The number of active color buffers is specified by _NumColorDrawBuffers. This builds on the previous DrawBuffer changes and will help with drivers implementing GL_ARB_draw_buffers.
* | Simplify ctx->_NumColorDrawBuffers, _ColorDrawBuffers and fix bug 13835.Brian2008-01-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | These fields are no longer indexed by shader output. Now, we just have a simple array of renderbuffer pointers. If the shader writes to gl_FragData[i], send those colors to the N _ColorDrawBuffers. Otherwise, replicate the single gl_FragColor (or the fixed-function color) to the N _ColorDrawBuffers. A few more changes and simplifications can follow from this...
* | additional GL_COLOR_ATTACHMENTx_EXT cases (bug 13767)Brian2008-01-021-0/+8
| |
* | additional GL_COLOR_ATTACHMENTx_EXT cases (bug 13767)Brian2008-01-011-0/+8
| |
* | Don't call the driver clear hook when the effective scissor rectangle is empty.Michel Dänzer2007-10-171-1/+3
| |
* | remove dead code left over after fixing GL_READ/DRAW_BUFFER state issuesBrian2007-08-181-47/+0
| |
* | Rework the GL_READ_BUFFER, GL_DRAW_BUFFER state repairs that Roland ↵Brian2007-08-161-5/+81
| | | | | | | | | | | | | | | | | | previously did. Basically, in update_framebuffer() (which should be called after an FBO is bound with MakeCurrent or BindFramebuffer) we check if the FBO is a window-system FBO. If it is, update the FBO's GL_READ/DRAW_BUFFER state according to the context state. Old code still in place but disabled with #if 0 / #endif.
* | update comments, etc related to Read/DrawBuffer stateBrian2007-08-161-2/+5
|/
* fix bogus recently introduced function param commentsRoland Scheidegger2007-07-201-2/+0
|
* fix mesa's handling of fbo's / window fb (again)Roland Scheidegger2007-07-191-23/+49
| | | | | | | | Make sure the relevant fields in window fbs get updated at appropriate time (those are NOT the same as fbos!!!), and fix up related code accordingly. This is a bit ugly, but there's a reason the issues section in EXT_fbo is a couple hundred pages long... Hopefully correct now.
* more fixes for mesa's fbo handling (fixes tests/fbotest1/2)Roland Scheidegger2007-07-191-3/+2
|
* In supported_buffer_bitmask(), use framebuffer's visual, not context's visualBrian2007-06-081-28/+23
|