profile/ivi/mesa.git
17 years agofixes, clean-ups, transpose span->varying array indexing
Brian [Thu, 25 Jan 2007 17:52:48 +0000 (10:52 -0700)]
fixes, clean-ups, transpose span->varying array indexing

17 years agonew comments, ideas
Brian [Thu, 25 Jan 2007 17:51:53 +0000 (10:51 -0700)]
new comments, ideas

17 years agoremove some parenthesis
Brian [Wed, 24 Jan 2007 21:15:01 +0000 (14:15 -0700)]
remove some parenthesis

17 years agouse FRAG_BIT_TEX()
Brian [Wed, 24 Jan 2007 21:14:14 +0000 (14:14 -0700)]
use FRAG_BIT_TEX()

17 years agofix varying interpolation
Brian [Wed, 24 Jan 2007 21:13:36 +0000 (14:13 -0700)]
fix varying interpolation

17 years agoonly setup varying vars that will be used
Brian [Wed, 24 Jan 2007 21:13:02 +0000 (14:13 -0700)]
only setup varying vars that will be used

17 years agoadded FRAG_BIT_TEX() and FRAG_BIT_VAR() macros
Brian [Wed, 24 Jan 2007 21:12:08 +0000 (14:12 -0700)]
added FRAG_BIT_TEX() and FRAG_BIT_VAR() macros

17 years agoupdated comment
Brian [Wed, 24 Jan 2007 00:41:25 +0000 (17:41 -0700)]
updated comment

17 years agoindicate which opcodes are used by Mesa GLSL, updated comments
Brian [Wed, 24 Jan 2007 00:39:25 +0000 (17:39 -0700)]
indicate which opcodes are used by Mesa GLSL, updated comments

17 years agofix g++ warnings/errors
Brian [Tue, 23 Jan 2007 23:37:51 +0000 (16:37 -0700)]
fix g++ warnings/errors

17 years agoadded shading.html link
Brian [Sun, 21 Jan 2007 17:37:25 +0000 (10:37 -0700)]
added shading.html link

17 years agoAdded a page with shading language status, tips, etc.
Brian [Sat, 20 Jan 2007 20:40:57 +0000 (13:40 -0700)]
Added a page with shading language status, tips, etc.

17 years agoAdd a simple mechanism for annotating instructions for easier debugging.
Brian [Sat, 20 Jan 2007 17:47:10 +0000 (10:47 -0700)]
Add a simple mechanism for annotating instructions for easier debugging.

17 years agooptimization: emit MAD instructions when possible
Brian [Sat, 20 Jan 2007 16:46:02 +0000 (09:46 -0700)]
optimization: emit MAD instructions when possible

17 years agoremove unused swizzle parameter to -storage_to_src_reg()
Brian [Sat, 20 Jan 2007 16:29:04 +0000 (09:29 -0700)]
remove unused swizzle parameter to -storage_to_src_reg()

17 years agoInitial implementation of OPCODE_IF/ELSE/ENDIF instructions.
Brian [Sat, 20 Jan 2007 16:27:40 +0000 (09:27 -0700)]
Initial implementation of OPCODE_IF/ELSE/ENDIF instructions.

17 years agoReimplement && and || to do short-circuit evaluation.
Brian [Sat, 20 Jan 2007 16:22:13 +0000 (09:22 -0700)]
Reimplement && and || to do short-circuit evaluation.
Improved shader error handling.

17 years agorewrite more __postIncr functions
Brian [Sat, 20 Jan 2007 14:56:00 +0000 (07:56 -0700)]
rewrite more __postIncr functions

17 years agoImplement do/while loops. Replace IR_CJUMP with IR_CJUMP0 and IR_CJUMP1 so
Brian [Fri, 19 Jan 2007 20:13:15 +0000 (13:13 -0700)]
Implement do/while loops.  Replace IR_CJUMP with IR_CJUMP0 and IR_CJUMP1 so
we can either jump on zero, or non-zero predicate.

17 years agoRewrite normalize(vec3/vec4) to use one less register.
Brian [Fri, 19 Jan 2007 19:19:38 +0000 (12:19 -0700)]
Rewrite normalize(vec3/vec4) to use one less register.

17 years agoreport error message when something fails
Brian [Fri, 19 Jan 2007 19:02:31 +0000 (12:02 -0700)]
report error message when something fails

