aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenvprogram.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa: added default case return to silence warningBrian Paul2009-09-241-0/+1
|
* mesa: in texenvprogram code, only do saturation when really needed.Brian Paul2009-09-101-8/+53
| | | | | For some env modes (like modulate or replace) we don't have to clamp because we know the results will be in [0,1].
* mesa: compute tex env program key size based on nr_enabled_unitsBrian Paul2009-09-031-8/+18
| | | | | | | When no textures are enabled, the key size is 4 bytes. If unit[0] is enabled, the key size is 16 bytes. Inspired by a patch from Chris Wilson.
* Revert "mesa: fix the non-GNU C bit-field case"Brian Paul2009-09-021-2/+2
| | | | | | This reverts commit 4b08e7498230eac30eea1721f33994b30999acd4. Don't know what I was thinking there.
* mesa: fix the non-GNU C bit-field caseBrian Paul2009-09-021-2/+2
|
* mesa: silence gcc bit-field warningGary Wong2009-09-021-2/+2
|
* mesa: remove accidentally committed printfBrian Paul2009-09-021-1/+0
|
* mesa: added #ifdef __GNUC__ around GLubyte bitfield usageBrian Paul2009-09-021-0/+5
| | | | | | | | | It would be nice if there were a #pragma or something to disable the warnings: main/texenvprogram.c:87: warning: type of bit-field ‘Source’ is a GCC extension main/texenvprogram.c:88: warning: type of bit-field ‘Operand’ is a GCC extension but there doesn't appear to be a way to do that.
* mesa: Compact state key for TexEnv program cacheChris Wilson2009-09-021-3/+5
| | | | | | By rearranging the bitfields within the key we can reduce the size of the key from 644 to 196 bytes, reducing the cost of both the hashing and equality tests.
* mesa: more clean-upsBrian Paul2009-09-011-24/+31
|
* mesa: change conditional to match the previous oneBrian Paul2009-09-011-1/+1
|
* mesa: updated #includesBrian Paul2009-09-011-2/+1
|
* mesa: remove unused texenv_fragment_program::ctx fieldBrian Paul2009-09-011-2/+0
|
* mesa: remove unused ureg::abs fieldBrian Paul2009-09-011-5/+2
|
* mesa: remove unused ureg:negateabs fieldBrian Paul2009-09-011-4/+1
|
* mesa: more comments, clean-upsBrian Paul2009-09-011-10/+10
|
* mesa: simplify translate_tex_src_bit()Brian Paul2009-09-011-20/+3
|
* mesa: minor code clean-ups, commentsBrian Paul2009-09-011-24/+34
|
* mesa: replace 8 with MAX_TEXTURE_UNITSBrian Paul2009-09-011-1/+1
|
* mesa: added const qualifiers, move local varBrian Paul2009-08-311-7/+8
|
* mesa: fix saturation logic in emit_texenv()Brian Paul2009-08-311-1/+7
| | | | | | We need to clamp/saturate after each texenv stage, not just the last one. Fixes glean texEnv failure for softpipe (and probably other fragment program- based drivers).
* mesa: reformat code to allow setting breakpoints on the true-statementBrian Paul2009-08-071-4/+8
|
* texenv: Use VP->Current, since _Current isn't updated at this point.Eric Anholt2009-08-031-1/+1
|
* texenv: Match state.c in deciding whether we'll be using a vertex shader.Eric Anholt2009-08-031-0/+1
|
* texenv: Calculate whether we need to do secondary color on our own.Eric Anholt2009-07-161-3/+15
| | | | | | | | The _TriangleCaps bit is deprecated, not updated when we require, and is set based on state that hasn't been updated at that point in _mesa_update_state_locked(). Fixes incorrect clear color in glsl/twoside.c with meta_clear_tris.
* Fix state flag dependencies for fixed function fragment program updates.Eric Anholt2009-07-141-0/+10
| | | | | I started looking into why _NEW_ARRAY punishes us, and while annotating dependencies noticed that a bunch of dependencies were missing.
* mesa: Always return a value.José Fonseca2009-06-151-0/+1
|
* mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul2009-04-141-2/+1
| | | | | | There's really no need for two negation fields. This came from the GL_NV_fragment_program extension. The new, unified Negate bitfield applies after the absolute value step.
* mesa: texture combine clean-upsBrian Paul2009-04-011-8/+5
| | | | | | Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-121-9/+90
| | | | | | | | 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)
* mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul2009-02-281-3/+3
| | | | | | | s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/ s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/ Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it. Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
* mesa: add TexShadow field to prog_instructionBrian Paul2009-02-201-6/+13
| | | | | If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
* Merge commit 'origin/gallium-master-merge'Brian Paul2009-02-101-19/+163
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul2009-02-091-19/+166
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Merge commit 'origin/master' into gallium-0.2Brian Paul2009-01-021-4/+19
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/main/ffvertex_prog.c src/mesa/main/texenvprogram.c
| | * | mesa: Do not specify types in bitfields.José Fonseca2008-12-301-2/+2
| | | | | | | | | | | | | | | | As advised by gcc -pedantic.
| | * | mesa: choose GLSL vertex shader over ARB/internal vertex program in ↵Brian Paul2008-12-171-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_fp_input_mask() This is a work-around the for the fact that we do fragment shader state validation before vertex shader validation (see comments in state.c) so in get_fp_input_mask() we can't rely on ctx->VertexProgram._Current being up to date yet. This fixes a glean glsl1 test failure.
| | * | mesa: fix fixed-function test in get_fp_input_mask() - again.Brian Paul2008-12-171-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | The problem we're solving only occured when there was a user-defined vertex shader but no fragment shader. Check for that case now. Fixes glean api2 vertex array failure.
| | * | mesa: add missing cases for texture array targetsBrian Paul2008-12-171-6/+10
| | | |
| | * | Revert "mesa: fix vertex program test in get_fp_input_mask()"Brian Paul2008-12-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8dc88cb64305c591dfadded2b5acbb1e6b04cd7f. This change broke other things...
| | * | mesa: fix vertex program test in get_fp_input_mask()Brian Paul2008-12-171-3/+1
| | | | | | | | | | | | | | | | | | | | We were accidentally using the fixed-function logic when a vertex shader was being used.
| | * | Merge commit 'origin/master' into gallium-0.2Alan Hourihane2008-11-201-1/+6
| | |\ \
| | * \ \ Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul2008-11-051-0/+12
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/rtasm/rtasm_execmem.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_log.c src/mesa/state_tracker/st_atom_framebuffer.c
| | | * | | mesa: note that texcoords are generated by setup routines when pointsprite ↵Keith Whitwell2008-10-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | enabled
| | * | | | Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-151-2/+12
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/main/context.c
| | | * | | mesa: new _mesa_set_vp_override() function for driver-override of vertex programBrian Paul2008-10-101-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch provide by Keith. Used in state tracker by DrawPixels to indicate that the state tracker (driver) is using its own vertex program. This prevents the texenvprogram code from replacing conventional shader inputs with state vars. Fixes glDraw/CopyPixels regressions.
| | * | | | Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell2008-10-101-16/+106
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gallium/auxiliary/gallivm/instructionssoa.cpp src/gallium/auxiliary/gallivm/soabuiltins.c src/gallium/auxiliary/rtasm/rtasm_x86sse.c src/gallium/auxiliary/rtasm/rtasm_x86sse.h src/mesa/main/texenvprogram.c src/mesa/shader/arbprogparse.c src/mesa/shader/prog_statevars.c src/mesa/state_tracker/st_draw.c src/mesa/vbo/vbo_exec_draw.c
| | | * | | mesa: replace GLuint with GLbitfield to be clearer about usageBrian Paul2008-10-071-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | Also, fix up some comments to be doxygen style.
| | | * | | mesa: protect against segfault in get_fp_input_mask()Keith Whitwell2008-10-071-1/+4
| | | | | |
| | | * | | mesa: handle vertex program enabled case also in texenvprogram.cKeith Whitwell2008-10-041-5/+4
| | | | | |