summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/arbprogparse.c
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* cast to fix a warning (in disabled code anyway)Brian Paul2004-08-221-1/+1
|
* enabled GL_ARB_texture_rectangleBrian Paul2004-08-201-0/+2
|
* error message fixups and some debug codeBrian Paul2004-07-201-2/+13
|
* fix compare w/ zero warnings (bug #988766)Brian Paul2004-07-201-8/+12
|
* fix parse error in sign of exponents (bug 968323)Brian Paul2004-06-081-30/+13
|
* Fix minor warnings found with g++.Brian Paul2004-05-041-1/+1
|
* Committing in .Jouk Jansen2004-04-051-3953/+3953
| | | | | | | | | | | | | Correction on last commit (My FTP-server on linux is playing games with <CR>'s) Modified Files: Mesa/src/mesa/drivers/common/descrip.mms Mesa/src/mesa/main/descrip.mms Mesa/src/mesa/shader/arbprogparse.c Mesa/src/mesa/shader/descrip.mms Mesa/src/mesa/swrast/descrip.mms Mesa/src/mesa/tnl/descrip.mms ----------------------------------------------------------------------
* Committing in .Jouk Jansen2004-04-051-3943/+3943
| | | | | | | | | | | | | | Updated OpenVMS compile support due to shader directory. Removed <CR>'s in arbprogparse.c Modified Files: Mesa/src/mesa/descrip.mms Mesa/src/mesa/drivers/common/descrip.mms Mesa/src/mesa/main/descrip.mms Mesa/src/mesa/shader/arbprogparse.c Mesa/src/mesa/shader/descrip.mms Mesa/src/mesa/swrast/descrip.mms Mesa/src/mesa/tnl/descrip.mms ----------------------------------------------------------------------
* Reorder some code so we don't upset program state when there's a parsing error.Brian Paul2004-03-301-3/+2
| | | | Be sure to assign program.Base.String pointer.