summaryrefslogtreecommitdiff
path: root/src/mesa/main/texstate.c
AgeCommit message (Collapse)Author
2010-01-17mesa: Remove unnecessary headers from texstate.c.Vinson Lee
2009-10-27mesa: avoid redundant state setting in glClientActiveTextureBrian Paul
Plus add code for verbose/debugging.
2009-10-14mesa: remove unused ctx->Driver.TextureMatrix() hookBrian Paul
2009-09-29Merge branch 'mesa_7_6_branch'Brian Paul
Conflicts: Makefile configs/default docs/relnotes.html src/gallium/drivers/softpipe/sp_context.c src/gallium/drivers/softpipe/sp_tile_cache.c src/mesa/main/version.h
2009-09-29mesa: work-around glXCopyContext() bug in _mesa_copy_texture_state()Brian Paul
See bug 24217.
2009-09-24mesa/main: Make FEATURE_colortable follow feature conventions.Chia-I Wu
As shown in mfeatures.h, this allows users of colortab.h to work without knowing if the feature is available.
2009-09-01mesa: remove redundant assignmentsBrian Paul
2009-05-08mesa: Fixed a texture memory leakRobert Ellison
The current texture for any particular texture unit is given an additional reference in update_texture_state(); but if the context is closed before that texture can be released (which is quite frequent in normal use, unless a program unbinds and deletes the texture and renders without it to force a call to update_texture_state(), the memory is lost. This affects general Mesa; but the i965 is particularly affected because it allocates a considerable amount of additional memory for each allocated texture.
2009-05-05mesa: only use fallback texture when using shaders, not fixed-function (take ↵Brian Paul
two) The semantics are a little different for shaders vs. fixed-function when trying to use an incomplete texture. The fallback texture returning (0,0,0,1) should only be used with shaders. For fixed function, the texture unit is truly disabled/ignored. Fixes glean fbo test regression.
2009-05-05Revert "mesa: only use fallback texture when using shaders, not fixed-function"Brian Paul
This reverts commit a0edbfb28fb2e670c657d52190a7e8b1ccf4f46e. This patch didn't completely fix the problem. The next patch will.
2009-05-05mesa: only use fallback texture when using shaders, not fixed-functionBrian Paul
The semantics are a little different for shaders vs. fixed-function when trying to use an incomplete texture. The fallback texture returning (0,0,0,1) should only be used with shaders. Fixes glean fbo test regression.
2009-05-05mesa: only use fallback texture when using shaders, not fixed-functionBrian Paul
The semantics are a little different for shaders vs. fixed-function when trying to use an incomplete texture. The fallback texture returning (0,0,0,1) should only be used with shaders. Fixes glean fbo test regression.
2009-05-01mesa: 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?
2009-03-13mesa: improve another _mesa_problem() callBrian Paul
2009-03-13mesa: add GL_DUDV_ATI cases in calculate_derived_texenv()Brian Paul
2009-03-13mesa: more info in _mesa_problem() callBrian Paul
2009-03-12mesa: add support for ATI_envmap_bumpmapRoland Scheidegger
add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
2009-03-11mesa: remove gl_texture_object::_Function field and associated codeBrian Paul
It was only used in one place in swrast.
2009-03-02mesa: move call to update_texture_compare_function()Brian Paul
Another conditional can be avoided.
2009-03-02mesa: fix texture enable regressionBrian Paul
Need to clear the _ReallyEnabled field before possibly continuing the loop. Also, set _Current pointer to NULL if the unit is no longer enabled. Fixes piglit lodbias regression
2009-03-02mesa: use _mesa_reference_texobj() when setting texUnit->Current pointerBrian Paul
Fixes piglit copytexsubimage regression.
2009-03-02mesa: fixed computation of _EnabledCoordUnitsBrian Paul
This field should not include vertex textures. It indicates the coord inputs for fragment / fixed-function processing.
2009-03-02mesa: move texture_override() code into calling loopBrian Paul
We can avoid a few iterations this way.
2009-03-02mesa: move update_texture_compare_function() call out of loopBrian Paul
2009-02-28mesa: move _GenFlags = 0x0 to texgen loopBrian Paul
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-22mesa: assorted clean-ups, var renaming, etc.Brian Paul
2009-02-22mesa: simplify texture combine state copying in _mesa_copy_texture_state()Brian Paul
Just copy the whole struct.
2009-02-22mesa: remove redundant assertions (same asserts in context.c)Brian Paul
2009-02-21mesa: use enums for TEXTURE_x_INDEX valuesBrian Paul
Plus, put them in the order of highest to lowest priority to simplify the texture_override() loop.
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-21mesa: re-org texgen stateBrian Paul
New gl_texgen struct allows quite a bit of code reduction.
2009-02-12mesa: don't include m_xform.h where not neededBrian Paul
2009-02-07mesa: code refactoring: move texcombine code into update_tex_combine()Brian Paul
2009-02-07mesa: minor clean-ups, remove unneeded conditionalBrian Paul
2009-02-07mesa: fix logic error in computing enableBits in update_texture_state()Brian Paul
If we had a vertex shader but no fragment shader (i.e. fixed function) we didn't get the right enabled texture targets. Fixes blank/white texture problem.
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-23mesa: update state setup/validation for GL_NV_texture_env_combine4Brian 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-31mesa: increase max texture image units and GLSL samplers to 16Brian Paul
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-09-21mesa: refactor: move various ENUM_TO_x macros into macros.hBrian Paul
2008-09-21mesa: refactor: move glTexParameter-related functions into new texparam.c fileBrian Paul
2008-09-21mesa: refactor: move glTexEnv-related functions into new texenv.c fileBrian Paul
(cherry picked from commit 7ecac78ab53016ae3db3dd601b187cb050037463)
2008-09-21mesa: refactor: move glTexGen-related functions into new texgen.c fileBrian Paul
(cherry picked from commit 27049189d6221fefe43eb55846efaa51742dcdf4)
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-09-21mesa: move fixed function vertex program builder from tnl to core mesaKeith Whitwell
Also unify caching of fragment and vertex programs in shader/prog_cache.c` Brought across from gallium-0.2
2008-08-21Flush vertices when updating texObj->GenerateMipmap state.Eric Anholt
Caught by texturing/gen-teximage test in piglit.
2008-07-04Enable TexGen based on InputsRead when a fragment program is activeNicolai Haehnle
The old behaviour depended on which texture images the fragment program reads from, which seems to contradict the shader specifications. Note: Piglit's general/texgen test checks for this problem.
2008-04-30Add support for GL_REPLACE_EXT texture env mode.Brian Paul
GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension. Found an old demo that actually uses it. The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.