summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/program.c
Commit message (Collapse)AuthorAgeFilesLines
* check for null Parameters ptr in _mesa_clone_program()Brian2006-12-191-2/+4
|
* Move many functions into new files.Brian2006-12-141-1652/+4
|
* New functions for cloning programs and parameter lists.Brian2006-12-141-10/+118
|
* Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes.Brian2006-12-131-81/+191
|
* fix several program-related bugs (bug 9136)Brian Paul2006-11-231-0/+4
|
* add STATE_INTERNAL_DRIVER, etc (Rune Petersen)Brian Paul2006-11-171-3/+7
|
* disable yesterday's _mesa_add_named_constant() change for nowBrian Paul2006-11-161-0/+2
|
* Add a size parameter to _mesa_add_unnamed_constant() andBrian Paul2006-11-151-2/+5
| | | | | _mesa_add_named_constant() to indicate vector size (1, 2, 3 or 4). Always 4 for now...
* Add new _mesa_lookup_parameter_constant() to search for a GLfloat4 constantBrian Paul2006-11-151-11/+81
| | | | | | in a parameter list. Use it in _mesa_add_named_constant() and _mesa_add_unnamed_constant() to avoid duplication of identical constants.
* Rename _mesa_IsProgram() to _mesa_IsProgramARB() to avoid collision with theBrian Paul2006-11-021-24/+0
| | | | OpenGL 2.0 function of the same name.
* minor clean-ups, simplifications and new commentsBrian Paul2006-10-311-26/+21
|
* Move gl_vertex_program_machine struct out of mtypes.h and put into nvvertexec.h.Brian Paul2006-10-301-3/+8
| | | | | Massage nvvertexec.c code to work more like s_nvfragprog.c - another step toward unifying vertex/fragment program execution.
* Change _mesa_init_instruction() to initialize an array of instructions.Brian Paul2006-10-291-17/+23
|
* special case END in _mesa_print_instruction()Brian Paul2006-10-281-0/+3
|
* a step toward moving run-time vertex program state out of GLcontextBrian Paul2006-10-101-2/+2
|
* Move the fp_machine struct into s_nvfragmprog.c since (except for programBrian Paul2006-10-101-6/+10
| | | | debug) it's only used there.
* Add a new internal program parameter value STATE_TEXRECT_SCALE whichKeith Whitwell2006-09-201-0/+11
| | | | | | provides 1/width and 1/height of the active texture, useful for implementing ARB_texture_rectangle support on hardware which only supports ARB_npot-style texturing.
* Export _mesa_print_alu_instruction() to allow drivers to roll theirKeith Whitwell2006-09-201-41/+38
| | | | | | own debug code for programs with driver-private opcodes. Remove redundant loop in _mesa_num_inst_src_regs().
* Free vertex program TnlData, if any. Fixes a mem leak.Brian Paul2006-08-251-0/+7
|
* Rearrange glBindProgram() code to do all error checking before changingBrian Paul2006-08-251-51/+43
| | | | the binding. Prevent a potential dangling pointer error. SF Bug 1544507.
* added _mesa_alloc_instructions() utility functionBrian Paul2006-08-251-0/+13
|
* Cg tries to bind NV fragment programs to the GL_FRAGMENT_PROGRAM_ARB targetBrian Paul2006-08-241-1/+22
| | | | | | with glBindProgramARB(). I guess the GL_ARB_fragment_program specification allows that, but Mesa didn't. Relaxed the check with a new predicate function: compatible_program_targets().
* Added _mesa_realloc_instructions() utility function.Brian Paul2006-08-241-2/+34
| | | | Fixed/updated comments for parameter list functions.
* Added _mesa_lookup_program() and _mesa_lookup_bufferobj() functions to avoidBrian Paul2006-08-231-5/+18
| | | | | | a lot of casting elsewhere. Use _mesa_lookup_texture() in tdfx driver, use _mesa_lookup_bufferobj() in r300 driver.
* Some structure renaming. Prefix vertex/fragment-related structs withBrian Paul2006-07-201-41/+43
| | | | "gl_" to match other structs.
* Roll _mesa_free_parameters() into calling function (the only caller).Brian Paul2006-05-241-40/+32
| | | | | | Replace assert(0) with _mesa_warning(). Use new _mesa_align_realloc() function. New comments, clean-ups.
* fix a small memory leak in _mesa_add_state_reference()Brian Paul2006-05-241-0/+3
|
* Use standard ARB names instead of vendor-specific NV names for the ↵Roland Scheidegger2006-03-031-8/+7
| | | | ARB/NV_vertex_program enums in common state handling code, and update comments accordingly. Change some slightly confusing code which gave the impression GL_VERTEX_PROGRAM_ARB and GL_VERTEX_PROGRAM_NV enums were different.
* Fix glGet with enums which are used not only in NV_vertex_program, but other ↵Roland Scheidegger2006-03-011-2/+2
| | | | extensions too (ARB_vertex_program, ARB_fragment_program, NV_fragment_program), if no support for NV_vertex_program is present. While here, fix return value if enum is used which is not supported by the exposed extensions (GL_INVALID_ENUM instead of GL_INVALID_VALUE). Fix some compile-time #ifs depending on NV_vertex/fragment_program which should also be dependant on ARB_vertex/fragment_program. See bug #6070
* C++ fixes, mostly casts (Stephane Conversy)Brian Paul2005-12-061-14/+14
|
* track state flags which might invalidate parameter listsKeith Whitwell2005-11-221-0/+77
|
* move _mesa_init_instruction() to program.cBrian Paul2005-11-201-0/+25
|
* Make Saturate a 2-bit field again, renamed to SaturateMode with threeBrian Paul2005-11-201-3/+3
| | | | possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
* No longer derive 'ati_fragment_shader' from 'program' class. Only theBrian Paul2005-11-191-34/+7
| | | | | program->Id and program->RefCount fields were used and ATI fragment shaders didn't have too much in common with ARB/NV vertex/fragment programs anyway.
* Improve _mesa_print_program().Brian Paul2005-11-121-31/+354
| | | | Added make_state_string() to produce a string from a GL state vector.
* Move stuff common to vertex/fragment_program into the base class, including:Brian Paul2005-11-121-77/+117
| | | | | | Instructions, InputsRead, OutputsWritten, and Parameters. Also, added debug functions: _mesa_print_instruction(), _mesa_print_program_parameters() and revamp _mesa_print_program().
* This patch adds the missing NV_vertex_program2 and NV_vertex_program3Ian Romanick2005-11-081-0/+10
| | | | | | | | | | | | | | | | 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).
* minor work in _mesa_print_program()Brian Paul2005-11-081-1/+10
|
* consolidate vertex/fragment program printing into _mesa_print_program()Brian Paul2005-11-051-2/+121
|
* added _mesa_program_file_string()Brian Paul2005-11-051-0/+32
|
* added _mesa_num_inst_src_regs() and _mesa_opcode_string()Brian Paul2005-11-051-0/+110
|
* Unify vertex/fragment program instuctions.Brian Paul2005-11-051-2/+1
| | | | Based on patch by Ian (#4967) but also unify instruction opcodes.
* Replace parameter_type enum in program.[ch], use register_file enums instead.Brian Paul2005-11-051-6/+6
|
* added a const, clean-upBrian Paul2005-11-031-11/+15
|
* Rename FRAG_OUTPUT_* tokens to FRAG_RESULT_* to match vertex program conventionBrian Paul2005-11-021-3/+3
|
* Re-org and clean-up of vertx/fragment program limits (instructions,Brian Paul2005-11-011-4/+4
| | | | | | | 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.
* use mesa import wrappers, bug 4468Brian Paul2005-09-161-1/+1
|
* add error checking to the GL_ATI_FRAGMENT_SHADER entrypoints. Fix bug with ↵Roland Scheidegger2005-09-021-2/+8
| | | | scope of ati fragment shader constants. Fix issues with specifying color/alpha instructions not pair-wise. Change internal representation of the shader (to better fit how the extension works, should make driver implementations simpler, and saves some memory). (still doesn't work correctly with doom3 and swrast, but not worse than before)
* Use ALIGN_MALLOC for parameter lists.Keith Whitwell2005-06-081-6/+13
|
* Fix some valgrind complaintsKeith Whitwell2005-05-101-0/+4
|