summaryrefslogtreecommitdiff
path: root/src/mesa/tnl/t_vb_arbprogram.c
AgeCommit message (Collapse)Author
2006-06-01Fix extended swizzling in vertex programs by introducing special swizzle ↵Roland Scheidegger
instruction, extend the 2 bit rsw field to 3 bit like used in other places. While here, also fix up rsw (negation), dph and try to fix up rsq with negative values (doesn't work, bug seems elsewhere) in the sse codegen code.
2006-05-23Add const qualifiers in a number of places.Brian Paul
2006-04-14Replace ctx->Const.MaxTextureUnits w/ ctx->Const.MaxTexture[Coord/Image]UnitsBrian Paul
in various places. Note that ctx->Texture.CurrentUnit needs to be tested against Coord/Image limits when referenced, not just in glActiveTexture().
2006-04-06Rename CLIP_ALL_BITS to CLIP_FRUSTUM_BITS to reflect the fact that the valueBrian Paul
only includes the 6 frustum bits, not the user-clip plane bit, nor the vertex cull bit.
2006-03-21GLSL fixes:Michal Krol
- generate error on NULL pointers in glShaderSourceARB; - reinstall program object, if current, in glLinkProgramARB; - vertex and fragment shaders are optional in program object; - floor asm was wrongly computed for x86 back-end; - allow for (void) idiom in function prototypes; - all fixed-state uniforms are updated; - local variable initializers are working; - implement texture* and shadow* functions for vertex processor; - generate error if too many arguments in general constructor; - trim unused data in general constructor; - struct r-value field select was badly relocated; Changes: - add derived state gl_fog_attrib::_Scale; - add derived state gl_light::_CosCutoffNeg;
2006-03-02Add position_invarient supportKeith Whitwell
2006-02-13Add ARB_vertex_shader stage just before render stage.Michal Krol
If enabled, all other stages, except render, are disabled.
2006-02-02use calloc instead of malloc so try_codegen field is initialized to zero ↵Brian Paul
(bug 5791)
2005-12-08do away with 'long long' usageBrian Paul
2005-12-08use 64-bit typedefs for portabilityKarl Schultz
2005-12-06C++ fixes, mostly casts (Stephane Conversy)Brian Paul
2005-11-19Remove the _mesa_parse_arb_vertex/fragment_program() functions intoBrian Paul
arbprogparse.c and remove arbvertparse.[ch] and arbfragparse.[ch]. Clean up quite a bit of the arb parsing code. Rewrite parser extension code to avoid a mess of string operations every time the parser was used.
2005-11-12Move stuff common to vertex/fragment_program into the base class, including:Brian Paul
Instructions, InputsRead, OutputsWritten, and Parameters. Also, added debug functions: _mesa_print_instruction(), _mesa_print_program_parameters() and revamp _mesa_print_program().
2005-11-08This patch adds the missing NV_vertex_program2 and NV_vertex_program3Ian Romanick
instructions to the various internal tables. It does not add support for them to the parser nor does it add support for them to the program interpreter. It also corrects some errors in the comments in program_instruction.h. This patch breaks the instruction union in t_vb_arbprogram.h. The opcode field in that union was only 6 bits. When there were only 59+3 instructions that worked fine. However, this patch increases the base instruction count to 69. This requires 7 bits. The problem is that increasing the opcode width to 7 bits increases the size of instruction::rsw to 33 bits. I've increased the size of the union to 64-bit, but this is just a temporary hack (and probably breaks the build on some systems).
2005-11-05use _mesa_num_inst_src_regs() and _mesa_opcode_string()Brian Paul
2005-11-05Unify vertex/fragment program instuctions.Brian Paul
Based on patch by Ian (#4967) but also unify instruction opcodes.
2005-11-04just pass ctx to do_ndc_cliptest() rather than stuffing it in the ↵Brian Paul
arb_vp_machine struct
2005-11-03s/15/VERT_RESULT_MAX/Brian Paul
2005-10-29added some assertions to catch unexpected swizzle values in cvp_emit_arg(), ↵Brian Paul
currently fails sometimes
2005-10-29fix errors in RoughApproxPower(), do_LIT(), _tnl_program_string()Brian Paul
2005-10-28Keith's fixes for RSW and XPD (need temporaries)Brian Paul
2005-10-28include tnl.h to silence warningBrian Paul
2005-10-28Added assert that result != arg0 in do_RSW. This currently fails and needs ↵Brian Paul
fixing.
2005-10-28TNL module needs to implement ctx->Driver.ProgramStringNotify() functionBrian Paul
so that calls to glProgramStringARB() to specify a new program causes the TNL-attached data to get recomputed.
2005-09-19additional wrapper updates, bug 4468Brian Paul
2005-09-16use mesa import wrappers, bug 4468Brian Paul
2005-08-12added FREXPF() macro (bug 4060)Brian Paul
2005-07-15Check for null program->Parameters pointer in validate_vertex_program().Brian Paul
GL_NV_vertex_program programs can't directly reference GL state so this pointer is always NULL.
2005-07-13Use the LDEXPF wrapper macro.Keith Whitwell
2005-07-10Add runtime compiled x87 implementations for most of the remainingKeith Whitwell
opcodes. When enabled via environment vars, gears runs and almost looks right but other apps are still quite buggy.
2005-07-01Use frexp on Windows; frexpf is not available.Karl Schultz
2005-07-01replace some free() calls with _mesa_free()Brian Paul
2005-06-21include light.h to silence warningBrian Paul
2005-06-10remove debug printsKeith Whitwell
2005-06-10Allow the print opcode to compileKeith Whitwell
2005-06-10Add notes about intended precision of opcodes.Keith Whitwell
Remove dead floating point twiddles. Fix bug translating MAD->MUL,ADD.
2005-06-09Another typoKeith Whitwell
2005-06-09Further clean up RoughApproxPow2 and disable the optimized version --Keith Whitwell
it's a very poor approximation.
2005-06-09Fix typo in RoughApproxPow2Keith Whitwell
2005-06-09Store compiled vertex program representations in a pointer in theKeith Whitwell
vertex_program struct. Allow switching between regular and vertex_program implementations of fixed function TNL with the MESA_TNL_PROG environment var (previously this required recompilation). Ensure program compilation only references program data, not the wider context. This means that compiled programs only need to be invalidated when the program string changes, not on other state changes.
2005-06-08Turn off debugKeith Whitwell
2005-06-08Runtime generate sse/sse2 code for some vertex programs. ExperimentalKeith Whitwell
and only active when _TNL_FIXED_FUNCTION_PROGRAM is defined *and* the MESA_EXPERIMENTAL environment variable is set... Works for the arbfplight demo at least.
2005-06-08Remove ARL opcode from interpreter.Keith Whitwell
Revert SEL opcode to MSK. Split out t_vb_arbprogram.h header file.
2005-06-07Initialize some variables.Keith Whitwell
2005-06-07Simplify interpreted language:Keith Whitwell
- Expand operand argument specifiers so that all registers and parameters can be referenced directly. Remove old PAR/PRL instructions. - No 3 operand instructions, translate MAD -> MUL, ADD. (No room for 3 full operands in instruction struct). - Translate SWZ instructions into 1 or 2 reduced swizzles at compile time. - Add hardwired code for moving input and output values to/from the register file. Drop old INx, OUT instructions.
2005-05-10Missing from previous commitKeith Whitwell
2005-04-29Add DISASSEM define, similar to other program generator files.Keith Whitwell
2005-04-22Move the call to _tnl_UpdateFixedFunctionProgram to makeKeith Whitwell
it easier for hardware drivers to test this out.
2005-04-22Simplify the pipeline_stage structureKeith Whitwell
- remove input/output fields, input tracking removed. - remove state fields, the validate function now called on every statechange. - add an explicit 'create' function. Add in code to build vertex program to implement current t&l state. Still disabled, but turn on with a #define in t_vp_build.h.
2005-04-21New software implementation of ARB_vertex_program. Similar in speedKeith Whitwell
to existing version, but with the potential for good improvements.