summaryrefslogtreecommitdiff
path: root/src/mesa/main/texenvprogram.c
AgeCommit message (Collapse)Author
2009-08-07mesa: reformat code to allow setting breakpoints on the true-statementBrian Paul
2009-08-03texenv: Use VP->Current, since _Current isn't updated at this point.Eric Anholt
2009-08-03texenv: Match state.c in deciding whether we'll be using a vertex shader.Eric Anholt
2009-07-16texenv: Calculate whether we need to do secondary color on our own.Eric Anholt
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.
2009-07-14Fix state flag dependencies for fixed function fragment program updates.Eric Anholt
I started looking into why _NEW_ARRAY punishes us, and while annotating dependencies noticed that a bunch of dependencies were missing.
2009-06-15mesa: Always return a value.José Fonseca
2009-04-14mesa: merge the prog_src_register::NegateBase and NegateAbs fieldsBrian Paul
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.
2009-04-01mesa: texture combine clean-upsBrian Paul
Use MAX_COMBINER_TERMS instead of 4. Rename some vars. Update comments.
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-02-28mesa: rename, reorder FRAG_RESULT_x tokensBrian Paul
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).
2009-02-20mesa: add TexShadow field to prog_instructionBrian Paul
If the instruction is TEX/TXP/TXL/etc the TexShadow field will be true if the instruction is a texture fetch with shadow compare.
2009-02-10Merge commit 'origin/gallium-master-merge'Brian Paul
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-10mesa: remove the unused _mesa_UpdateTexEnvProgram() functionBrian Paul
2009-02-09mesa: merge gallium-0.2 into gallium-master-mergeBrian Paul
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-01-23mesa: updated fragment shader codegen for GL_NV_texture_env_combine4Brian Paul
Expand struct fields, increase loops and handle new 4-term ADD modes. Plus, some new assertions to catch switch/default cases that may be incorrect.
2009-01-02Merge commit 'origin/master' into gallium-0.2Brian Paul
Conflicts: src/mesa/main/ffvertex_prog.c src/mesa/main/texenvprogram.c
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-12-30mesa: Do not specify types in bitfields.José Fonseca
As advised by gcc -pedantic.
2008-12-17mesa: choose GLSL vertex shader over ARB/internal vertex program in ↵Brian Paul
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.
2008-12-17mesa: fix fixed-function test in get_fp_input_mask() - again.Brian Paul
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.
2008-12-17mesa: add missing cases for texture array targetsBrian Paul
2008-12-17Revert "mesa: fix vertex program test in get_fp_input_mask()"Brian Paul
This reverts commit 8dc88cb64305c591dfadded2b5acbb1e6b04cd7f. This change broke other things...
2008-12-17mesa: fix vertex program test in get_fp_input_mask()Brian Paul
We were accidentally using the fixed-function logic when a vertex shader was being used.
2008-11-20Merge commit 'origin/master' into gallium-0.2Alan Hourihane
2008-11-20mesa: fix shadow sampling unit issue.Xiang, Haihao
texture comparison logic is bypassed if the currently bound texture is not a depth/depth_stencil texture.
2008-11-05Merge commit 'origin/gallium-0.1' into gallium-0.2Brian Paul
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
2008-10-20mesa: note that texcoords are generated by setup routines when pointsprite ↵Keith Whitwell
enabled
2008-10-15Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell
Conflicts: src/mesa/main/context.c
2008-10-10mesa: new _mesa_set_vp_override() function for driver-override of vertex programBrian Paul
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.
2008-10-10Merge commit 'origin/gallium-0.1' into gallium-0.2Keith Whitwell
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
2008-10-07mesa: replace GLuint with GLbitfield to be clearer about usageBrian Paul
Also, fix up some comments to be doxygen style.
2008-10-07mesa: protect against segfault in get_fp_input_mask()Keith Whitwell
2008-10-04mesa: handle vertex program enabled case also in texenvprogram.cKeith Whitwell
2008-10-03mesa: avoid generating constant vertex attributes in fixedfunc programsKeith Whitwell
Keep track of enabled/active vertex attributes. Keep track of potential vertex program outputs. When generating fragment program, replace references to fragment attributes which are effectively non-varying and non-computed passthrough attributes with references to the new CURRENT_ATTRIB tracked state value. Only downside is slight ugliness in VBO code where we need to validate state twice in succession.
2008-10-03mesa: shrink texenvprogram state key structKeith Whitwell
2008-10-02mesa: fix temp register allocation problems.Brian Paul
Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
2008-09-26mesa: fix temp register allocation problems.Brian Paul
Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
2008-09-26mesa: increase MAX_INSTRUCTIONSBrian Paul
2008-09-26mesa: fix swizzle failure, fix typoBrian Paul
2008-09-25mesa: increase MAX_INSTRUCTIONSBrian Paul
2008-09-25mesa: fix swizzle failure, fix typoBrian Paul
2008-09-24set SamplerUnit[] entry in load_texture() just to be safeBrian
(cherry picked from commit fce4612f8a29ee1798c9326a431a139d856c7a04)
2008-09-24use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating ↵Brian
immediates/literals (cherry picked from commit fdc8636bdc65deb0d95a62a51c8d9bca05bc6bb8)
2008-09-24set program->SamplersUsed bit when using a texture instructionBrian
2008-09-24Remove ctx field from texenvprog_cacheBrian
2008-09-24include programopt.hBrian
(cherry picked from commit 83fad68ec1989c719646a76f4cc5e0b3d23537ed)
2008-09-24Disable vertex shader fog, compute fog in fragment shader.Brian
2008-09-24temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabledBrian
(cherry picked from commit 63be96bdc7e9f388a5c49295bd7e150462fd003a)
2008-09-23mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca
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