Brian Paul
1fbc71937f
mesa: added _mesa_GetBufferParameteri64v()
...
This is a new function in GL 3.2. No dispatch for this function yet.
2010-01-02 10:32:37 -07:00
Brian Paul
dd5691e802
mesa: code refactoring to eliminate a switch stmt in bind_buffer_object()
2009-10-27 20:10:59 -06:00
Brian Paul
f338de4018
mesa: fix more buffer object error messages
2009-09-22 13:47:49 -06:00
Brian Paul
dc947c8f92
mesa: combined PBO validate/map helpers
2009-09-03 11:45:17 -06:00
Brian Paul
1b448c7a5c
mesa: consolidate PBO map/unmap helpers
...
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().
2009-09-03 11:45:17 -06:00
Brian Paul
2f6d2a9e27
mesa: change ctx->Driver.BufferData() to return GLboolean for success/failure
...
Return GL_FALSE if we failed to allocate the buffer. Then raise
GL_OUT_OF_MEMORY in core Mesa.
2009-09-03 09:42:38 -06:00
Brian Paul
2b6ab615a4
mesa: set additional fields in _mesa_buffer_map_range()
2009-08-31 09:12:04 -06:00
Brian Paul
d1da8acd82
mesa: set Length/Offset fields in _mesa_buffer_map()
2009-08-31 09:05:28 -06:00
Brian Paul
822c796481
mesa: additional assertions for ctx->Driver.UnmapBuffer()
...
The Pointer, Offset and Lenght fields should be cleared by the driver function
since ctx->Driver.Unmap() may be called from VBO code, etc.
2009-08-31 09:01:58 -06:00
Brian Paul
92033a9516
mesa: new assertions, comments about buffer mapping
...
Since ctx->Driver.MapBuffer() and ctx->Driver.MapBufferRange() may be called
from other places in Mesa (such as VBO) it's important that the driver
callbacks set all the buffer object fields properly (Pointer, Offset, Length,
etc). Add assertions to make sure that the driver does that.
2009-08-31 08:50:15 -06:00
Brian Paul
604031563c
mesa: use _mesa_is_bufferobj()
2009-08-12 17:28:45 -06:00
Brian Paul
7bf6efe780
mesa: use _mesa_bufferobj_mapped()
2009-08-07 09:50:38 -06:00
Brian Paul
331eb58f68
mesa: make buffer object-related driver fallback functions static
...
Plug them in via _mesa_init_buffer_object_functions().
2009-06-19 10:00:03 -06:00
Brian Paul
70d247c69b
Merge branch 'arb_map_buffer_range'
...
Conflicts:
docs/relnotes-7.6.html
src/mesa/main/mtypes.h
2009-06-15 16:42:42 -06:00
Brian Paul
0854b7e972
mesa: use _mesa_reference_buffer_object() in a few places
2009-06-12 16:01:02 -06:00
Brian Paul
4a7fd6323a
mesa: added a simple bounds checker to glMap/UnmapBuffer() (disabled)
2009-06-09 14:05:17 -06:00
Brian Paul
e75b283b45
mesa: implement GL_ARB_map_buffer_range
...
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.
2009-06-08 17:02:36 -06:00
Brian Paul
e7927626c1
mesa: added buffer object debug code (disabled)
2009-06-03 17:16:00 -06:00
Brian Paul
2813c08b35
mesa: fix error test mistake in _mesa_CopyBufferSubData()
2009-06-02 21:35:11 -06:00
Brian Paul
dc0b71f00d
mesa: _mesa_CopyBufferSubData() function, and driver fall-back
2009-06-02 21:35:11 -06:00
Brian Paul
ebb991ca0d
mesa: use Elements() for loop bound
2009-05-22 14:16:00 -06:00
Brian Paul
a65f385b8d
mesa: minor code simplification
2009-05-22 14:14:53 -06:00
Brian Paul
f7ca97f85e
mesa: remove pointless null ptr check, improved some error messages
2009-05-21 09:17:09 -06:00
Brian Paul
4f6b704f97
mesa: move the NullBufferObj from GLcontext to gl_shared_state
...
Since shared array objects may point to the null/default buffer object,
the null/default buffer object should be part of the shared state.
2009-05-07 14:34:09 -06:00
Brian Paul
105c8529e7
mesa: fix comments, s/texture/buffer/
2009-05-07 14:34:09 -06:00
Brian Paul
6359ecebec
mesa: remove unused gl_buffer_object::OnCard field
2009-05-07 10:12:33 -06:00
Brian Paul
dcca97a3e3
mesa: added gl_buffer_object::Written flag (for debug purposes)
...
The flag is set when we data has been written into the buffer object.
2009-05-07 10:12:33 -06:00
Brian Paul
b9d0f947f2
mesa: Compute gl_client_array->_MaxElement during array validation
...
Used to be done in the glVertex/Normal/Color/etc/Pointer() calls but
if the VBO was reallocated the size could change.
New _NEW_BUFFER_OBJECT state flag.
2009-05-07 10:12:33 -06:00
Brian Paul
67025f7893
mesa: set bufObj->Pointer = NULL after unmapping
...
Also, ctx->Driver.UnmapBuffer can never be null, so remove conditional.
2009-02-27 13:10:45 -07:00
Brian Paul
a7f434b486
mesa: if a buffer object is mapped when glDeleteBuffers() is called, unmap it
2009-02-27 13:04:38 -07:00
Brian Paul
395bcad8c0
mesa: updated comments
2009-02-27 12:56:07 -07:00
Brian Paul
75e3ccf6a5
mesa: fix incorrect error handling in glBufferDataARB()
...
If glBufferDataARB() is called while a buffer object is currently mapped
we're supposed to unmap the current buffer, then replace it. Don't generate
an error.
2009-02-27 12:56:07 -07:00
Brian Paul
0815ebccfc
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
src/mesa/main/ffvertex_prog.c
src/mesa/main/texenvprogram.c
2009-01-02 16:32:26 -07:00
Brian Paul
e9b34885b8
mesa: increase max texture image units and GLSL samplers to 16
...
The max texture coord units is still 8. All the fixed-function paths are
still limited to 8 too. But GLSL shaders can use more samplers now.
Note that some texcoord-related data structures are declared to be 16
elements in size rather than 8. This just simplifies the code in a few
places; the extra elements aren't accessible to the user.
These changes haven't been extensively tested yet, but sanity checking has
been done.
It should be possible to increase the max image units/samplers to 32 without
doing anything special. Beyond that we'll need longer bitfields in a few
places.
2008-12-31 12:00:17 -07:00
Brian Paul
6c72bc8089
mesa: fix default buffer object access value
2008-09-26 07:31:42 -06:00
Keith Whitwell
89ab66448e
Merge commit 'origin/master' into gallium-0.2
...
Conflicts:
progs/trivial/Makefile
src/mesa/glapi/glthread.c
2008-09-18 19:03:02 +01:00
Brian Paul
d36f4ef16b
mesa: remove some assertions that are invalid during context tear-down
2008-09-15 09:07:32 -06:00
Alan Hourihane
47ad296a18
Merge branch 'master' of git+ssh://git.freedesktop.org/git/mesa/mesa into 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
2008-09-11 17:32:18 +01:00
Keith Whitwell
0397b2bb41
Merge branch 'gallium-0.1' into gallium-0.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
2008-09-11 16:05:15 +01:00
Brian Paul
37c74af01c
mesa: improved gl_buffer_object reference counting
...
Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.
2008-09-04 14:59:40 -06:00
Brian Paul
1437b41d90
gallium: fix typo s/_mesa_unmap_drapix_pbo/_mesa_unmap_drawpix_pbo/
2008-04-25 14:18:09 -06:00
Brian
a39091bc5b
Refactor PBO validate/map code.
...
We always need to do PBO validation, so do that in core Mesa before calling driv
er routine.
cherry-picked from Mesa/master.
2008-03-21 14:20:07 -06:00
Brian
d933be6baf
Refactor PBO validate/map code.
...
We always need to do PBO validation, so do that in core Mesa before calling driver routine.
2008-03-21 14:19:28 -06:00
Brian Paul
ff938bf059
add a number of PBO validate/map/unmap functions
...
Helper functions for (some) drivers, including swrast.
cherry-picked from Mesa/master
2008-03-21 13:43:07 -06:00
Brian
a429a25cd5
add a number of PBO validate/map/unmap functions
...
Helper functions for (some) drivers, including swrast.
2008-03-21 13:41:00 -06:00
Brian
4b654d41da
For _mesa_share_state(), update the context's references to the new share group's objects (Shane Blackett)
2007-08-23 08:53:43 +01:00
Brian
7e85b0a025
silence C++ warnings
2007-01-23 12:50:08 -07:00
Brian Paul
76785cb70a
move a conditional into an assertion
2006-09-21 22:59:50 +00:00
Brian Paul
4277ea4c0b
Error detection/reporting was broken in several places.
2006-08-25 22:06:02 +00:00
Brian Paul
4d12a05e6c
Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoid
...
a lot of casting elsewhere.
Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300
driver.
2006-08-23 23:10:14 +00:00