summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/drawpix.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-171-1/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <[email protected]>
* mesa: Drop manual checks for outside begin/end.Eric Anholt2013-01-211-3/+6
| | | | | | | | | | | We now have a separate dispatch table for begin/end that prevent these functions from being entered during that time. The ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to change any return values or introduce new error-only stubs at this point. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* dispatch: Delete unused init_dispatch functions.Paul Berry2012-11-061-9/+0
| | | | | | | | | | The new code-generated version of _mesa_create_exec_table() populates the entire dispatch table (except for dynamic functions) by itself; it no longer calls separate functions to initialize parts of the dispatch table. This patch removes those no-longer-needed functions. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* dispatch: Make all API functions non-static.Paul Berry2012-11-061-3/+3
| | | | | | | | | | | | | | | | | Some of the functions that we store in the dispatch table are declared as non-static in their .c files and are inserted into the dispatch table directly by _mesa_create_exec_table(). Other functions are declared as static, and are inserted into the dispatch table by a dedicated function that lives in the same .c file (e.g. _mesa_loopback_init_api_table() in api_loopback.c). This patch makes all of these functions non-static, and creates appropriate prototypes for them, so that in future patches we can populate the entire dispatch table using a single code-generated function. Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa: remove #if _HAVE_FULL_GL checksBrian Paul2012-10-161-2/+0
| | | | | | This is basically more of the "remove FEATURE_x" clean-up. Reviewed-by: Ian Romanick <[email protected]>
* mesa: remove FEATURE_drawpix define.Oliver McFadden2012-09-151-6/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Make more consistent use of _mesa_is_{user,winsys}_fbo()Paul Berry2012-07-261-1/+3
| | | | | | | | | | A lot of code was still differentiating between between winsys and user fbos by testing the fbo's name against zero. This converts everything in core mesa, the state tracker, and src/mesa/program over to use _mesa_is_user_fbo() and _mesa_is_winsys_fbo(). Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: add glformats integer type/format detection routinesJordan Justen2012-07-211-1/+2
| | | | | | | | | | | | _mesa_is_integer_format is moved to formats.c and renamed as _mesa_is_enum_format_integer. _mesa_is_format_unsigned, _mesa_is_type_integer, _mesa_is_type_unsigned, and _mesa_is_enum_format_or_type_integer are added. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* msaa: Generate proper error for operations prohibited on MSAA buffers.Paul Berry2012-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | From the GL 3.0 spec, section 4.3.3, in the documentation for CopyPixels(): "An INVALID_OPERATION error will be generated if the object bound to READ_FRAMEBUFFER_BINDING is framebuffer complete and the value of SAMPLE_BUFFERS is greater than zero." The same applies to CopyTexImage...() and CopyTexSubImage...() functions, since they are defined in terms of CopyPixels(). Previously we were generating an INVALID_FRAMEBUFFER_OPERATION error in these cases. Fixes piglit tests "EXT_framebuffer_multisample/negative-{copypixels,copyteximage}". Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: implement DEBUG_ALWAYS_FLUSH debug optionBrian Paul2012-05-111-0/+12
| | | | | | | | This flag has been around for a while but it wasn't actually used anywhere. Now, setting this flag causes a glFlush() to be issued after each drawing call (including glBegin/End, glDrawElements, glDrawArrays, glDrawPixels, glCopyPixels and glBitmap).
* mesa: stop using _mesa_error_check_format_type() in glDrawPixelsBrian Paul2012-02-071-3/+35
| | | | | | | | | | | | The _mesa_error_check_format_type() function does two things: check that format/type is legal and check that the destination (or source buffer for glReadPixels) actually exists. Just move the relevant parts of that into _mesa_DrawPixels(). We'll do a similar change in glReadPixels then get rid of the function altogether. Signed-off-by: Brian Paul <[email protected]>
* mesa: Throw the required error for glCopyPixels from multisample FBO.Eric Anholt2012-01-121-0/+6
| | | | | | | Fixes piglit EXT_framebuffer_multisample/negative-copypixels. Reviewed-by: Brian Paul <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* mesa: Move RasterDiscard to toplevel of gl_context.Paul Berry2011-12-211-3/+3
| | | | | | | | | | | | | | | | | | | | Previously we were storing the RasterDiscard flag (for GL_RASTERIZER_DISCARD) in gl_context::TransformFeedback. This was confusing, because we use the _NEW_TRANSFORM flag (not _NEW_TRANSFORM_FEEDBACK) to track state updates to it, and because rasterizer discard has effects even when transform feedback is not in use. This patch makes RasterDiscard a toplevel element in gl_context rather than a subfield of gl_context::TransformFeedback. Note: We can't put RasterDiscard inside gl_context::Transform, since all items inside gl_context::Transform need to be pieces of state that are saved and restored using PushAttrib and PopAttrib. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* mesa: Reject glDrawPixels(integer format).Eric Anholt2011-12-041-0/+18
| | | | | | | When folding GL_EXT_texture_integer into the core, a new (and very sensible) restriction was added. Reviewed-by: Brian Paul <[email protected]>
* mesa: Respect GL_RASTERIZER_DISCARD for various meta-type operations.Eric Anholt2011-10-011-0/+11
| | | | | | | | | | | | | | | | From the EXT_transform_feedback spec: Primitives can be optionally discarded before rasterization by calling Enable and Disable with RASTERIZER_DISCARD_EXT. When enabled, primitives are discared right before the rasterization stage, but after the optional transform feedback stage. When disabled, primitives are passed through to the rasterization stage to be processed normally. RASTERIZER_DISCARD_EXT applies to the DrawPixels, CopyPixels, Bitmap, Clear and Accum commands as well. And the GL 3.2 spec says it applies to ClearBuffer* as well. Reviewed-by: Brian Paul <[email protected]>
* mesa: add missing ')' in error messageBrian Paul2011-09-151-1/+1
|
* Squashed commit of the following:Brian Paul2011-04-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 864fe253b04105b7469e5f7b064dc37637b944f8 Author: Brian Paul <[email protected]> Date: Thu Apr 21 20:13:07 2011 -0600 mesa: s/exec/disp/ in _mesa_init_histogram_dispatch() This function isn't normally compiled (FEATURE_histogram). commit f4bf45e2b94b582cacd19cdca873c5be627e4250 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: hook up GL_ARB_robustness dispatch functions ...and advertise the extension. Signed-off-by: Brian Paul <[email protected]> commit 2b89e38e5f572dc40cebc06381ae7c5d04386998 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:58 2011 -0600 mesa: regenerated API files for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 5d5ebfb7135cec9d833adef86cbf4d0f3d9beca8 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 glapi: add ARB_robustness xml Signed-off-by: Brian Paul <[email protected]> commit 0159d1d6d99f4bbc18381dc2081c20d3aff17ac9 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: implement GL_ARB_robustness functions Signed-off-by: Brian Paul <[email protected]> commit 938fd71f4c4742f274922d53492a7290ab8d9c9b Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add context fields for GL_ARB_robustness Signed-off-by: Brian Paul <[email protected]> commit 72075137bc79e65be03dac7e97b6dba93c3a86a4 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize more bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit 32a3fc23746db49da903fbc08afa0135af3007d2 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: standardize some bounds-checking error messages Signed-off-by: Brian Paul <[email protected]> commit cecbf1f4d164207de373dec0cadee2e84e1f9656 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add more bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit edc895b52383d5bd274422db56adead1d81daf5f Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: add bounds-checking support for client memory buffers Signed-off-by: Brian Paul <[email protected]> commit 3a96ef28a538f158a219b406cd090dee70470c85 Author: nobled <[email protected]> Date: Thu Apr 21 07:53:57 2011 -0600 mesa: use is_bufferobj() helper function Signed-off-by: Brian Paul <[email protected]>
* mesa: minor whitespace fixesBrian Paul2011-03-241-1/+1
|
* mesa: remove stray _mesa_finish() call in _mesa_CopyPixels()Brian Paul2011-03-071-2/+0
| | | | Leftover debug code from 6364d75008b4fa580c1cb47c59ba1cf3e0caa6cd.
* mesa: move PBO-related functions into a new fileBrian Paul2011-02-281-0/+1
|
* mesa: MESA_VERBOSE logging for glRead/Draw/CopyPixels, glBlitFramebufferBrian Paul2011-02-181-0/+23
|
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: Remove unnecessary headers.Vinson Lee2010-10-271-2/+0
|
* mesa: call _mesa_valid_to_render() in glDrawPixels, glCopyPixels, glBitmapBrian Paul2010-10-261-61/+15
| | | | | | | This lets us simplify and consolidate some state checking code. This implements the GL_INVALID_OPERATION check for all drawing commands required by GL_EXT_texture_integer.
* mesa: new glDrawPixels error check for integer formatsBrian Paul2010-10-231-1/+11
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* mesa: Eliminate index parameter to _mesa_feedback_vertexIan Romanick2010-03-031-3/+0
| | | | Signed-off-by: Ian Romanick <[email protected]>
* mesa: Move src/mesa/glapi/dispatch.h to mesa.Chia-I Wu2010-02-251-1/+1
| | | | | | glapi/dispatch.h is a core Mesa header file. Move the header file to main/ to make this clear. It also becomes clear after this change that IN_DRI_DRIVER is only used in core Mesa to enable the remap table.
* mesa: Remove unnecessary header from drawpix.c.Vinson Lee2010-01-181-1/+0
|
* mesa/main: Make FEATURE_drawpix follow feature conventions.Chia-I Wu2009-09-301-8/+18
| | | | | As shown in mfeatures.h, this allows users of drawpix.h to work without knowing if the feature is available.
* mesa: skip bitmap drawing code if width==0 or height==0Brian Paul2009-09-011-19/+22
|
* mesa: add GL_DEPTH_STENCIL to glCopyPixels error checkBrian Paul2009-08-201-1/+8
| | | | | Plus, add a comment about 'type' error checking. See bug 19087.
* mesa: remove _mesa_set_vp_override() from _mesa_Bitmap()Brian Paul2009-08-111-12/+4
| | | | | | | This reverts part of commit 2c9812e3d346eb07180da520909b142e8afc1c59. The calls to _mesa_set_vp_override() were causing extra state validation and caused the gallium state tracker's bitmap cache to get flushed on every call.
* mesa: remove old, prototype codeBrian Paul2009-08-081-65/+0
|
* mesa: use _mesa_set_vp_override() in glDraw/CopyPixels and glBitmapBrian Paul2009-08-071-14/+38
| | | | | | | | We don't use the vertex program in these functions and the driver may install its own. This fixes the broken glCopyPixels swrast fallback in i965 and possibly other drivers. In particular, glCopyPixels sometimes didn't work because the fixed-function fragment program was replacing all fragment colors with the current raster color.
* mesa: use _mesa_bufferobj_mapped()Brian Paul2009-08-071-2/+2
|
* mesa: use valid_fragment_program() helperBrian Paul2009-08-071-3/+15
|
* mesa: do error checking on glCopyPixels() type parameterBrian Paul2009-08-071-8/+15
| | | | | Plus, move some other error checks before state validation and update some comments.
* mesa: don't call ctx->Driver.Draw/CopyPixels() if width or height is zeroBrian Paul2009-04-021-24/+28
|
* mesa: replace FEEDBACK_TOKEN macro with _mesa_feedback_token() inline functionBrian Paul2009-02-281-4/+4
|
* Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-160/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 glReadPixels code into new readpix.c fileBrian Paul2008-06-091-161/+2
| |
| * mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca2008-05-311-1/+1
| |
| * mesa: adjust glBitmap coords by a small epsilonBrian Paul2008-04-241-2/+3
| | | | | | | | | | | | Fixes problem with bitmaps jumping around by one pixel depending on window size. The rasterpos is often X.9999 instead of X+1. Run progs/redbook/drawf and resize window to check.
| * Refactor PBO validate/map code.Brian2008-03-211-0/+50
| | | | | | | | | | | | We always need to do PBO validation, so do that in core Mesa before calling driv er routine. cherry-picked from Mesa/master.
| * Fix some PBO breakage.Brian2008-03-211-8/+6
| | | | | | | | | | In _mesa_Bitmap, can't early return if bitmap ptr is NULL, it may be an offset into a PBO. Similarly for _mesa_GetTexImage.