summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/bufferobj.h
Commit message (Collapse)AuthorAgeFilesLines
* dispatch: Make all API functions non-static.Paul Berry2012-11-061-39/+27
| | | | | | | | | | | | | | | | | 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 FEATURE_APPLE_object_purgeable define.Oliver McFadden2012-09-151-2/+0
| | | | | Signed-off-by: Oliver McFadden <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa/es: Pass context to _mesa_init_bufferobj_dispatchIan Romanick2012-08-141-1/+2
| | | | | | | | | | | With this change _mesa_init_bufferobj_dispatch won't set function pointers that don't exist in OpenGL ES. v2: Use _mesa_is_desktop_gl and _mesa_is_gles3 as suggested by Ken. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move glBindBufferBase and glBindBufferRange() to bufferobj.Eric Anholt2012-06-211-0/+7
| | | | | | | | | | | The rest of the TFB implementation remains in transformfeedback.c, and this will be shared with UBOs. v2: Move the size/offset checks shared with UBOs to common code as well. (Kenneth's review) Reviewed-by: Brian Paul <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Move buffer object dispatch setup to bufferobj.c.Eric Anholt2012-06-211-0/+3
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: new _mesa_total_buffer_object_memory() debug functionBrian Paul2012-04-111-0/+2
| | | | | This function can be called in gdb to find out how much memory is used by buffer objects.
* mesa: Set default access flags based on the run-time APIIan Romanick2012-01-191-1/+2
| | | | | | | | | | | | | | | | | | | The default access flags for OpenGL ES (via GL_OES_map_buffer) and desktop OpenGL are different. The code previously tried to handle this, but the decision was made at compile time. Since the same driver binary can be used for both OpenGL ES and desktop OpenGL, the decision must be made at run-time. This should fix bug #44433. It appears that the test case does various map and unmap operations and inspects the state of the buffer object around each. When it sees that GL_BUFFER_ACCESS does not match its expectations, it fails. NOTE: This is a candidate for release branches. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44433
* mesa: check for null ptr in _mesa_is_bufferobj()Brian Paul2011-11-281-1/+1
| | | | | | | This simplifies a few callers. And it adds a bit of robustness. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Yuanhan Liu <[email protected]>
* mesa: s/INLINE/inline/Brian Paul2011-10-011-3/+3
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <[email protected]>
* main: use inline function wrapper for _mesa_reference_buffer_object()Brian Paul2011-07-141-1/+11
|
* mesa: move PBO-related functions into a new fileBrian Paul2011-02-281-41/+0
|
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-11/+11
|
* mesa: Reduce bufferobj.h header file inclusion.Vinson Lee2010-07-291-1/+1
| | | | | Directly include mtypes.h instead of including context.h to include mtypes.h.
* APPLE_object_purgeable: coreChris Wilson2010-03-051-0/+11
| | | | Signed-off-by: Chris Wilson <[email protected]>
* mesa: Enable true refcounting for NullBufferObj.Michal Krol2010-02-091-0/+3
| | | | | | | | This object can be shared with another context, so we cannot just delete it when the owning context is being destroyed. Ensuring that buffer objects are properly refcounted guarantees NullBufferObj is destroyed when all references to it are removed.
* mesa: added _mesa_GetBufferParameteri64v()Brian Paul2010-01-021-0/+3
| | | | This is a new function in GL 3.2. No dispatch for this function yet.
* mesa: combined PBO validate/map helpersBrian Paul2009-09-031-0/+16
|
* mesa: consolidate PBO map/unmap helpersBrian Paul2009-09-031-18/+9
| | | | | | | Instead of _mesa_map_readpix_pbo() use _mesa_map_pbo_source(). Instead of _mesa_map_drawpix_pbo() and _mesa_map_bitmap_pbo() use _mesa_map_pbo_dest().
* mesa: const qualifiersBrian Paul2009-08-121-2/+2
|
* mesa: new _mesa_is_bufferobj() functionBrian Paul2009-08-121-0/+12
| | | | | Tests if the given buffer object is a user-created, non-default buffer object. Use this instead of testing bufferobj->Name != 0.
* mesa: new _mesa_bufferobj_mapped() helper functionBrian Paul2009-08-071-0/+8
|
* mesa: make buffer object-related driver fallback functions staticBrian Paul2009-06-191-45/+3
| | | | Plug them in via _mesa_init_buffer_object_functions().
* mesa: implement GL_ARB_map_buffer_rangeBrian Paul2009-06-081-0/+17
| | | | | | | | | | Only enabled for software drivers at this point. Note that the gl_buffer_object::Access enum field has been replaced by a gl_buffer_object::AccessFlags bitfield. The new field is a mask of the GL_MAP_x_BIT flags which is a superset of the old GL_READ_ONLY, GL_WRITE_ONLY and GL_READ_WRITE modes. When we query GL_BUFFER_ACCESS_ARB we translate the bitfield into the conventional enum values.
* mesa: _mesa_CopyBufferSubData() function, and driver fall-backBrian Paul2009-06-021-1/+14
|
* Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa into ↵Alan Hourihane2008-09-111-7/+4
|\ | | | | | | | | | | | | | | | | | | | | gallium-0.2 Conflicts: src/mesa/drivers/dri/i915/intel_ioctl.c src/mesa/main/texstore.c src/mesa/tnl/t_vp_build.c src/mesa/vbo/vbo_exec_draw.c
| * mesa: improved gl_buffer_object reference countingBrian Paul2008-09-041-7/+4
| | | | | | | | | | Use new _mesa_reference_buffer_object() function wherever possible. Fixes buffer object/display list crash reported in ParaView.
* | Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-3/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * gallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/Brian Paul2008-04-251-2/+2
| |
| * Refactor PBO validate/map code.Brian2008-03-211-15/+9
| | | | | | | | | | | | We always need to do PBO validation, so do that in core Mesa before calling driv er routine. cherry-picked from Mesa/master.
| * add a number of PBO validate/map/unmap functionsBrian Paul2008-03-211-2/+37
| | | | | | | | | | Helper functions for (some) drivers, including swrast. cherry-picked from Mesa/master
* | Refactor PBO validate/map code.Brian2008-03-211-15/+9
| | | | | | | | We always need to do PBO validation, so do that in core Mesa before calling driver routine.
* | add a number of PBO validate/map/unmap functionsBrian2008-03-211-2/+37
| | | | | | | | Helper functions for (some) drivers, including swrast.
* | For _mesa_share_state(), update the context's references to the new share ↵Brian2007-08-231-0/+3
|/ | | | group's objects (Shane Blackett)
* Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoidBrian Paul2006-08-231-0/+3
| | | | | | a lot of casting elsewhere. Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300 driver.
* Add support for GL_APPLE_vertex_array_object. Several test programsIan Romanick2006-06-121-0/+2
| | | | | | | and demos are also added. Adding basic support to drivers should be as easy as just enabling the extension, though thorough test would also be required.
* GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpackingBrian Paul2004-11-101-1/+2
| | | | | | | and ignored for 1D and 2D images. Need to pass in image dimensions (1,2,3) to the _mesa_image_address() function. This change gets propogated to some other routines. Also added new _mesa_image_address[123]d() convenience functions.
* Remove redundant error checking.Brian Paul2004-10-311-1/+4
| | | | | Added _mesa_buffer_unmap(). Minor clean-ups.
* Implementation of GL_EXT_pixel_buffer_object extension.Brian Paul2004-03-131-3/+7
| | | | | Note: extension may not be finalized yet - subject to change! Note: implementation not fully suitable for h/w implementation yet.
* remove duplicate declarationAlan Hourihane2003-12-041-4/+0
|
* Added GLAPIENTRY decorations for all first level OpenGL API function entryKendall Bennett2003-10-211-11/+11
| | | | | points so that the calling conventions will work correctly with the assembler stubs with the Open Watcom compiler.
* minor tweaksBrian Paul2003-10-151-2/+2
|
* More work on ARB_vertex_buffer_object.Brian Paul2003-09-171-0/+9
| | | | | Use GLubyte * instead of void * for gl_client_array->Ptr to simplify upcoming pointer arithmetic changes.
* Added prototypes for internal functions to bufferobj.h.Brian Paul2003-09-091-0/+46
| | | | Minor code clean-ups.
* Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.Ian Romanick2003-06-051-1/+0
|
* fix MapBufferARB() return typeBrian Paul2003-05-101-2/+2
|
* Basic infrastructure for GL_ARB_vertex_buffer_object.Brian Paul2003-03-291-0/+66