Commit Graph

79 Commits

Author SHA1 Message Date
José Fonseca
53174afeeb mesa: Apply MSVC portability fixes from Alan Hourihane. 2008-05-31 18:55:40 +09:00
Brian
fdc8636bdc use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals 2008-01-18 12:45:27 -07:00
Brian
fce4612f8a set SamplerUnit[] entry in load_texture() just to be safe 2007-12-14 11:42:28 -07:00
Brian
1e3b07f363 set program->SamplersUsed bit when using a texture instruction 2007-12-14 11:16:49 -07:00
Brian
f4a5ea2ccb Update texenvprogram.c code to use prog_cache.c routines. 2007-10-31 12:45:32 -06:00
Brian
f18d4e058e Remove ctx field from texenvprog_cache 2007-10-29 15:15:34 -06:00
Brian
83ce6c51d7 Refactor _mesa_UpdateTexEnvProgram()
Will be replaced by _mesa_get_fixed_func_fragment_program().
2007-10-29 15:15:34 -06:00
Brian
2a3f3679eb Disable the else clause which assigns the default fragment program to ctx->FragmentProgram._Current
The _Current field should either point to the fragment program which is to be
run (GLSL, ARB_f_p, fixed-func-generated, etc) or be NULL if conventional
fixed-function code is to be used.  Matches TNL program code.
2007-10-29 09:25:00 -06:00
Brian
112a1580f6 properly init dst reg's CondMask/Swizzle fields 2007-10-23 10:54:50 -06:00
Brian
e69943e6dd bump up MAX_INSTRUCTIONS and add an assertion to catch emitting too many instructions 2007-10-23 10:23:01 -06:00
Brian
d781cdc8fa Generate a texenv fragment program if there's a GLSL vertex shader but no GLSL fragment shader.
This allows Glean glsl1 test to get pretty far.
2007-10-02 16:55:21 -06:00
Brian
83fad68ec1 include programopt.h 2007-09-25 15:20:04 -06:00
Brian
3bf8d2ac71 Disable vertex shader fog, compute fog in fragment shader. 2007-09-25 15:18:51 -06:00
Brian
63be96bdc7 temporarily set the FRAG_BIT_FOGC bit in InputsRead when fog is enabled 2007-09-18 19:38:35 -06:00
Brian
c223c6b663 Be more consistant with paths in #includes. Eventually, eliminate a bunch of -I flags. 2007-07-04 13:15:20 -06:00
Roland Scheidegger
9a45176dd8 fix GL_DOT3_RGBA texture combiner mode in generated fragment programs (bug #11030) 2007-07-03 14:27:41 +02:00
Brian
d619cceea4 merge of glsl-compiler-1 branch 2007-03-26 10:13:02 -06:00
Brian
1240eb2683 use _mesa_copy_instructions() 2007-03-22 08:50:20 -06:00
Brian
efcfdbd4d1 Undo some changes to _mesa_UpdateTexEnvProgram(). Fixes broken i915 texturing. 2007-02-24 15:51:41 -07:00
Brian
9fe3e2efc3 s/GLint/gl_state_index/, length is now 5 not 6 2007-02-23 11:44:14 -07:00
Brian
223d7cb3c7 fix g++ warnings/errors 2007-01-23 16:37:51 -07:00
Brian
18d1fdebeb fixes for C++ warnings/errors 2007-01-23 11:46:02 -07:00
Brian
21f99792a9 Moved NumTexInstructions, NumTexIndirections, etc. into gl_program since
they can now apply to vertex programs.
2007-01-09 11:00:21 -07:00
Brian
a90046f109 Lots of assorted changes for new GLSL compiler backend.
New datatypes, constants, variables.
2006-12-15 10:07:26 -07:00
Brian Paul
0c6723aee5 Add a size parameter to _mesa_add_unnamed_constant() and
_mesa_add_named_constant() to indicate vector size (1, 2, 3 or 4).
Always 4 for now...
2006-11-15 23:38:02 +00:00
Brian Paul
0781339b39 remove debug code 2006-10-30 00:07:22 +00:00
Brian Paul
e998c34647 Rather than always allocating 100 instructions, put instructions into a
temporary buffer, then copy into a malloc'd array of the correct size.
According to Glean texCombine, we never need more than 21 instructions.
2006-10-29 21:17:18 +00:00
Brian Paul
d6272e0617 Change _mesa_init_instruction() to initialize an array of instructions. 2006-10-29 18:03:16 +00:00
Alan Hourihane
8d97265711 Fix some breakage after the PROGRAM_UNDEFINED change 2006-08-10 13:12:00 +00:00
Brian Paul
122629f279 Some structure renaming. Prefix vertex/fragment-related structs with
"gl_" to match other structs.
2006-07-20 16:49:57 +00:00
Brian Paul
e4cb9cd167 remove redundant 'const' 2006-05-30 22:15:24 +00:00
Brian Paul
d9736db667 Add const qualifiers in a number of places. 2006-05-23 02:44:46 +00:00
Brian Paul
b8f2f6fee1 In cache_item(), there was sizeof(void) expression.
Replace void *key parameter with const struct state_key *
2006-05-23 01:55:31 +00:00
Keith Whitwell
8065c120c4 memory usage fixes for glean/conform, use a better hash function 2006-05-22 16:09:27 +00:00
Keith Whitwell
64da16146f Fix typo 2006-05-22 14:30:58 +00:00
Keith Whitwell
5ddc53f899 Better caching for texenv programs.
Initialize some values correctly.
2006-05-22 14:17:32 +00:00
Brian Paul
13abf91b42 casts to fix some -pedantic warnings 2006-04-13 19:17:13 +00:00
Aapo Tahkola
b8915340ea fix #6072 (Keith Whitwell) 2006-03-28 10:26:34 +00:00
Jerome Glisse
99da2d30eb fix using a tmp without asking for one 2006-01-24 23:04:51 +00:00
Aapo Tahkola
4dd8a8907e fix broken get_half & get_zero 2006-01-24 20:24:06 +00:00
Brian Paul
c8d1741b78 use GLbitfield instead of GLuint 2005-12-14 03:06:16 +00:00
Brian Paul
0063084804 silence warning, bug 5318 2005-12-12 15:27:55 +00:00
Brian Paul
9580179dfb C++ fixes, mostly casts (Stephane Conversy) 2005-12-06 15:41:43 +00:00
Brian Paul
e31ac05223 Make Saturate a 2-bit field again, renamed to SaturateMode with three
possible values: SATURATE_OFF, SATURATE_ZERO_ONE and SATURATE_PLUS_MINUS_ONE.
2005-11-20 17:52:40 +00:00
Brian Paul
22db535776 additional clean-ups and improvements 2005-11-19 23:45:10 +00:00
Brian Paul
5d7b49f7e7 Bunch of little fixes:
Fix mem leaks in _mesa_TexEnvProgramCacheDestroy().
Check if ctx->Driver.BindProgram is non-null before calling.
s/unsigned/GLuint/
Use MAX_INSTRUCTIONS instead of magic 100, check program length after it's made.
Use _mesa_init_instruction() instead of _mesa_memset().
2005-11-19 23:12:20 +00:00
Brian Paul
8c41a14c5e Remove the _mesa_parse_arb_vertex/fragment_program() functions into
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-19 15:36:28 +00:00
Aapo Tahkola
40ca5b455f Reduce stderr noise. 2005-11-18 17:57:27 +00:00
Brian Paul
de99760bf3 Move stuff common to vertex/fragment_program into the base class, including:
Instructions, InputsRead, OutputsWritten, and Parameters.
Also, added debug functions: _mesa_print_instruction(),
_mesa_print_program_parameters() and revamp _mesa_print_program().
2005-11-12 17:53:14 +00:00
Brian Paul
e1a5edf083 s/_mesa_debug_fp_inst/_mesa_print_program/ 2005-11-08 14:53:24 +00:00