mesa.git
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.

17 years agoMove some code around, add some comments.
Brian [Mon, 8 Jan 2007 21:11:54 +0000 (14:11 -0700)]
Move some code around, add some comments.

17 years agoMove storage allocation functions from slang_emit.c to slang_codegen.c
Brian [Mon, 8 Jan 2007 21:06:00 +0000 (14:06 -0700)]
Move storage allocation functions from slang_emit.c to slang_codegen.c

17 years agocheckpoint: more work on variable/storage allocation
Brian [Mon, 8 Jan 2007 20:36:53 +0000 (13:36 -0700)]
checkpoint: more work on variable/storage allocation

17 years agoCheckpoint: re-org of (global) variable allocation code. More to come...
Brian [Mon, 8 Jan 2007 20:09:47 +0000 (13:09 -0700)]
Checkpoint: re-org of (global) variable allocation code.  More to come...

17 years agoCheckpoint glsl compiler work: sampler uniforms now implemented, linked properly.
Brian [Fri, 5 Jan 2007 23:02:45 +0000 (16:02 -0700)]
Checkpoint glsl compiler work: sampler uniforms now implemented, linked properly.

17 years agoadded PROGRAM_SAMPLER
Brian [Fri, 5 Jan 2007 23:01:43 +0000 (16:01 -0700)]
added PROGRAM_SAMPLER

17 years agoadded Sampler field to prog_instruction struct
Brian [Fri, 5 Jan 2007 23:01:26 +0000 (16:01 -0700)]
added Sampler field to prog_instruction struct

17 years agoadded PROGRAM_SAMPLER
Brian [Fri, 5 Jan 2007 23:01:11 +0000 (16:01 -0700)]
added PROGRAM_SAMPLER

17 years agoadded _mesa_add_sampler()
Brian [Fri, 5 Jan 2007 23:00:57 +0000 (16:00 -0700)]
added _mesa_add_sampler()

17 years agoupdate TexturesUsed[] in slang_update_inputs_outputs()
Brian [Fri, 5 Jan 2007 00:44:04 +0000 (17:44 -0700)]
update TexturesUsed[] in slang_update_inputs_outputs()

17 years agoupdate TexturesUsed[] in slang_update_inputs_outputs()
Brian [Fri, 5 Jan 2007 00:43:53 +0000 (17:43 -0700)]
update TexturesUsed[] in slang_update_inputs_outputs()

17 years agocompute InputsRead/OutputsWritten with slang_update_inputs_outputs()
Brian [Fri, 5 Jan 2007 00:30:30 +0000 (17:30 -0700)]
compute InputsRead/OutputsWritten with slang_update_inputs_outputs()

17 years agomove TexturesUsed[] into gl_program since vertex programs/shaders can use textures...
Brian [Fri, 5 Jan 2007 00:22:19 +0000 (17:22 -0700)]
move TexturesUsed[] into gl_program since vertex programs/shaders can use textures nowadays

17 years agosimplify update_texture_state() a bit, compute _EnabledCoordUnits for shaders
Brian [Thu, 4 Jan 2007 23:19:54 +0000 (16:19 -0700)]
simplify update_texture_state() a bit, compute _EnabledCoordUnits for shaders

17 years agominor formatting fix
Brian [Thu, 4 Jan 2007 22:25:29 +0000 (15:25 -0700)]
minor formatting fix

17 years agoadded texture attribs in slang_find_input()
Brian [Thu, 4 Jan 2007 22:06:50 +0000 (15:06 -0700)]
added texture attribs in slang_find_input()

17 years agoadded glUniform1i_func
Brian [Thu, 4 Jan 2007 21:40:56 +0000 (14:40 -0700)]
added glUniform1i_func

17 years agoinitial code to get texture sampling limping along
Brian [Thu, 4 Jan 2007 21:40:02 +0000 (14:40 -0700)]
initial code to get texture sampling limping along

17 years agotemporary disable some memory deallocations to work around a memory corruption bug
Brian [Thu, 4 Jan 2007 21:38:45 +0000 (14:38 -0700)]
temporary disable some memory deallocations to work around a memory corruption bug

17 years agofinish some loose ends in _mesa_uniform()
Brian [Thu, 4 Jan 2007 21:35:44 +0000 (14:35 -0700)]
finish some loose ends in _mesa_uniform()

17 years agoupdate_texture_state() updated for new shaders
Brian [Thu, 4 Jan 2007 21:33:42 +0000 (14:33 -0700)]
update_texture_state() updated for new shaders

