Marcin Baczyński
346298c765
Replace _mesa_strtod with _mesa_strtof.
...
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
2010-03-15 08:38:24 -07:00
Kristian Høgsberg
298be2b028
Replace the _mesa_*printf() wrappers with the plain libc versions
2010-02-19 12:32:24 -05:00
Kristian Høgsberg
32f2fd1c5d
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
2010-02-19 12:03:01 -05:00
Brian Paul
6bf1ea897f
mesa: replace _mesa_bzero() with memset()
2010-02-19 08:32:36 -07:00
Brian Paul
e197de56cd
mesa: replace old MEMCPY macro with memcpy
2010-02-19 08:09:01 -07:00
Kenneth Graunke
c7ac486261
Remove _mesa_memcpy in favor of plain memcpy.
...
This may break the SUNOS4 build, but it's no longer relevant.
2010-02-19 09:18:36 -05:00
Kenneth Graunke
60b0cae412
Remove _mesa_atoi in favor of plain atoi.
2010-02-19 09:18:13 -05:00
Kenneth Graunke
9d9afe9393
Remove _mesa_strncmp in favor of plain strncmp.
2010-02-19 09:17:53 -05:00
Kenneth Graunke
8d73aa6d1a
Remove _mesa_strcmp in favor of plain strcmp.
2010-02-19 07:53:04 -05:00
Kenneth Graunke
21d0c70b4b
Remove _mesa_strlen in favor of plain strlen.
2010-02-19 07:51:02 -05:00
Roel Kluin
324568f79d
mesa: test index bounds before array element
...
Check whether the index is within bounds before accessing the array.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com >
Signed-off-by: Brian Paul <brianp@vmware.com >
2010-01-06 09:47:37 -07:00
Vinson Lee
94fba49be9
mesa: Initialize variable in MatchInstruction.
2009-12-10 18:51:51 -08:00
Brian Paul
7db7ff878d
mesa: merge the prog_src_register::NegateBase and NegateAbs fields
...
There's really no need for two negation fields. This came from the
GL_NV_fragment_program extension. The new, unified Negate bitfield applies
after the absolute value step.
2009-04-14 22:14:30 -06:00
Brian Paul
fe278f1e60
mesa: remove NV vertex/fragment program print/debug code
...
The code in prog_print.c can be used instead.
2009-04-14 19:53:37 -06:00
Brian Paul
69e07bdeb4
mesa: remove GL_MESA_program_debug extension
...
This was never fully fleshed out and hasn't been used.
2009-03-07 11:53:18 -07:00
Brian Paul
8d475822e6
mesa: rename, reorder FRAG_RESULT_x tokens
...
s/FRAG_RESULT_DEPR/FRAG_RESULT_DEPTH/
s/FRAG_RESULT_COLR/FRAG_RESULT/COLOR/
Remove FRAG_RESULT_COLH (NV half-precision) output since we never used it.
Next, we might merge the COLOR and DATA outputs (COLOR0, COLOR1, etc).
2009-02-28 11:49:46 -07:00
Brian Paul
bbd287103d
mesa: prefix a bunch of #include lines with "main/".
...
This is another step toward removing a whole bunch of -I flags from
the cc commands. Still need to address driver code...
2008-09-18 12:26:54 -06:00
Brian
257f799849
remove more unused vars, assertions
2007-04-21 10:05:05 -06:00
Brian
81c4fee160
remove unused vars, assertions
2007-04-21 10:05:05 -06:00
Brian
12229f119d
use _mesa_copy_instructions()
2007-03-22 09:11:26 -06:00
Brian
1bf81e3c5d
In _mesa_add_unnamed_constant() and _mesa_lookup_parameter_constant() allow swizzleOut==NULL.
...
There are times when we don't want to allow swizzling when searching for or
adding vector constants. Passing NULL for swizzleOut disables swizzling.
This fixes a constant/swizzle bug in link_uniform_vars().
2007-03-22 09:07:27 -06:00
Brian
c9db223f90
move TexturesUsed[] into gl_program since vertex programs/shaders can use textures nowadays
2007-01-04 17:22:19 -07:00
Brian
885afd59ec
remove unneeded includes
2006-12-14 15:53:49 -07:00
Brian
c0551f0a46
Updated includes.
2006-12-14 15:02:37 -07:00
Brian
fe1d01cb39
Checkpoint of work for new GLSL compiler back-end. Lots of assorted changes.
2006-12-13 14:54:47 -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
d6272e0617
Change _mesa_init_instruction() to initialize an array of instructions.
2006-10-29 18:03:16 +00:00
Brian Paul
383c39e58e
use _mesa_alloc_instructions()
2006-08-25 15:14:25 +00:00
Brian Paul
e6940f0a33
scalar sources such as 'time.x' weren't accepted by parser
2006-08-24 23:08:01 +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
a8c4242395
Define new NEGATE_* tokens for setting the src register's NegateBase field.
...
Before, we were using GL_TRUE/GL_FALSE in a few places.
Note: only the SWZ instruction can negate individual components.
2006-05-30 22:17:35 +00:00
Brian Paul
28b014ee25
Silence minor compiler warnings (-Wextra).
2006-04-05 03:05:17 +00:00
Brian Paul
ee40c4fb34
Set NumInstructions (bug 5864)
2006-02-15 15:59:37 +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
bed8363aa6
update some assertions
2005-11-12 17:56:18 +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
7e807510d8
Unify vertex/fragment program instuctions.
...
Based on patch by Ian (#4967 ) but also unify instruction opcodes.
2005-11-05 17:10:45 +00:00
Brian Paul
fd4395b8d1
don't need MAKE_SWIZZLE() macro
2005-11-05 03:02:28 +00:00
Brian Paul
613e1ad5d5
Replace parameter_type enum in program.[ch], use register_file enums instead.
2005-11-05 02:15:21 +00:00
Brian Paul
ccfe3d4683
use WRITEMASK_* tokens
2005-11-03 02:35:15 +00:00
Brian Paul
90ebb581e6
Rename FRAG_OUTPUT_* tokens to FRAG_RESULT_* to match vertex program convention
2005-11-02 18:06:12 +00:00
Brian Paul
7aebaf3deb
Lots of clean-up in arb program parser.
...
Use new _mesa_init_fp/vp_instruction() function to initialize instructions.
2005-10-30 21:23:23 +00:00
Brian Paul
aa2069586d
use mesa import wrappers, bug 4468
2005-09-16 18:14:24 +00:00
Keith Whitwell
5cf1397710
be consistent in populating NegateBase field
2005-09-08 18:35:48 +00:00
Brian Paul
8cdf372946
replace -1 with PROGRAM_UNDEFINED when initializing instructions
2005-09-02 13:40:09 +00:00
Karl Schultz
6258b76c49
Port Mesa to build on a P64 platform (e.g., Win64). P64 platforms
...
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.
2005-05-05 21:08:07 +00:00
Keith Whitwell
7c26b61f93
Reduce the size of mesa's internal fragment and vertex program
...
representations by switching to packed structures for registers and
instructions.
2005-04-21 14:46:57 +00:00
Brian Paul
2a5afe3ab8
Added PRINT instruction for GL_NV_fragment_program.
2004-12-18 16:18:00 +00:00
Brian Paul
ac33dd1312
disable some debug code
2004-06-29 00:00:29 +00:00