summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texenvprogram.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | | | |
| | | * | | mesa: avoid generating constant vertex attributes in fixedfunc programsKeith Whitwell2008-10-031-5/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * | | mesa: shrink texenvprogram state key structKeith Whitwell2008-10-031-5/+7
| | | | | |
| | | * | | mesa: fix temp register allocation problems.Brian Paul2008-09-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
| | | * | | mesa: increase MAX_INSTRUCTIONSBrian Paul2008-09-251-4/+2
| | | | | |
| | | * | | mesa: fix swizzle failure, fix typoBrian Paul2008-09-251-3/+5
| | | | | |
| | * | | | mesa: fix temp register allocation problems.Brian Paul2008-10-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | Complex texcombine modes were running out of registers (>32 registers for 8 tex units).
| | * | | | mesa: increase MAX_INSTRUCTIONSBrian Paul2008-09-261-4/+2
| | | | | |
| | * | | | mesa: fix swizzle failure, fix typoBrian Paul2008-09-261-3/+5
| | | | | |
| | * | | | mesa: get fixed-function program generation working againKeith Whitwell2008-09-121-0/+3
| | | | | |
| | * | | | Merge branch 'gallium-0.1' into gallium-0.2Keith Whitwell2008-09-111-153/+59
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | | * | | mesa: Apply MSVC portability fixes from Alan Hourihane.José Fonseca2008-05-311-5/+5
| | | | | |
| | | * | | use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating ↵Brian2008-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | immediates/literals
| | | * | | set SamplerUnit[] entry in load_texture() just to be safeBrian2007-12-141-0/+4
| | | | | |
| | | * | | set program->SamplersUsed bit when using a texture instructionBrian2007-12-141-1/+3
| | | | | |
| | | * | | Update texenvprogram.c code to use prog_cache.c routines.Brian2007-10-311-128/+7
| | | | | |
| | | * | | Remove ctx field from texenvprog_cacheBrian2007-10-291-12/+11
| | | | | |
| | | * | | Refactor _mesa_UpdateTexEnvProgram()Brian2007-10-291-32/+36
| | | | | | | | | | | | | | | | | | | | | | | | Will be replaced by _mesa_get_fixed_func_fragment_program().
| | | * | | Disable the else clause which assigns the default fragment program to ↵Brian2007-10-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ctx->FragmentProgram._Current The _Current field should either point to the fragment program which is to be run (GLSL, ARB_f_p, fixed-func-generated, etc) or be NULL if conventional fixed-function code is to be used. Matches TNL program code.
| | | * | | properly init dst reg's CondMask/Swizzle fieldsBrian2007-10-231-2/+2
| | | | | |
| | | * | | bump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many ↵Brian2007-10-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | instructions
| | | * | | Generate a texenv fragment program if there's a GLSL vertex shader but no ↵Brian2007-10-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLSL fragment shader. This allows Glean glsl1 test to get pretty far.
| | | * | | include programopt.hBrian2007-09-251-0/+1
| | | | | |
| | | * | | Disable vertex shader fog, compute fog in fragment shader.Brian2007-09-251-5/+11
| | | | | |
| | | * | | temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabledBrian2007-09-181-0/+1
| | | | | |
* | | | | | mesa: remove the unused _mesa_UpdateTexEnvProgram() functionBrian Paul2009-02-101-36/+0
|/ / / / /
* | | | / mesa: updated fragment shader codegen for GL_NV_texture_env_combine4Brian Paul2009-01-231-31/+90
| |_|_|/ |/| | | | | | | | | | | | | | | 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.
* | | | mesa: increase max texture image units and GLSL samplers to 16Brian Paul2008-12-311-4/+19
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | mesa: fix shadow sampling unit issue.Xiang, Haihao2008-11-201-1/+6
| | | | | | | | | | | | | | | texture comparison logic is bypassed if the currently bound texture is not a depth/depth_stencil texture.
* | | set SamplerUnit[] entry in load_texture() just to be safeBrian2008-09-241-0/+4
| | | | | | | | | | | | (cherry picked from commit fce4612f8a29ee1798c9326a431a139d856c7a04)