summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* silence warningBrian Paul2005-01-171-1/+1
|
* aliasing was brokenMichal Krol2005-01-111-1/+1
|
* uint*t -> u_int*t changesAlan Hourihane2004-12-141-1/+4
|
* Bug #1682: Mesa core code that gets linked into DRI drivers should never callAdam Jackson2004-10-241-1/+1
| | | | through the GL API directly, but should instead use the GL_CALL macro.
* - use new program option values from arbprogram.synMichal Krol2004-10-211-32/+18
| | | | | | - remove redundant check of parsed program target - remove redundant check of relative addressing range - use faster grammar interface
* Fix strange white space that gcc didn't like.Felix Kuehling2004-10-111-1/+1
|
* Enable draw_buffers only if GL_ARB_draw_buffers string isMichal Krol2004-10-111-1/+12
| | | | | present in GL_EXTENSIONS string. Parse OPTION ARB_draw_buffers.
* ARB_fp support for GL_ARB_draw_buffers (Karl Rasche)Brian Paul2004-10-041-2/+31
|
* reset error state before parsing (David Reveman)Brian Paul2004-09-101-0/+3
|
* Silence gcc 3.4 warnings on ReactOS. Mostly unused var warnings. (patch ↵Brian Paul2004-08-251-6/+14
| | | | 1015696)