17 years agoprint error msg when there's a problem
Brian [Fri, 19 Jan 2007 19:02:06 +0000 (12:02 -0700)]
print error msg when there's a problem

17 years agoremove stray tab
Brian [Fri, 19 Jan 2007 17:31:52 +0000 (10:31 -0700)]
remove stray tab

17 years agoImplement fragment discard/kill.
Brian [Fri, 19 Jan 2007 17:15:34 +0000 (10:15 -0700)]
Implement fragment discard/kill.

17 years agochange while-loop to create new scope for loop body, per spec
Brian [Fri, 19 Jan 2007 17:02:58 +0000 (10:02 -0700)]
change while-loop to create new scope for loop body, per spec

17 years agoImplement constant sharing so that 4 float constants can share a single
Brian [Fri, 19 Jan 2007 00:29:23 +0000 (17:29 -0700)]
Implement constant sharing so that 4 float constants can share a single
float[4] register slot.

17 years ago_mesa_add_unnamed_constant() now tries to re-use constants already in
Brian [Fri, 19 Jan 2007 00:23:48 +0000 (17:23 -0700)]
_mesa_add_unnamed_constant() now tries to re-use constants already in
the parameter list.

17 years agoReimplement code for swizzling so that expressions like (p+q).x for vectors p and...
Brian [Thu, 18 Jan 2007 22:35:44 +0000 (15:35 -0700)]
Reimplement code for swizzling so that expressions like (p+q).x for vectors p and q works correctly.

17 years agorewrite a bunch of assignment operators (like +=)
Brian [Thu, 18 Jan 2007 22:33:13 +0000 (15:33 -0700)]
rewrite a bunch of assignment operators (like +=)

17 years agoremove debug code
Brian [Thu, 18 Jan 2007 22:23:45 +0000 (15:23 -0700)]
remove debug code

17 years agoremove swizzle param from new_var()
Brian [Thu, 18 Jan 2007 16:22:44 +0000 (09:22 -0700)]
remove swizzle param from new_var()

17 years agorewrite additional matrix-related functions to reduce register needs
Brian [Thu, 18 Jan 2007 01:37:20 +0000 (18:37 -0700)]
rewrite additional matrix-related functions to reduce register needs

17 years agorewrite mat4 * mat4 operator to use fewer temps
Brian [Thu, 18 Jan 2007 01:30:53 +0000 (18:30 -0700)]
rewrite mat4 * mat4 operator to use fewer temps

17 years agodo bounds check in _slang_push_var_table(), added comment
Brian [Thu, 18 Jan 2007 01:21:00 +0000 (18:21 -0700)]
do bounds check in _slang_push_var_table(), added comment

17 years agorewrite matrix constructors
Brian [Thu, 18 Jan 2007 01:06:40 +0000 (18:06 -0700)]
rewrite matrix constructors

17 years agohandle var size > 4 in _slang_pop_var_table()
Brian [Thu, 18 Jan 2007 01:02:44 +0000 (18:02 -0700)]
handle var size > 4 in _slang_pop_var_table()

17 years agominor fprintf() change
Brian [Wed, 17 Jan 2007 23:30:11 +0000 (16:30 -0700)]
minor fprintf() change

17 years agoRewrite a bunch of constructors. It's now important that the first
Brian [Wed, 17 Jan 2007 23:29:51 +0000 (16:29 -0700)]
Rewrite a bunch of constructors.  It's now important that the first
constructor for any given type be the one that takes the most parameters
as this is the constructor that'll be used when there's no perfect match
to the caller's arguments.
See the _slang_adapt_call() function for details.

