summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
AgeCommit message (Collapse)Author
2007-05-23Fix point attentuation problem (bug 11042)Brian
ctx->Point._Attentuation was computed in wrong place and the VB->Eye coord Z array wasn't indexed correctly in run_point_stage().
2007-05-22fog: fix potential issues with generated vp using fogRoland Scheidegger
Change the generated vertex programs (tnl/brw) to follow the same logic as the tnl fog wrt using absolute value, and sync them up a bit (untested).
2007-05-22fog: fix issues with negative fog coords (may fix #10529)Roland Scheidegger
Rework tnl fog a bit. Make sure we always use ABS(eyez) when fog coord source is depth, OTOH it does not seem to be necessary to use it (as was done before in some cases) if fog coord source is fogcoord (just to save some work). This fixes tests/fog (the first 2 cases) with i915/i915tex.
2007-05-02changes to get DDX/DDY working againBrian
2007-05-02Document a deficiency in the _swrast_Translate() function with regard to ↵Brian
point size.
2007-04-17Enable texture sampling for vertex programs/shaders.Brian
This is a bit of a hack for now because the tnl module is using the swrast module to fetch texels. The texture fetch/filter code should probably be moved into the main/ module since it doesn't really depend upon other swrast code.
2007-04-17In bind_inputs() set VB->EdgeFlag to NULL if it's not needed.Brian
Otherwise, the clip/interp code was finding VB->EdgeFlag to be non-null and reading/writing it when the memory may have been freed earlier in free_space(). This fixes several VTK segfaults/failures reported by Brad King @ Kitware.
2007-04-17cleanups for t_vb_program.cRoland Scheidegger
use VertexProgram._Current instead of VertexProgram.Current in a few more places. Only fixup fogc and psiz in case this is really a nv program (others are fine if undefined), and fix this case up so the values actually get written.
2007-04-16removed unused t_vb_arbprogram stageBrian
2007-04-16unhook t_vb_arbprogram.c code - it's going awayBrian
2007-04-16Use generic program limits instead of NV-specific ones to init program ↵Brian
constants. Previously, this limited us to 12 temp regs for vertex programs. Many vertex shaders could exceed that. This forces us to stop using t_vb_arbprogram.c for now because of its particular register indexing scheme. Need to increase bits allocated for register indexing, etc.
2007-04-02Fix in t_vp_build: Missed necessary updates sometimesNicolai Haehnle
_mesa_update_state doesn't always reset VertexProgram._Current to NULL. This caused us to skip a necessary update of the fixed function vertex program sometimes. Change the logic such that we check for updates whenever the _Current program is either NULL or the program generated by t_vp_build.
2007-03-28Get rid of BRK0, BRK1, CONT0, CONT1 instructions.Brian
2007-03-27fix a fragment fog regressionBrian
2007-03-27init machine->StackDepth=0Brian
2007-03-27more parenthesisBrian
2007-03-27recommit e731d8aafa98bbf9d30f83e65f28b7718be55834.Roland Scheidegger
This got lost with glsl-compiler-1 merge, it fixes segfaults when using ATI_fragment_shader, which uses the ProgramStringNotify mechanism but doesn't have a valid program pointer.
2007-03-27add parenthesis around a bit-wise AND term in _tnl_InvalidateState()Brian
2007-03-27Restore the UseTexEnvProgram logic.Brian
Was removed during glsl-compiler work. Still need to go back and revisit this because of the interaction with fragment shaders...
2007-03-26merge of glsl-compiler-1 branchBrian
2007-03-24When computing render_inputs_bitset, omit primary color if we have a ↵Brian
fragment program and it doesn't need FRAG_ATTRIB_COL0. Silences valgrind warnings.
2007-03-23Add the ability to generate programs that doesn't use condition codes.Brian
ctx->Shader.EmitCondCodes determines if we use condition codes. If not, IF statement uses first operand's X component as the condition. Added OPCODE_BRK0, OPCODE_BRK1, OPCODE_CONT0, OPCODE_CONT1 to handle the common cases of conditional break/continue.
2007-03-22use _mesa_alloc_instructions()Brian
2007-03-21merge from masterBrian
2007-03-19Properly compute render_inputs_bitset when using a vertex program/shader.Brian
This fixes a performance regression introduced early in glsl-compiler-1 work.
2007-03-13sync up t_vp_build.c brw_vs_tnl.c a bitRoland Scheidegger
Bring over the optimizations for fog and normalized spot dir from t_vp_build.c to brw_vs_tnl.c. Likewise, port a fix for point size calc from brw_vs_tnl.c to t_vp_build.c (use ABS(eyez) instead of -eyez). Leave the now differing point size calcs alone though, not sure what's better (it's basically MOV, ABS, MUL, DP3 vs. ABS, MAD, MAD).
2007-03-11fix for bug#10196Xiang, Haihao
Compute half if LOCAL_VIEWER is enabled and the light is a directional source.
2007-02-25remove 'maxInst' parameter from _mesa_execute_program()Brian
2007-02-25remove unused 'element' parameter from _mesa_execute_program()Brian
2007-02-25s/attribs/results/Brian
2007-02-25remove unused VaryingPtrBrian
2007-02-25Optimize the loop for copying output results.Brian
2007-02-25only copy used outputsBrian
2007-02-24Use prog_execute.c to run vertex programs until t_vb_arbprogram.c is updated toBrian
handle branch instructions, etc.
2007-02-23expose _mesa_load_tracked_matrices()Brian
2007-02-23s/GLint/gl_state_index/, length is now 5 not 6Brian
2007-02-22use new _mesa_execute_program() functionBrian
2007-02-22FORCE_PROG_EXECUTE_C cpp flag, misc changesBrian
2007-02-22Undo some STATE_POINT/FOG changes. Max length of state token array is now 5.Brian
2007-02-22Merge branch 'origin' into glsl-compiler-1Brian
Conflicts: src/mesa/main/state.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/programopt.c src/mesa/shader/slang/slang_execute.c src/mesa/sources src/mesa/swrast/s_arbshader.c src/mesa/swrast/s_context.c src/mesa/swrast/s_span.c src/mesa/swrast/s_zoom.c src/mesa/tnl/t_context.c src/mesa/tnl/t_save_api.c src/mesa/tnl/t_vb_arbprogram.c src/mesa/tnl/t_vp_build.c src/mesa/tnl/t_vtx_eval.c
2007-02-21more minor changes to STATE_ indexingBrian
2007-02-21adjustments to STATE_ token layout/format so token[1] is always the array indexBrian
2007-02-17Lots of changes to prog_print.c code.Brian
Mainly, allow printing programs in either ARB, NV or "debug" formats.
2007-02-14fix stupid bug in the optimized per-vertex fog generation codeRoland Scheidegger
2007-02-09optimize generated vertex programs a bitRoland Scheidegger
Use new internal state to avoid per-vertex normalization of static spot direction vector. Use internal state for simpler per-vertex fog computations (MAD instead of SUB/MUL for linear fog, EX2 instead of POW for EXP/EXP2 fog). Simplify point size calc (2 MADs instead of MOV, MUL, MUL, DP3), and while there fix it up (RSQ instead of RCP). All untested...
2007-02-05Initial implementation of high-level flow-control instructions.Brian
IF/ELSE/ENDIF and BEGIN_LOOP/END_LOOP/BREAK instructions seem to work. Disabled by default though until better tested. Implemented IR_NOT, but needs optimization.
2007-02-05fix issues when using mixed-mode pos-invariant vp and ff tnl (bug #9856)Roland Scheidegger
ARB_vp requires vertex transformation to be invariant to fixed function tnl if the position_invariant option is used. So the same function needs to be used, otherwise z-fighting artifacts may happen with applications which rely on the results being really the same due to precision issues when dealing with floating point values (may not be a problem when using a non-optimizing compiler strictly following IEEE rules).
2007-02-05Initial support of loop and subroutine instructions.Brian
New high-level flow-control instructions, both at IR level and GPU instructions for looping and subroutines.
2007-02-02Merge branch 'vbo-0.2'Keith Whitwell
Conflicts: src/mesa/main/texcompress_s3tc.c src/mesa/tnl/t_array_api.c
2007-01-30Use new rebase helper. Remove other rebase code.Keith Whitwell