summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
Commit message (Collapse)AuthorAgeFilesLines
* for VERTEX_ATTRIB_WEIGHT, use break, not returnBrian Paul2006-09-061-1/+2
|
* Hack for Warcraft (bug 8060): allow 'vertex.weight' to be referenced inBrian Paul2006-09-051-0/+10
| | | | | vertex program, even though it's not really supported. Results will be undefined, but Warcraft doesn't actually use the attribute.
* fix typo in enable_parser_extensions(): s/point_parameters/vertex_blend/Brian Paul2006-09-051-1/+1
|
* Consolidate common case of _mesa_set_program_error() followed by _mesa_error()Brian Paul2006-09-051-248/+172
| | | | | | in new program_error() function. Add const qualifiers in many places. Reorder some debug code to prevent referencing free'd memory.
* Check that we don't try to reference more than one target of a texture unit.texmem_0_2_20060912Brian Paul2006-08-301-1/+17
| | | | | For example, referencing both "texture[0], 2D" and "texture[0], CUBE" in one program is an error.
* fix initialization of native resource usage of vertex/fragment programsRoland Scheidegger2006-08-301-0/+10
|
* use _mesa_alloc_instructions()Brian Paul2006-08-251-2/+1
|
* update MAX_INSTRUCTIONS limitBrian Paul2006-08-241-1/+4
|
* use _mesa_realloc_instructions()Brian Paul2006-08-241-6/+6
|
* Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul2006-07-201-3/+3
| | | | "gl_" to match other structs.
* propagate errors from parse_generic_attrib_num in parse_attrib_binding (-> ↵Tilman Sauerbeck2006-06-281-2/+4
| | | | don't segfault when you're trying to access invalid generic attributes
* don't do the check for >= MAX_VERTEX_PROGRAM_ATTRIBS twice, it's already ↵Tilman Sauerbeck2006-05-291-6/+0
| | | | done in parse_generic_attrib_num()
* generic attribute 0 wasn't handled correctly (Jesse Allen)Brian Paul2006-05-291-0/+8
|
* fix second memory leak (bug 5557)Brian Paul2006-04-281-4/+5
|
* fix first memory leak (bug 5557)Brian Paul2006-04-281-0/+5
|
* No longer alias generic vertex attribs with conventional attribs for ↵Brian Paul2006-04-251-1/+6
| | | | GL_ARB_vertex_program.
* More GLSL code:Michal Krol2006-04-111-2/+2
| | | | | | | | | | | | - use macros to access and modify render inputs bit-field; - un-alias generic vertex attributes for ARB vertex calls; - use MAX_VERTEX_PROGRAM_ATTRIBS (NV code) or MAX_VERTEX_ATTRIBS (ARB code) in place of VERT_ATTRIB_MAX; - define VERT_ATTRIB_GENERIC0..15 for un-aliased vertex attributes for ARB_vertex_shader; - fix generic attribute index range check in arbprogparse.c; - interface GLSL varyings between vertex and fragment shader; - use 64-bit optimised bitset (bitset.h) for render inputs;
* move NumNativeAlu/TexInstruction assignments (Ewald Snel)Brian Paul2006-03-291-6/+3
|
* ARL dst idx was undefined.Aapo Tahkola2006-03-221-1/+2
|
* C++ fixes, mostly casts (Stephane Conversy)Brian Paul2005-12-061-5/+5
|
* Make Saturate a 2-bit field again, renamed to SaturateMode with threeBrian Paul2005-11-201-32/+32
| | | | possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
* remove incorrect castBrian Paul2005-11-191-1/+1
|
* Remove the _mesa_parse_arb_vertex/fragment_program() functions intoBrian Paul2005-11-191-107/+247
| | | | | | | 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.
* Move stuff common to vertex/fragment_program into the base class, including:Brian Paul2005-11-121-17/+15
| | | | | | Instructions, InputsRead, OutputsWritten, and Parameters. Also, added debug functions: _mesa_print_instruction(), _mesa_print_program_parameters() and revamp _mesa_print_program().
* remove unneeded #includesBrian Paul2005-11-081-8/+2
|
* Unify vertex/fragment program instuctions.Brian Paul2005-11-051-86/+85
| | | | Based on patch by Ian (#4967) but also unify instruction opcodes.
* Streamline code generation by using a fixed size instruction buffer inBrian Paul2005-11-031-65/+17
| | | | arb_program struct.
* fix typo, minor clean-upsBrian Paul2005-11-031-5/+5
|
* Rename FRAG_OUTPUT_* tokens to FRAG_RESULT_* to match vertex program conventionBrian Paul2005-11-021-3/+3
|
* Several fp and vp tweaks:Keith Whitwell2005-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | - Renumber VERT_RESULT_* values so that they match the numbers of the corresponding FRAG_ATTRIB_ values. - Add ctx->VertexProgram._Current and FragmentProgram._Current values which point to either the current client-supplied program if enabled, or otherwise to the current mesa-internal program. Thus this program is always the correct one for the current state, providing that the mesa flags to turn on automatic generation are enabled. - Add callbacks to ctx->Driver.BindProgram() in texenvprogram.c and t_vp_build.c so that the driver knows when the generated program changes. This is cleaner than trying to code all the possible _NEW_* flags into the driver, and more precise as well. - Add a UsesKill flag to identify fragment programs with that instruction, as these can require special treatment. - Move the FRAG_OUTPUT values to mtypes.h, near to similar defn's.
* Re-org and clean-up of vertx/fragment program limits (instructions,Brian Paul2005-11-011-13/+29
| | | | | | | temporaries, parameters, etc). glGetProgramivARB() now returns all the right things. Updated i915 and r300 code to initialize program native limits and current program's native instruction/temporary/etc counts.
* Simplify parse_attrib_binding().Brian Paul2005-10-301-98/+49
| | | | | | Now only use VERT_ATTRIB_* and FRAG_ATTRIB_* tokens instead of hard-coded numbers. Note: previous check-in did similarly for output register parsing.
* Lots of clean-up in arb program parser.Brian Paul2005-10-301-214/+189
| | | | Use new _mesa_init_fp/vp_instruction() function to initialize instructions.
* Use MAKE_SWIZZLE4() macro in a few more places.Brian Paul2005-10-291-119/+98
| | | | Clean up the parse_extended_swizzle_mask() and parse_swizzle_mask() functions.
* s/lenght/length/Brian Paul2005-10-291-2/+2
|
* If parsing a program fails, don't change the vertex/fragment program object.Brian Paul2005-10-291-27/+31
| | | | | | Specifically, don't attach a dummy program. This change also fixes an occasional segfault. Some code clean-ups. Use GLboolean instead of GLuint to return pass/fail.
* fix broken SWZ instructionBrian Paul2005-10-211-8/+9
|
* additional wrapper updates, bug 4468Brian Paul2005-09-191-9/+11
|
* remove unused ctx varBrian Paul2005-09-161-1/+0
|
* use mesa import wrappers, bug 4468Brian Paul2005-09-161-1/+1
|
* be consistent in populating NegateBase fieldKeith Whitwell2005-09-081-17/+11
|
* Wrap every place that accesses a dispatch table with a macro. A new script-Ian Romanick2005-07-181-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generated file, called src/mesa/glapi/dispatch.h, is added. This file contains three macros for each API function. It contains a GET, a SET, and a CALL. Each of the macros take a pointer to the context and a pointer to the dispatch table. In several threads on mesa3d-dev we discussed replacing _glapi_add_entrypoint with a new function called _glapi_add_dispatch. For this discussion, the important difference between the two is that the caller of _glapi_add_dispatch does *not* know what the dispatch offset will be at compile time. Because of this callers need to track the dispatch offset returned by _glapi_add_dispatch. http://marc.theaimsgroup.com/?t=111947074700001&r=1&w=2 The downside is that driver code then has to access the dispatch table two different ways. It accesses it using structure tags (e.g., exec->Begin) for functions with fixed offsets and via a remap table (e.g., exec[ remap->NewExtensionFunction ]) for functions without fixed offsets. Yuck! Using the macros allows both types of functions to be accessed identically. If a driver needs to set a pointer for Begin, it does 'SET_Begin(ctx, exec, my_begin_function)'. If it needs to set a pointer for NewExtensionFunction, it does 'SET_NewExtensionFunction(ctx, exec, my_NewExtensionFunction_function)'. Furthermore, if at some point in the future a static offset is assigned for NewExtensionFunction, only the macros need to change (instead of every single place that accesses a table for that function). This code differs slightly from the originally posted patches in that the CALL, GET, and SET marcos no longer take a context pointer as a parameter. Brian Paul had suggested that the remap table could be stored as a global since it would be set at CreateScreen time and would be constant for all contexts. This change reflects that feedback. http://marc.theaimsgroup.com/?t=112087194700001&r=1&w=2
* Set fp->Opcode for OP_TEX_KILL case, fix from Ben Skeggs.Keith Whitwell2005-07-011-0/+1
|
* comment-out some unused code to silence warningsBrian Paul2005-07-011-1/+2
|
* Port Mesa to build on a P64 platform (e.g., Win64). P64 platformsKarl Schultz2005-05-051-1/+1
| | | | | | | | use 64-bit pointers and 32-bit longs. So, operations like casting pointers to unsigned long and back to pointer won't work. glheader.h now includes files to define uintptr_t, which should instead be used for this sort of operation. It is an integer type that is the same size as a pointer.
* Mark unused registers as undefined so dissassemblers can recognizedKeith Whitwell2005-05-041-0/+10
| | | | them easily.
* Reduce the size of mesa's internal fragment and vertex programKeith Whitwell2005-04-211-183/+281
| | | | | representations by switching to packed structures for registers and instructions.
* do not use isdigit() - can cause link errorsMichal Krol2005-04-141-1/+1
|
* fixed problems with parse_float() (fd.o bug 2520)Brian Paul2005-02-161-27/+48
|
* make sure the new instruction Data pointer is set to NULLBrian Paul2005-01-191-0/+6
|