summaryrefslogtreecommitdiff
path: root/src/mesa/main/texobj.c
AgeCommit message (Collapse)Author
2009-06-22mesa: create/use a fallback texture when bound texture is incompleteBrian Paul
When a GLSL sampler reads from an incomplete texture it should return (0,0,0,1). Instead of jumping through hoops in all the drivers to make this happen, just create/install a fallback texture with those texel values. Fixes piglit/fp-incomplete-tex on i965 and more importantly, fixes some GPU lockups when trying to sample from missing surfaces. If a binding table entry is NULL, it seems that sampling sometimes works, but not always (lockup). Todo: create a fallback texture for each type of texture target? (cherry picked from commit 3f25219c7bf0f090502489928f0f018e62c4f6cf)
2009-06-17Fast path when rebinding the same texture in single context environmentIan Romanick
If there is no shared context, there is no purpose in rebinding the same texture. In some artificial tests this improves performance 10% - 30%. (cherry picked from commit 7f8000db8bd45bb95bda4a4f8535c49b8ef74254)
2009-03-17mesa: update/fix doxygen commentsVinson Lee
2009-02-22mesa: move a bunch of compiler-related stuff into new compiler.h headerBrian Paul
This trims down and cleans up imports.h and glheader.h quite a bit.
2009-02-21mesa: use an array for current texture objectsBrian Paul
Use loops to consolidate lots of texture object code.
2009-02-21mesa: use an array for default texture objectsBrian Paul
Replace Default1D/2D/3D/Cube/etc with DefaultTex[TEXTURE_x_INDEX]. The same should be done with the Current1D/2D/3D/etc pointers...
2009-02-07mesa: minor fixes to incomplete texture debug codeBrian Paul
2009-01-30mesa: add missing _mesa_reference_texobj() calls for texture array targetsBrian Paul
2009-01-28mesa: remove GL_SGIX_shadow, GL_SGIX_shadow_ambient and GL_SGIX_depth_textureBrian Paul
Everyone should be using the newer/better ARB versions of these extensions.
2009-01-28mesa: set/get new state for GL_EXT_texture_swizzleBrian Paul
2009-01-21mesa: add some debug assertions to detect null current texture object pointersBrian Paul
See bug #17895. These assertions could be removed when this is resolved.
2008-12-14Perform range checking on app supplied texture base levelIan Romanick
It is possible for applications to specify any texture base level, including trivially invalid values (i.e., 47000000). When an app specifies an invalide base level, we should gracefully disable the texture instead of accessing memory outside the gl_texture_object. This fixes an occasional segfault in one of our conformance tests.
2008-09-21mesa: refactor: move #define FEATURE flags into new mfeatures.h fileKeith Whitwell
Also, check the FEATURE flags in many places. (cherry picked from commit 40d1a40f294f1ed2dacfad6f5498322fc08cc2d1) Conflicts: src/mesa/main/config.h src/mesa/main/context.c src/mesa/main/texobj.c src/mesa/main/texstate.c src/mesa/main/texstore.c
2008-08-18mesa: rearrange some code in _mesa_BindTexture() to fix error detection bug ↵Brian Paul
17173 Also, move GL_TEXTURE_RECTANGLE init code into separate function.
2008-08-07mesa: fix glBindTexture error string (bug 17005)Brian Paul
2008-08-06mesa: fix comment about texture targets (bug 17005)Brian Paul
2008-02-15Fix glBindTexture crash (bug 14514)Brian
2007-08-16Bring over the texobj refcounting changes from mesa_7_0_branchBrian
2007-08-14Fix a few more problems with freeing FBOs/textures during context destruction.Brian
Free FBOs before textures since the later may be referenced by the former. Need to bind the context we're destroying if there isn't a current context so that ctx->DeleteTexture() etc can be used.
2007-08-13Implement mutex/locking around texture object reference counting.Brian
Use new _mesa_reference_texobj() function for referencing/unreferencing textures. Add new assertions/tests to try to detect invalid usage of deleted textures.
2007-06-11Replace texobj->Complete with texobj->_Complete since it's a derived field.Brian
2007-05-21get rid of GenTexturesLock, used ctx->Shared->MutexBrian
2007-05-21remove the unused texobj Mutex fieldBrian
2007-05-21remove a VMS-ism that doesn't seem needed elsewhereBrian
2007-05-21improve some comments, clean-up formattingBrian
2007-05-16Initial implementation of MESA_texture_arrayIan Romanick
Shadow sampling from texture arrays is still not implemented. Everything else should be there, though.
2007-05-10Refactor the loop in unbind_texobj_from_texunits.Ian Romanick
Common code was pulled out of the per-target if-statment and put at the end of the for-loop. The common code is guarded by a new variable, curr, that is set to point to the unit's current target in each if-statement.
2007-01-23fixes for C++ warnings/errorsBrian
2006-11-01Merge texmem-0-3-branch.Keith Whitwell
2006-06-15added some comments, braces in _mesa_BindTextureBrian Paul
2006-03-26merge from texman branchBrian Paul
2006-03-20Lots of changes/fixes for rendering to framebuffer objects.Brian Paul
- When deleting texture objects, unbind from FBOs if necessary. - Changed driver hooks for starting/ending render to texture. - Now properly handle case where gl[Copy]TexImage() is called after glFramebufferTexture[123]D(). That didn't work before.
2005-10-05Remove _IsPowerOfTwo from gl_texture_object, not really needed.Brian Paul
2005-10-05In gl_texture_image replace IntFormat with InternalFormat and Format withBrian Paul
_BaseFormat to be consistant with gl_renderbuffer.
2005-09-23 Committing in .Jouk Jansen
1) change compilation on VMS to use IEEE floating points 2) one more problem with _mesa_sprintf solved Modified Files: Mesa/docs/README.VMS Mesa/progs/demos/descrip.mms Mesa/progs/tests/descrip.mms Mesa/progs/util/descrip.mms Mesa/progs/xdemos/descrip.mms Mesa/src/glu/mesa/descrip.mms Mesa/src/glu/sgi/descrip.mms Mesa/src/glut/glx/descrip.mms Mesa/src/mesa/array_cache/descrip.mms Mesa/src/mesa/drivers/common/descrip.mms Mesa/src/mesa/drivers/osmesa/descrip.mms Mesa/src/mesa/drivers/x11/descrip.mms Mesa/src/mesa/glapi/descrip.mms Mesa/src/mesa/main/descrip.mms Mesa/src/mesa/main/texobj.c Mesa/src/mesa/math/descrip.mms Mesa/src/mesa/shader/descrip.mms Mesa/src/mesa/shader/grammar/descrip.mms Mesa/src/mesa/shader/slang/descrip.mms Mesa/src/mesa/swrast/descrip.mms Mesa/src/mesa/swrast_setup/descrip.mms Mesa/src/mesa/tnl/descrip.mms ----------------------------------------------------------------------
2005-09-16use mesa import wrappers, bug 4468Brian Paul
2005-03-22add FreeTexImageData hook to help single-copy texturing in driversKeith Whitwell
2005-02-12unlock mutex upon error return (Jeff Muizelaar)Brian Paul
2005-02-11mesa-main-0-NULL.patch from Jeff MuizelaarKeith Whitwell
2005-02-05Remove the Shared->TexObjectList pointer and Next field from gl_texture_object.Brian Paul
Was only used by two drivers to walk over all texture objects. Can do that via the hash table instead. Cleaned up some comments for struct gl_texture_object.
2005-01-26added mutex to-do commentBrian Paul
2005-01-19Change behaviour of glDeleteTextures as discussed on ARB list.Brian Paul
glDeleteTexture makes the texture ID immediately free for re-use while the actual texture object lingers until its reference count goes to zero (when no longer bound by any rendering context).
2004-12-21`t' was not initialized (use `texture' instead?)Daniel Borca
2004-12-21fix bug in _mesa_IsTexture()Brian Paul
2004-09-23added a comment in BindTextureBrian Paul
2004-09-14Repeatedly deleting a texture ID with glDeleteTextures() could lead to a crash.Brian Paul
Added a DeletePending flag to texture object struct to fix that. Other misc clean-ups.
2004-08-25Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch ↵Brian Paul
1015696)
2004-03-20minor clean-upsBrian Paul
2004-02-06inform driver of changed wrap/filter parameters due to binding of nv_texrect ↵Roland Scheidegger
texture
2004-01-27Consolidate texObj->Pos/Neg/X/Y/Z and texObj->Image into a singleKeith Whitwell
array, texObj->Image[face][level].