17 years agoFix some incorrect GL error values. Reorganize _mesa_compile_shader() code.
Brian [Thu, 4 Jan 2007 15:21:09 +0000 (08:21 -0700)]
Fix some incorrect GL error values.  Reorganize _mesa_compile_shader() code.

17 years agofix typos
Brian [Fri, 22 Dec 2006 17:26:22 +0000 (10:26 -0700)]
fix typos

17 years agoimplement unary +, -
Brian [Fri, 22 Dec 2006 17:18:50 +0000 (10:18 -0700)]
implement unary +, -

17 years agochmod a-x
Brian [Fri, 22 Dec 2006 01:12:03 +0000 (18:12 -0700)]
chmod a-x

17 years agocheckpoint: pre/post incr/decr operators
Brian [Fri, 22 Dec 2006 01:05:06 +0000 (18:05 -0700)]
checkpoint: pre/post incr/decr operators

17 years agoadded INTERP_VARYING code
Brian [Fri, 22 Dec 2006 00:50:22 +0000 (17:50 -0700)]
added INTERP_VARYING code

17 years agos/attribute/varying/
Brian [Fri, 22 Dec 2006 00:50:07 +0000 (17:50 -0700)]
s/attribute/varying/

17 years agocomment about uniforms
Brian [Thu, 21 Dec 2006 18:21:26 +0000 (11:21 -0700)]
comment about uniforms

17 years agocheckpoint: rewrite vec/mat products
Brian [Thu, 21 Dec 2006 17:56:09 +0000 (10:56 -0700)]
checkpoint: rewrite vec/mat products

17 years agofix typos
Brian [Thu, 21 Dec 2006 17:49:27 +0000 (10:49 -0700)]
fix typos

17 years agoadded IR_NEG for negation
Brian [Thu, 21 Dec 2006 17:47:28 +0000 (10:47 -0700)]
added IR_NEG for negation

17 years agocheckpoint: matrix/float, unary negation rewrite
Brian [Thu, 21 Dec 2006 17:45:49 +0000 (10:45 -0700)]
checkpoint: matrix/float, unary negation rewrite

17 years agocheckpoint: ivec/int and mat/mat operations
Brian [Thu, 21 Dec 2006 17:03:15 +0000 (10:03 -0700)]
checkpoint: ivec/int and mat/mat operations

17 years agocheckpoint: more basic math rewritting
Brian [Thu, 21 Dec 2006 16:40:08 +0000 (09:40 -0700)]
checkpoint: more basic math rewritting

17 years agocheckpoint: re-org assignment operator functions
Brian [Thu, 21 Dec 2006 01:04:59 +0000 (18:04 -0700)]
checkpoint: re-org assignment operator functions

17 years agoadded glUniformMatrix2/3fv_func
Brian [Thu, 21 Dec 2006 00:56:29 +0000 (17:56 -0700)]
added glUniformMatrix2/3fv_func

17 years agocheckpoint: more basic math operator re-org
Brian [Thu, 21 Dec 2006 00:55:42 +0000 (17:55 -0700)]
checkpoint: more basic math operator re-org

17 years agoCheckpoing: re-organization of basic arithmetic functions.
Brian [Thu, 21 Dec 2006 00:43:56 +0000 (17:43 -0700)]
Checkpoing: re-organization of basic arithmetic functions.

17 years agohandle PROGRAM_UNIFORM, fix a _mesa_problem() call
Brian [Thu, 21 Dec 2006 00:19:45 +0000 (17:19 -0700)]
handle PROGRAM_UNIFORM, fix a _mesa_problem() call

17 years agoUniform matrix support.
Brian [Thu, 21 Dec 2006 00:19:16 +0000 (17:19 -0700)]
Uniform matrix support.

Implement _mesa_uniform_matrix()
Support for program parameters/uniforms with more than 4 elements.
Store 4x4 matrices in column-major order in registers.
Update mat mul built-in functions accordingly.

17 years agoadded _mesa_print_parameter_list()
Brian [Thu, 21 Dec 2006 00:17:38 +0000 (17:17 -0700)]
added _mesa_print_parameter_list()

17 years agoNew IR_COND node for evaluating conditional expressions (for if/while/for).
Brian [Wed, 20 Dec 2006 19:41:59 +0000 (12:41 -0700)]
New IR_COND node for evaluating conditional expressions (for if/while/for).

17 years agouse cast wrappers for sanity checking
Brian [Wed, 20 Dec 2006 16:57:56 +0000 (09:57 -0700)]
use cast wrappers for sanity checking

17 years agocode re-org
Brian [Wed, 20 Dec 2006 16:56:44 +0000 (09:56 -0700)]
code re-org

