Brian Paul
b5d6a8e88f
mesa: minor clean up in check_begin_texture_render()
2009-10-12 18:12:01 -06:00
Brian Paul
45e76d2665
mesa: remove a bunch of gl_renderbuffer fields
...
_ActualFormat is replaced by Format (MESA_FORMAT_x).
ColorEncoding, ComponentType, RedBits, GreenBits, BlueBits, etc. are
all replaced by MESA_FORMAT_x queries.
2009-10-08 20:27:27 -06:00
Eric Anholt
6d0fc3cfde
mesa: Remove another unexplained Flush call, this time from BindFramebuffer.
...
Combined with the previous fix, it takes cairo-gl firefox-talos-gfx time
from 120 seconds to 90 seconds on my GM45.
2009-10-02 11:42:07 -07:00
Eric Anholt
f019577f0c
Revert "Flush driver, not just tnl module."
...
This reverts commit df058298e1
. It didn't
explain why it was required, doesnt appear to be required, and is a
significant performance penalty for cairo-gl firefox.
Conflicts:
src/mesa/main/fbobject.c
2009-10-02 11:41:29 -07:00
Brian Paul
1f7c914ad0
mesa: replace gl_texture_format with gl_format
...
Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum.
ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x.
gl_texture_format will go away next.
2009-09-30 20:28:45 -06:00
Brian Paul
eb82373abb
mesa: use _mesa_get_current_tex_unit() helper
2009-09-28 09:22:33 -06:00
Brian Paul
5cf5d4be21
mesa: use more format helper functions
2009-09-27 20:51:18 -06:00
Brian Paul
ef6ee07fc7
mesa: minor clean-up
2009-09-15 18:17:43 -06:00
Brian Paul
c26c2006df
mesa: clean-up fbo debug code
2009-09-15 18:17:42 -06:00
Brian Paul
3ffaa11f88
mesa: move assertions in test_attachment_completeness()
...
Put the assertions after the error checks.
2009-08-14 10:30:10 -06:00
Brian Paul
dcebe220f4
mesa: generate GL_INVALID_OPERATION for missing z/stencil when blitting
...
If glBlitFramebuffer() is called with GL_DEPTH_BUFFER_BIT or
GL_STENCIL_BUFFER_BIT and the src/dst depth/stencil buffers are absent,
report an error.
2009-08-05 13:44:59 -06:00
Eric Anholt
957f3c8c3d
mesa: Mark FBOs with compressed color attachments as FBO-incomplete.
...
Both EXT_fbo and ARB_fbo agree on this. Fixes a segfault in the metaops
mipmap generation in Intel for SGIS_generate_mipmap of S3TC textures in
Regnum Online.
Bug #21654 .
(cherry picked from commit 0307e609aa
)
2009-06-17 11:06:46 -07:00
Mathias Fröhlich
042d9a5132
mesa: allow depth/stencil textures to be attached to GL_STENCIL_ATTACHMENT
...
See sourceforge bug #2793846 .
2009-05-19 09:59:01 -06:00
Keith Whitwell
009749b4a8
mesa: protect driver.flush() with FLUSH_CURRENT
...
Need to do this to ensure vbo code unmaps its buffers before calling
the driver, which may be sitting on top of a memory manager which
objects to firing commands from a mapped buffer.
2009-04-22 09:03:17 +01:00
Brian Paul
1614463235
mesa: avoid extraneous calls to ctx->Driver.BindFramebuffer()
...
Only call this driver function when we really need to bind different buffers.
2009-02-26 18:48:35 -07:00
Brian Paul
9f731c8962
mesa: add some debug code to help diagnose incomplete FBO attachments (disabled)
2009-02-17 16:47:54 -07:00
Brian Paul
5340b6dff7
Merge commit 'origin/gallium-master-merge'
...
This is the big merge of the gallium-0.2 branch into master.
gallium-master-merge was just the staging area for it.
Both gallium-0.2 and gallium-master-merge are considered closed now.
Conflicts:
progs/demos/Makefile
src/mesa/main/state.c
src/mesa/main/texenvprogram.c
2009-02-10 16:44:02 -07:00
Brian Paul
d52294439c
mesa: replace _mesa_unreference_framebuffer() with _mesa_reference_framebuffer()
2009-02-09 14:00:47 -07:00
Brian Paul
e97681c7f5
mesa: merge gallium-0.2 into gallium-master-merge
...
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
2009-02-09 09:22:22 -07:00
Brian Paul
5fec84ad04
mesa: allow glFramebufferTexture1/2/3D(target = GL_READ/DRAW_FRAMEBUFFER)
...
This is part of GL_EXT_framebuffer_blit and GL_ARB_framebuffer_obbject.
2009-01-29 15:01:09 -07:00
Brian Paul
2897cee99f
mesa: fix a render to texture FBO validation bug
...
When glTexImage() is called we need to re-validate any FBOs that point to
the texture (i.e. render-to-texture) since changing the texture's size/format
will effect FBO completeness.
We don't keep a list of all FBOs rendering into each texture (which would be
a bit messy) so we check all FBOs in existance. To optimize this, the
gl_texture_object->_RenderToTexture flag is used to avoid checking textures
that have never been used as renderbuffers. So, we only walk over all FBOs
(there's usually only a few) when glTexImage() modifies a RTT texture.
Fixes a bug seen in shadowtex.c when toggling packed depth/stencil mode.
2009-01-29 09:20:18 -07:00
Brian Paul
38768dbc76
mesa: move call to _mesa_update_framebuffer_visual()
...
Update the visual info in the _mesa_test_framebuffer_completeness()
function when we've determined the FBO to be "complete".
Fixes regression seen in progs/demos/shadowtex.c
2009-01-27 09:49:27 -07:00
Brian Paul
7296636ad0
mesa: avoid calling _mesa_test_framebuffer_completeness() more than needed
...
When we change a FBO's attachments, set _Status=0.
Before using an FBO, check if status != GL_FRAMEBUFFER_COMPLETE.
Also, fix missing GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE status.
2009-01-22 15:21:17 -07:00
Brian Paul
d0f13fa7d7
mesa: fix some renderbuffer/framebuffer delete semantics
...
Need to unbind buffers if referenced by the current read/draw pointers when
being deleted.
2009-01-22 15:20:45 -07:00
Brian Paul
3059007f0c
mesa: add support for GL_DEPTH_STENCIL_ATTACHMENT point.
...
Used to set both the depth and stencil attachment points to one renderbuffer
of texture.
2009-01-22 15:20:36 -07:00
Brian Paul
722d976283
mesa: additional FBO error checking for multisample-related things
...
Plus some new comments.
2009-01-22 15:20:22 -07:00
Brian Paul
4f3514e410
mesa: refactor glRenderbufferStorage(), glRenderbufferStorageMultisample() code
...
Use a common helper routine for both functions.
2009-01-22 15:19:56 -07:00
Brian Paul
777a2efc77
mesa: stub for _mesa_RenderbufferStorageMultisample()
2009-01-22 15:17:42 -07:00
Brian Paul
1f32c410dd
mesa: call fbo_incomplete() if driver marks FBO as incomplete (debug only)
2009-01-22 15:16:17 -07:00
Brian Paul
3528f69ce4
mesa: added ctx->Driver.ValidateFramebuffer() callback
...
Called from the _mesa_test_framebuffer_completeness() function to give the
driver the chance to make a framebuffer as incomplete if it doesn't meet
some specific hardware restriction.
2009-01-22 15:13:18 -07:00
Brian Paul
1bc59bf4f8
mesa: add new ARB_fbo queries, fix some error tests
2009-01-22 15:07:34 -07:00
Brian Paul
06f3b2e679
mesa: additional FBO/RB id error checking for ARB_fbo
...
It's illegal to bind a FBO/RB id that didn't come from glGenRender/Framebuffer().
2009-01-22 15:06:17 -07:00
Brian Paul
989edea409
mesa: for ARB_fbo, lift restriction that all FBO attachments are same size and color format
2009-01-22 15:05:13 -07:00
Alan Hourihane
608e14c5b2
Merge commit 'origin/master' into gallium-0.2
2008-12-09 16:17:57 +00:00
Eric Anholt
f849d364c2
mesa: Fix GenerateMipmapEXT(GL_TEXTURE_CUBE_MAP_ARB).
...
The ctx->Driver.GenerateMipmap() hook only expects cubemap face enums, not
CUBE_MAP_ARB, so walk all faces when we encounter that. Fixes oglconform
fbo.c segfault with both swrast and i965 drivers.
2008-12-06 22:41:52 -08:00
Brian Paul
868c09a267
mesa: fix some feature tests
...
(cherry picked from commit 74b14fe6dd
)
2008-09-21 22:13:57 -07: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
74b14fe6dd
mesa: fix some feature tests
2008-08-08 13:06:54 -06:00
Brian Paul
d23b54a423
fix some FBO/texture queries (bug 15296)
2008-08-06 08:42:09 -06:00
Brian Paul
f1e4ca776f
fix some FBO/texture queries (bug 15296)
2008-08-06 08:40:25 -06:00
Brian Paul
2fa7b3f786
mesa: Implement mutex/locking around texture object reference counting.
...
Use new _mesa_reference_texobj() function for referencing/unreferencing
textures. Add new assertions/tests to try to detect invalid usage of
deleted textures.
cherry-picked from master (9e01b915f1
)
2008-07-04 10:29:15 -06:00
Brian Paul
b931a0c1d9
mesa: remove incorrect assertion
2008-07-04 10:04:03 -06:00
Brian Paul
c4b6941e62
mesa: move assertion
2008-07-04 10:02:43 -06:00
Brian Paul
d015ffa6ea
mesa: fix problem freeing framebuffer/renderbuffer objects
...
Basically, set up no-op Delete() methods for the DummyFrame/Renderbuffer obj
2008-07-03 17:21:22 -06:00
Brian Paul
3dc6591a7c
mesa: fix problem freeing framebuffer/renderbuffer objects
...
Basically, set up no-op Delete() methods for the DummyFrame/Renderbuffer objects.
2008-07-03 15:40:38 -06:00
Dave Airlie
0449bab2f8
Revert "mesa/intel: map/unmap texture objects around mipmap generation function."
...
This reverts commit c50ffc4cb8
.
I'll fix this using the mipmap hooks I just picked from gallium-0.1
2008-05-09 13:33:56 +10:00
Brian
d4e1d85dba
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()
...
(cherry picked from commit c3395f4473
)
2008-05-09 13:33:29 +10:00
Dave Airlie
a638676473
Added ctx->Driver.GenerateMipmap() driver hook
...
(cherry picked from commit 4c2f3dbca9
)
Conflicts:
src/mesa/drivers/common/driverfuncs.c
2008-05-09 13:33:06 +10:00
Dave Airlie
c50ffc4cb8
mesa/intel: map/unmap texture objects around mipmap generation function.
...
This at least stops the compiz brain explosion we were seeing, I do wonder
though if we should somehow be calling intel_generate_mipmap somehow.
2008-05-09 13:02:41 +10:00
Brian
635e964712
fix texture/renderbuffer mix-up in test_attachment_completeness()
2008-03-28 13:24:39 -06:00