17 years ago_slang_gen_function_call_name() now tries to adapt function calls (expand
Brian [Wed, 17 Jan 2007 23:14:03 +0000 (16:14 -0700)]
_slang_gen_function_call_name() now tries to adapt function calls (expand
vectors, insert casts) when a perfect match isn't found.

17 years agoNew _slang_adapt_call() function.
Brian [Wed, 17 Jan 2007 23:11:50 +0000 (16:11 -0700)]
New _slang_adapt_call() function.

This is used to modify function calls (when possible) to make the arguments
map to the function parameters.  This includes "unrolling" vector types
and doing casts.

Example:
   vec2 v2 = vec2(1.2, 3.4)
   ivec3 iv = ivec3(false, v2);
Is converted into:
   ivec3 iv = ivec3(int(false), int(v2[0]), int(v2[1]))

17 years agocode clean-up, re-org. Added IR_F_TO_I support.
Brian [Wed, 17 Jan 2007 23:05:03 +0000 (16:05 -0700)]
code clean-up, re-org.  Added IR_F_TO_I support.

17 years agoadded IR_F_TO_I, update comments
Brian [Wed, 17 Jan 2007 22:58:24 +0000 (15:58 -0700)]
added IR_F_TO_I, update comments

17 years agoAdded OPCODE_INT to convert 4 floats to 4 ints.
Brian [Wed, 17 Jan 2007 22:54:14 +0000 (15:54 -0700)]
Added OPCODE_INT to convert 4 floats to 4 ints.

17 years agoadd texturing, other options
Brian [Wed, 17 Jan 2007 17:25:44 +0000 (10:25 -0700)]
add texturing, other options

17 years agoFix/clean-up a number of things related to variable/temporary allocation.
Brian [Wed, 17 Jan 2007 16:54:31 +0000 (09:54 -0700)]
Fix/clean-up a number of things related to variable/temporary allocation.

17 years agoImplement codegen for the selection operator ( b ? x : y )
Brian [Wed, 17 Jan 2007 00:38:39 +0000 (17:38 -0700)]
Implement codegen for the selection operator ( b ? x : y )

17 years agofix typo
Brian [Tue, 16 Jan 2007 23:53:41 +0000 (16:53 -0700)]
fix typo

17 years agodraw a box, press 'a' to animate
Brian [Tue, 16 Jan 2007 22:27:11 +0000 (15:27 -0700)]
draw a box, press 'a' to animate

17 years agoadded some VerteAttrib funcs
Brian [Tue, 16 Jan 2007 21:57:12 +0000 (14:57 -0700)]
added some VerteAttrib funcs

17 years agoAdded toyball and bumpmap tests using shaders from the OpenGL Shading Language (orang...
Brian [Tue, 16 Jan 2007 21:55:43 +0000 (14:55 -0700)]
Added toyball and bumpmap tests using shaders from the OpenGL Shading Language (orange) book.

17 years agowhen automatically binding vertex attributes, start with attrib 1, not 0
Brian [Tue, 16 Jan 2007 21:52:22 +0000 (14:52 -0700)]
when automatically binding vertex attributes, start with attrib 1, not 0

17 years ago remove dead code
Brian [Tue, 16 Jan 2007 21:19:37 +0000 (14:19 -0700)]
 remove dead code

17 years agocomments
Brian [Tue, 16 Jan 2007 21:17:57 +0000 (14:17 -0700)]
comments

17 years agoimplement logical or, xor, not
Brian [Tue, 16 Jan 2007 21:15:05 +0000 (14:15 -0700)]
implement logical or, xor, not

17 years agosome additional vector constructors
Brian [Tue, 16 Jan 2007 21:10:30 +0000 (14:10 -0700)]
some additional vector constructors

17 years agofix _slang_gen_subscript() for the case when a simple vector is accessed as an array...
Brian [Tue, 16 Jan 2007 17:45:34 +0000 (10:45 -0700)]
fix _slang_gen_subscript() for the case when a simple vector is accessed as an array: convert index to a swizzle/writemask

17 years agoUse arrow keys to pan and z/Z to zoom in/out to explore the fractal.
Brian [Tue, 16 Jan 2007 00:48:19 +0000 (17:48 -0700)]
Use arrow keys to pan and z/Z to zoom in/out to explore the fractal.

17 years agoAdded new directory of GL shading language demos: glsl
Brian [Tue, 16 Jan 2007 00:27:24 +0000 (17:27 -0700)]
Added new directory of GL shading language demos: glsl

17 years agoReimplement the post-increment/decrement functions.
Brian [Mon, 15 Jan 2007 23:54:38 +0000 (16:54 -0700)]
Reimplement the post-increment/decrement functions.

Instead of defining functions with an extra dummy parameter to distinguish
from the pre-incr/decr functions, just use new function names: __postIncr
and __postDecr.

17 years agoImplement the ++var and --var operators, improve some constructors.
Brian [Mon, 15 Jan 2007 23:38:12 +0000 (16:38 -0700)]
Implement the ++var and --var operators, improve some constructors.

17 years agoadded vec3 constructor code
Brian [Mon, 15 Jan 2007 23:34:33 +0000 (16:34 -0700)]
added vec3 constructor code

17 years agoadded IR_ELEMENT
Brian [Mon, 15 Jan 2007 23:33:54 +0000 (16:33 -0700)]
added IR_ELEMENT

17 years agocheckpoint: ++, -- and && operators
Brian [Mon, 15 Jan 2007 22:51:49 +0000 (15:51 -0700)]
checkpoint: ++, -- and && operators

17 years agoRedo the way array indexes are handled. Resolve storage location at code emit time...
Brian [Mon, 15 Jan 2007 20:58:45 +0000 (13:58 -0700)]
Redo the way array indexes are handled.  Resolve storage location at code emit time, not codegen time.

17 years agoremove old globals
Brian [Mon, 15 Jan 2007 18:10:11 +0000 (11:10 -0700)]
remove old globals

17 years agocomments
Brian [Mon, 15 Jan 2007 18:08:10 +0000 (11:08 -0700)]
comments

17 years agoMove some global vars into slang_assemble_ctx.
Brian [Mon, 15 Jan 2007 17:44:11 +0000 (10:44 -0700)]
Move some global vars into slang_assemble_ctx.

17 years agofix the subassig, mulassign and divassign cases
Brian [Mon, 15 Jan 2007 17:35:59 +0000 (10:35 -0700)]
fix the subassig, mulassign and divassign cases

17 years agoclean-up slang_allocate_storage()
Brian [Mon, 15 Jan 2007 17:35:03 +0000 (10:35 -0700)]
clean-up slang_allocate_storage()

17 years agoadded glUniform1fv_func, glUniform2fv_func
Brian [Sat, 13 Jan 2007 21:51:02 +0000 (14:51 -0700)]
added glUniform1fv_func, glUniform2fv_func

17 years agoRework code related to temp register allocation, both for user variables
Brian [Sat, 13 Jan 2007 21:49:52 +0000 (14:49 -0700)]
Rework code related to temp register allocation, both for user variables
and expression temporarires.  Much better register utilization now.
Lots of other fixes.
The OpenGL GLSL "orange book" brick shader demo works now.

17 years agoslang_variable_scope now stores array of pointers to slang_variables.
Brian [Sat, 13 Jan 2007 21:47:48 +0000 (14:47 -0700)]
slang_variable_scope now stores array of pointers to slang_variables.

17 years agoadded another vec4 constructor, updated += operator
Brian [Sat, 13 Jan 2007 21:46:12 +0000 (14:46 -0700)]
added another vec4 constructor, updated += operator

17 years agoFix a problem with inlined "return" statements. Make some attempt to free temporaries.
Brian [Thu, 11 Jan 2007 18:22:26 +0000 (11:22 -0700)]
Fix a problem with inlined "return" statements.  Make some attempt to free temporaries.

17 years agodisable some code that'll eventually go away
Brian [Thu, 11 Jan 2007 18:21:38 +0000 (11:21 -0700)]
disable some code that'll eventually go away

17 years agonew vec3 constructor, replace float_add w/ vec4_add
Brian [Thu, 11 Jan 2007 18:20:23 +0000 (11:20 -0700)]
new vec3 constructor, replace float_add w/ vec4_add

17 years agotweak output
Brian [Thu, 11 Jan 2007 18:19:11 +0000 (11:19 -0700)]
tweak output

17 years agocheckpoint: codegen for global vars/constants now working
Brian [Wed, 10 Jan 2007 20:51:48 +0000 (13:51 -0700)]
checkpoint: codegen for global vars/constants now working

17 years agocheckpoint: codegen for global vars w/ initializers
Brian [Wed, 10 Jan 2007 20:33:38 +0000 (13:33 -0700)]
checkpoint: codegen for global vars w/ initializers

17 years agoassorted code clean-ups
Brian [Wed, 10 Jan 2007 19:18:50 +0000 (12:18 -0700)]
assorted code clean-ups

17 years agofix size bug in _mesa_add_attribute()
Brian [Wed, 10 Jan 2007 19:18:33 +0000 (12:18 -0700)]
fix size bug in _mesa_add_attribute()

17 years agosimplify _mesa_add_state_reference()
Brian [Wed, 10 Jan 2007 15:37:59 +0000 (08:37 -0700)]
simplify _mesa_add_state_reference()

17 years agoUpdate _save_VertexAttrib() functions for non-aliasing behaviour.
Brian [Wed, 10 Jan 2007 15:15:35 +0000 (08:15 -0700)]
Update _save_VertexAttrib() functions for non-aliasing behaviour.

17 years agoget rid of STATE_USER_ATTRIB/STATE_AUTO_ATTRIB
Brian [Wed, 10 Jan 2007 02:26:22 +0000 (19:26 -0700)]
get rid of STATE_USER_ATTRIB/STATE_AUTO_ATTRIB

17 years agoclean up a bunch of program parameter stuff
Brian [Wed, 10 Jan 2007 02:17:17 +0000 (19:17 -0700)]
clean up a bunch of program parameter stuff

17 years agoadded a few more 2.0 functions
Brian [Wed, 10 Jan 2007 00:49:53 +0000 (17:49 -0700)]
added a few more 2.0 functions

17 years agoImplement vertex attribute binding.
Brian [Wed, 10 Jan 2007 00:49:24 +0000 (17:49 -0700)]
Implement vertex attribute binding.

Users can set explicit binding with glBindAttribLocation(), otherwise the
linker will allocate generic attribute slots.

17 years agomore debug code (disabled)
Brian [Wed, 10 Jan 2007 00:47:13 +0000 (17:47 -0700)]
more debug code (disabled)

17 years agoadd code for generic attributes 16..31
Brian [Wed, 10 Jan 2007 00:46:45 +0000 (17:46 -0700)]
add code for generic attributes 16..31

17 years agoadded _mesa_count_texture_indirections(), _mesa_count_texture_instructions()
Brian [Tue, 9 Jan 2007 18:00:47 +0000 (11:00 -0700)]
added _mesa_count_texture_indirections(), _mesa_count_texture_instructions()

17 years agoMoved NumTexInstructions, NumTexIndirections, etc. into gl_program since
Brian [Tue, 9 Jan 2007 18:00:21 +0000 (11:00 -0700)]
Moved NumTexInstructions, NumTexIndirections, etc. into gl_program since
they can now apply to vertex programs.

17 years agoremove old comment
Brian [Tue, 9 Jan 2007 17:10:59 +0000 (10:10 -0700)]
remove old comment

17 years agoVertex program texture samplers done, but untested (need to add TEX/TXB to
Brian [Tue, 9 Jan 2007 16:31:30 +0000 (09:31 -0700)]
Vertex program texture samplers done, but untested (need to add TEX/TXB to
the T&L vertex program interpreter).

17 years agoImplement shadow samplers and dFdx(), dFdy() code generation.
Brian [Tue, 9 Jan 2007 16:14:32 +0000 (09:14 -0700)]
Implement shadow samplers and dFdx(), dFdy() code generation.

17 years agoimplement biased texture functions
Brian [Mon, 8 Jan 2007 23:56:52 +0000 (16:56 -0700)]
implement biased texture functions

17 years agocheck if _Current == NULL for TXB
Brian [Mon, 8 Jan 2007 23:49:43 +0000 (16:49 -0700)]
check if _Current == NULL for TXB

17 years agoadded 1D texture functions
Brian [Mon, 8 Jan 2007 23:10:55 +0000 (16:10 -0700)]
added 1D texture functions

17 years agoRemove if (tObj) conditional so that texture units without a texture image
Brian [Mon, 8 Jan 2007 23:10:34 +0000 (16:10 -0700)]
Remove if (tObj) conditional so that texture units without a texture image
return black (0,0,0,1) when sampled.

17 years agoupdate texture1D functions
Brian [Mon, 8 Jan 2007 23:02:40 +0000 (16:02 -0700)]
update texture1D functions

17 years agoImplement projective texture sampling, 3D textures. Disable some debug output.
Brian [Mon, 8 Jan 2007 22:58:14 +0000 (15:58 -0700)]
Implement projective texture sampling, 3D textures.  Disable some debug output.