17 years agoMinor clean-ups, reformatting, comment changes.
Brian [Wed, 20 Dec 2006 16:31:07 +0000 (09:31 -0700)]
Minor clean-ups, reformatting, comment changes.

17 years agoFix shader object reference counting and hash table deallocation.
Brian [Wed, 20 Dec 2006 16:27:42 +0000 (09:27 -0700)]
Fix shader object reference counting and hash table deallocation.

17 years agoClean-up and re-org of the main GLSL object types.
Brian [Wed, 20 Dec 2006 01:46:56 +0000 (18:46 -0700)]
Clean-up and re-org of the main GLSL object types.

Use the gl_shader struct as it should be.
Renamed gl_linked_program to gl_shader_program.
Store both shaders and programs in the same hash table and use the Type field
to distinguish them.

17 years agoOverhaul of GLSL API functions, dispatching, etc.
Brian [Wed, 20 Dec 2006 01:02:41 +0000 (18:02 -0700)]
Overhaul of GLSL API functions, dispatching, etc.

17 years agoOverhaul of GLSL API functions, dispatching, etc.
Brian [Wed, 20 Dec 2006 01:02:03 +0000 (18:02 -0700)]
Overhaul of GLSL API functions, dispatching, etc.

17 years agoMassive re-org of GLSL-related API functions.
Brian [Wed, 20 Dec 2006 00:59:32 +0000 (17:59 -0700)]
Massive re-org of GLSL-related API functions.

Added new GLSL functions to struct dd_function_table.
main/shaders.c calls GLSL functions through the dd_function_table.
shader/shader_api.c implements the API functions.
Other assorted changes, fixes everywhere else.

17 years agocheck for null Parameters ptr in _mesa_clone_program()
Brian [Tue, 19 Dec 2006 16:52:07 +0000 (09:52 -0700)]
check for null Parameters ptr in _mesa_clone_program()

17 years agolots of clean-up and re-org
Brian [Tue, 19 Dec 2006 15:59:51 +0000 (08:59 -0700)]
lots of clean-up and re-org

17 years agoadditional error checking
Brian [Tue, 19 Dec 2006 15:59:36 +0000 (08:59 -0700)]
additional error checking

17 years agonew error msg
Brian [Tue, 19 Dec 2006 15:59:19 +0000 (08:59 -0700)]
new error msg

17 years agorewrite +=, -= etc for floats
Brian [Tue, 19 Dec 2006 15:58:56 +0000 (08:58 -0700)]
rewrite +=, -= etc for floats

17 years agoImplement array indexing of simple vec2/3/4 types. A bit of a hack for now...
Brian [Tue, 19 Dec 2006 00:54:58 +0000 (17:54 -0700)]
Implement array indexing of simple vec2/3/4 types.  A bit of a hack for now...

17 years agoAdded instruction counter to catch infinite loops (temporary).
Brian [Mon, 18 Dec 2006 23:22:27 +0000 (16:22 -0700)]
Added instruction counter to catch infinite loops (temporary).

17 years agoCheck for inst->CondUpdate, print .C suffix.
Brian [Mon, 18 Dec 2006 23:21:58 +0000 (16:21 -0700)]
Check for inst->CondUpdate, print .C suffix.

17 years agoGenerate IR code for for/while loops, break and continue statements.
Brian [Mon, 18 Dec 2006 21:45:26 +0000 (14:45 -0700)]
Generate IR code for for/while loops, break and continue statements.

17 years agoImplement if-conditionals and while loops, added temporary resolve-branches function...
Brian [Mon, 18 Dec 2006 17:05:24 +0000 (10:05 -0700)]
Implement if-conditionals and while loops, added temporary resolve-branches function in linker.

17 years agoGLSL API functions.
Brian [Mon, 18 Dec 2006 15:28:54 +0000 (08:28 -0700)]
GLSL API functions.

17 years agoUse _mesa_free_linked_program_data()
Brian [Mon, 18 Dec 2006 15:28:06 +0000 (08:28 -0700)]
Use _mesa_free_linked_program_data()

17 years agocomments
Brian [Mon, 18 Dec 2006 15:25:23 +0000 (08:25 -0700)]
comments

17 years agofix comment, handle NOP
Brian [Sat, 16 Dec 2006 19:52:55 +0000 (12:52 -0700)]
fix comment, handle NOP

17 years agoInitial code for conditional constructs.
Brian [Sat, 16 Dec 2006 19:52:19 +0000 (12:52 -0700)]
Initial code for conditional constructs.