mesa.git
16 years agoAdded TGSI_FILE_OUTPUT case in fetch_src_file_channel().
Brian [Tue, 2 Oct 2007 20:17:47 +0000 (14:17 -0600)]
Added TGSI_FILE_OUTPUT case in fetch_src_file_channel().

GLSL output variables (such as vertex varyings) can be read (they're not
write-only).

16 years agoImplement CAL/RET and a call stack for subroutines.
Brian [Tue, 2 Oct 2007 20:05:21 +0000 (14:05 -0600)]
Implement CAL/RET and a call stack for subroutines.

The glsl/brick.c shader demo runs now.

16 years agoAdded TGSI_OPCODE_END
Brian [Tue, 2 Oct 2007 19:49:38 +0000 (13:49 -0600)]
Added TGSI_OPCODE_END

Halt program execution when we get to END instruction.  The GLSL compiler
puts subroutines after the end instruction so we have to stop before then.

16 years agoFold expand_program() into tgsi_exec_prepare()
Brian [Tue, 2 Oct 2007 19:41:56 +0000 (13:41 -0600)]
Fold expand_program() into tgsi_exec_prepare()

16 years agono more need for tgsi_exec_machine_run2(), remove dead code
Brian [Tue, 2 Oct 2007 17:49:43 +0000 (11:49 -0600)]
no more need for tgsi_exec_machine_run2(), remove dead code

16 years agoremove dead code
Brian [Tue, 2 Oct 2007 17:47:21 +0000 (11:47 -0600)]
remove dead code

16 years agoMove tgsi machine state init/allocations so they're done less frequently.
Brian [Tue, 2 Oct 2007 17:46:11 +0000 (11:46 -0600)]
Move tgsi machine state init/allocations so they're done less frequently.

This, plus expanding all instructions ahead of time, seems to have improved
the performance of program execution by 8x or so.

16 years agocheckpoint: unpack all instructions before interpretation. Actual looping works.
Brian [Tue, 2 Oct 2007 16:38:56 +0000 (10:38 -0600)]
checkpoint: unpack all instructions before interpretation.  Actual looping works.

16 years agocomments/code for min/max_lod - revisit someday
Brian [Tue, 2 Oct 2007 00:10:53 +0000 (18:10 -0600)]
comments/code for min/max_lod - revisit someday

16 years agouse i915_miptree_layout when using an i915
Brian [Mon, 1 Oct 2007 21:39:15 +0000 (15:39 -0600)]
use i915_miptree_layout when using an i915

16 years agoavoid updating vertex format when it doesn't really change
Brian [Mon, 1 Oct 2007 20:46:19 +0000 (14:46 -0600)]
avoid updating vertex format when it doesn't really change

16 years agodon't crash in RasterPos if feedback not implemented yet
Brian [Mon, 1 Oct 2007 19:55:16 +0000 (13:55 -0600)]
don't crash in RasterPos if feedback not implemented yet

16 years agodisable debug printf
Brian [Mon, 1 Oct 2007 19:54:37 +0000 (13:54 -0600)]
disable debug printf

16 years agodon't crash when fog enabled, still not rendered correctly though
Brian [Mon, 1 Oct 2007 19:54:24 +0000 (13:54 -0600)]
don't crash when fog enabled, still not rendered correctly though

16 years agoremove specular color assertion (the path works)
Brian [Mon, 1 Oct 2007 19:50:24 +0000 (13:50 -0600)]
remove specular color assertion (the path works)

16 years agofix a few vert/frag program items to get i915 driver going again
Brian [Mon, 1 Oct 2007 19:45:53 +0000 (13:45 -0600)]
fix a few vert/frag program items to get i915 driver going again

16 years agohack in some code to test loops, break
Brian [Sat, 29 Sep 2007 16:44:05 +0000 (10:44 -0600)]
hack in some code to test loops, break

16 years agoInitial conditional execution support for loops and BRK instruction.
Brian [Sat, 29 Sep 2007 16:43:29 +0000 (10:43 -0600)]
Initial conditional execution support for loops and BRK instruction.

Also, instead of passing cond mask to each micro op, just apply it in the
store_dest() function.

16 years agoremove unused tgsi_exec_cond_* types
Brian [Sat, 29 Sep 2007 15:51:11 +0000 (09:51 -0600)]
remove unused tgsi_exec_cond_* types

16 years agotemporary hack to test nested conditionals
Brian [Sat, 29 Sep 2007 03:04:56 +0000 (21:04 -0600)]
temporary hack to test nested conditionals

16 years agoInitial implementation of IF/ELSE/ENDIF using conditional masking.
Brian [Sat, 29 Sep 2007 03:04:34 +0000 (21:04 -0600)]
Initial implementation of IF/ELSE/ENDIF using conditional masking.

mach->CondMask controls writing to each of the 4 components in a quad.
mach->CondMaskStack handles nested conditionals.
Only a few of the micro ops (add/sub/mul/store) have been updated to obey CondMask at this time.

16 years agofix bug causing unnecessary translations
Brian [Sat, 29 Sep 2007 02:31:24 +0000 (20:31 -0600)]
fix bug causing unnecessary translations

16 years agoremove old debug code, fix warning
Brian [Fri, 28 Sep 2007 22:20:10 +0000 (16:20 -0600)]
remove old debug code, fix warning

16 years agofix st_use_program()
Brian [Fri, 28 Sep 2007 22:19:51 +0000 (16:19 -0600)]
fix st_use_program()

16 years agoInstead of linked program pairs, keep a list of vertex programs translated for each...
Brian [Fri, 28 Sep 2007 21:39:09 +0000 (15:39 -0600)]
Instead of linked program pairs, keep a list of vertex programs translated for each fragment program.

16 years agoUse texture->first_level, not 0, when not mipmapping.
Brian [Fri, 28 Sep 2007 19:49:50 +0000 (13:49 -0600)]
Use texture->first_level, not 0, when not mipmapping.

Fixes crash when GL_BASE_LEVEL!=0.
Also, remove old assertion.

16 years agoGallium's doxygen documentation.
José Fonseca [Fri, 28 Sep 2007 17:48:15 +0000 (18:48 +0100)]
Gallium's doxygen documentation.

16 years agoUpdate x86's static and profile configs.
José Fonseca [Fri, 28 Sep 2007 17:17:11 +0000 (17:17 +0000)]
Update x86's static and profile configs.

16 years agoUse sse only if GALLIUM_SSE is defined
Zack Rusin [Fri, 28 Sep 2007 11:33:54 +0000 (07:33 -0400)]
Use sse only if GALLIUM_SSE is defined

16 years agoRedoing the way we handle vertex shaders for the draw module.
Zack Rusin [Fri, 28 Sep 2007 08:33:55 +0000 (04:33 -0400)]
Redoing the way we handle vertex shaders for the draw module.

16 years agoRemove gl dependency from the x86 assembler code
Zack Rusin [Fri, 28 Sep 2007 08:33:55 +0000 (04:33 -0400)]
Remove gl dependency from the x86 assembler code

16 years agoRevert "Redoing the way we handle vertex shaders for the draw module."
Zack Rusin [Fri, 28 Sep 2007 16:28:16 +0000 (12:28 -0400)]
Revert "Redoing the way we handle vertex shaders for the draw module."

This reverts commit 6dcfddb8e2ec2bfb6187b912807fa65f28da2c5e.

16 years agoRevert "Use sse only if GALLIUM_SSE is defined"
Zack Rusin [Fri, 28 Sep 2007 16:28:06 +0000 (12:28 -0400)]
Revert "Use sse only if GALLIUM_SSE is defined"

This reverts commit 57b5d3605745c96ddc2b6de7d50c93db65ba1257.

16 years agoUse sse only if GALLIUM_SSE is defined
Zack Rusin [Fri, 28 Sep 2007 11:33:54 +0000 (07:33 -0400)]
Use sse only if GALLIUM_SSE is defined

16 years agoRedoing the way we handle vertex shaders for the draw module.
Zack Rusin [Fri, 28 Sep 2007 08:33:55 +0000 (04:33 -0400)]
Redoing the way we handle vertex shaders for the draw module.

16 years agoset miptree pitch to region pitch after allocating the region in st_miptree_create()
Brian [Thu, 27 Sep 2007 22:33:01 +0000 (16:33 -0600)]
set miptree pitch to region pitch after allocating the region in st_miptree_create()

This fixes rendering with small (4x4) textures with softpipe.
Haven't yet tested with i915.

16 years agocomments
Brian [Thu, 27 Sep 2007 22:31:13 +0000 (16:31 -0600)]
comments

16 years agoremove dead code
keithw [Thu, 27 Sep 2007 15:20:31 +0000 (16:20 +0100)]
remove dead code

16 years agoreduced debug
keithw [Thu, 27 Sep 2007 11:50:02 +0000 (12:50 +0100)]
reduced debug

16 years agoFix some compiler warnings with -pedantic
Keith Whitwell [Wed, 26 Sep 2007 12:30:01 +0000 (13:30 +0100)]
Fix some compiler warnings with -pedantic

16 years agoEnable codegen based whenever __i386__ is defined.
Keith Whitwell [Wed, 26 Sep 2007 11:46:45 +0000 (12:46 +0100)]
Enable codegen based whenever __i386__ is defined.

16 years agofix merge
keithw [Wed, 26 Sep 2007 11:10:46 +0000 (12:10 +0100)]
fix merge

16 years agodisable debug
Keith Whitwell [Wed, 26 Sep 2007 11:08:08 +0000 (12:08 +0100)]
disable debug

16 years agorestore primitive trimming in sp_draw_arrays.c
keithw [Wed, 26 Sep 2007 10:57:28 +0000 (11:57 +0100)]
restore primitive trimming in sp_draw_arrays.c

16 years agoMake flushing more lazy in the draw module.
Keith Whitwell [Wed, 26 Sep 2007 10:56:17 +0000 (11:56 +0100)]
Make flushing more lazy in the draw module.

16 years agoUse Gallium in the renderer string
keithw [Wed, 26 Sep 2007 10:55:08 +0000 (11:55 +0100)]
Use Gallium in the renderer string

16 years agoDo image flipping in do_copy_texsubimage() and GL pixel transfer ops (except convolut...
Brian [Thu, 27 Sep 2007 00:54:20 +0000 (18:54 -0600)]
Do image flipping in do_copy_texsubimage() and GL pixel transfer ops (except convolution).

16 years agofallback_copy_texsubimage() basically works now (at least w/ Xlib driver).
Brian [Thu, 27 Sep 2007 00:39:14 +0000 (18:39 -0600)]
fallback_copy_texsubimage() basically works now (at least w/ Xlib driver).

Have to map regions before calling get_tile()/put_tile().
Need to invert srcY of glCopyTexSubImage() depending on renderbuffers
up/down orientation.
Still need to invert image in fallback_copy_texsubimage() when needed.

16 years agoadded a8r8g8b8_put_tile()
Brian [Thu, 27 Sep 2007 00:34:43 +0000 (18:34 -0600)]
added a8r8g8b8_put_tile()

16 years agodon't use scissored bounds in _mesa_clip_copytexsubimage()
Brian [Thu, 27 Sep 2007 00:34:13 +0000 (18:34 -0600)]
don't use scissored bounds in _mesa_clip_copytexsubimage()

16 years agoMore work on glCopyTexSubImage.
Brian [Wed, 26 Sep 2007 23:57:15 +0000 (17:57 -0600)]
More work on glCopyTexSubImage.

Start sketching out a fallback path based on surface->get_tile(), put_tile()
which will do format convertion and GL's pixel transfer ops.

16 years agocheckpoint: glCopyTexImage work
Brian [Wed, 26 Sep 2007 23:18:42 +0000 (17:18 -0600)]
checkpoint: glCopyTexImage work

16 years agos/_mesa_copy_rect/copy_rect/
Brian [Wed, 26 Sep 2007 23:03:40 +0000 (17:03 -0600)]
s/_mesa_copy_rect/copy_rect/

16 years agoAdded new _mesa_clip_copytexsubimage() function to do avoid clipping down in the...
Brian [Wed, 26 Sep 2007 23:03:11 +0000 (17:03 -0600)]
Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in the drivers.

This should probably be pulled into main-line Mesa...

16 years agocheck for _NEW_PROGRAM mesa state (fixes arbfplight)
Brian [Wed, 26 Sep 2007 21:34:51 +0000 (15:34 -0600)]
check for _NEW_PROGRAM mesa state (fixes arbfplight)

16 years agobetter debugging
Brian [Wed, 26 Sep 2007 21:34:31 +0000 (15:34 -0600)]
better debugging

16 years agocomments, null ptr checks, etc.
Brian [Tue, 25 Sep 2007 23:07:59 +0000 (17:07 -0600)]
comments, null ptr checks, etc.

16 years agodon't apply pixelzoom to bitmaps
Brian [Tue, 25 Sep 2007 23:03:19 +0000 (17:03 -0600)]
don't apply pixelzoom to bitmaps

16 years agost_draw_vertices() no longer needs attribs[] array parameter
Brian [Tue, 25 Sep 2007 22:56:35 +0000 (16:56 -0600)]
st_draw_vertices() no longer needs attribs[] array parameter

16 years agoSimple implementation of glBitmap rendering.
Brian [Tue, 25 Sep 2007 22:52:38 +0000 (16:52 -0600)]
Simple implementation of glBitmap rendering.

Create a texture matching the bitmap image and use a fragment program
to modulate current raster color by the boolean-valued texture.  Need to
eventually use fragment culling (see comments in code).

16 years agore-org/prep for glBitmap
Brian [Tue, 25 Sep 2007 21:48:14 +0000 (15:48 -0600)]
re-org/prep for glBitmap

16 years agoclean-up #includes
Brian [Tue, 25 Sep 2007 21:21:19 +0000 (15:21 -0600)]
clean-up #includes

16 years agobetter debug output
Brian [Tue, 25 Sep 2007 21:20:58 +0000 (15:20 -0600)]
better debug output

16 years agoinclude programopt.h
Brian [Tue, 25 Sep 2007 21:20:04 +0000 (15:20 -0600)]
include programopt.h

16 years agoDisable vertex shader fog, compute fog in fragment shader.
Brian [Tue, 25 Sep 2007 21:18:51 +0000 (15:18 -0600)]
Disable vertex shader fog, compute fog in fragment shader.

16 years agosome clean-up of ST_NEW_ shader flags
Brian [Tue, 25 Sep 2007 20:46:49 +0000 (14:46 -0600)]
some clean-up of ST_NEW_ shader flags

16 years agodisable TGSI_DEBUG
Brian [Tue, 25 Sep 2007 20:46:18 +0000 (14:46 -0600)]
disable TGSI_DEBUG

16 years agoreplaced by st_atom_shader.c
Brian [Tue, 25 Sep 2007 20:30:26 +0000 (14:30 -0600)]
replaced by st_atom_shader.c

16 years agoTranslate mesa vertex/fragment programs to TGSI programs at same time to do proper...
Brian [Tue, 25 Sep 2007 20:29:11 +0000 (14:29 -0600)]
Translate mesa vertex/fragment programs to TGSI programs at same time to do proper linking.

Previously, programs were translated independently during validation.
The problem is the translation to TGSI format, which packs shader
input/outputs into continuous slots, depends on which vertex program is
being paired with which fragment shader.  Now, we look at the outputs
of the vertex program in conjunction with the inputs of the fragment shader
to be sure the attributes match up correctly.

The new 'linked_program_pair' class keeps track of the associations
between vertex and fragment shaders.  It's also the place where the TGSI
tokens are kept since they're no longer per-program state but per-linkage.

Still a few loose ends, like implementing some kind of hash/lookup table
for linked_program_pairs.

16 years agotranslate Mesa programs to TGSI programs (formerly in st_atom_[fv]s.c)
Brian [Tue, 25 Sep 2007 20:22:13 +0000 (14:22 -0600)]
translate Mesa programs to TGSI programs (formerly in st_atom_[fv]s.c)

16 years agovertex/fragment shader state and linking
Brian [Tue, 25 Sep 2007 20:21:18 +0000 (14:21 -0600)]
vertex/fragment shader state and linking

16 years agotest for presence of both front and back color vertex slots
Brian [Fri, 21 Sep 2007 18:41:24 +0000 (12:41 -0600)]
test for presence of both front and back color vertex slots

16 years agoremove unused lookup array
Brian [Fri, 21 Sep 2007 18:39:26 +0000 (12:39 -0600)]
remove unused lookup array

16 years agoFirst attempt at building vertex buffers post-clip.
Keith Whitwell [Tue, 25 Sep 2007 12:20:53 +0000 (13:20 +0100)]
First attempt at building vertex buffers post-clip.

Build a buffer of contigous vertices and indices at the backend of our
software transformation/clipping path.  This will become the mechanism
for emitting buffers of vertices to rasterization hardware.

This is similar to but not the same as the post-transform vertex cache.
In particular, these vertices are subject to clipping, culling, poly offset,
etc.  The vertices emitted will all be used by hardware.

TODOs include the actual transformation to hardware vertex formats, moving
this out of softpipe to somewhere more useful and allowing >1 primitive to
share the generated VB.

16 years agoturn off shader debug
keithw [Tue, 25 Sep 2007 12:16:25 +0000 (13:16 +0100)]
turn off shader debug

16 years agotest against -1 for front/back attrib
keithw [Tue, 25 Sep 2007 11:08:16 +0000 (12:08 +0100)]
test against -1 for front/back attrib

16 years agoEnable SSE2 for FS.
michal [Mon, 24 Sep 2007 11:32:26 +0000 (12:32 +0100)]
Enable SSE2 for FS.

16 years agoIn here we actually do want to assign it. Fix compilation.
Zack Rusin [Mon, 24 Sep 2007 09:43:07 +0000 (05:43 -0400)]
In here we actually do want to assign it. Fix compilation.

16 years agoinvert draw_vertex_cache_check_space()
Brian [Fri, 21 Sep 2007 18:37:13 +0000 (12:37 -0600)]
invert draw_vertex_cache_check_space()

16 years agoadded PSIZE
Brian [Fri, 21 Sep 2007 18:36:59 +0000 (12:36 -0600)]
added PSIZE

16 years agofix some post-transform vertex layout issues (bcolors, psize emitted last
Brian [Fri, 21 Sep 2007 18:21:05 +0000 (12:21 -0600)]
fix some post-transform vertex layout issues (bcolors, psize emitted last

16 years agoFix up some point size breakage. Start on fogcoord too.
Brian [Fri, 21 Sep 2007 18:06:08 +0000 (12:06 -0600)]
Fix up some point size breakage.  Start on fogcoord too.

16 years agoreenable some clear code that was temporarily disabled
Brian [Fri, 21 Sep 2007 17:55:28 +0000 (11:55 -0600)]
reenable some clear code that was temporarily disabled

16 years agoremove debug printfs
Brian [Fri, 21 Sep 2007 17:54:57 +0000 (11:54 -0600)]
remove debug printfs

16 years agocomments
Brian [Fri, 21 Sep 2007 17:34:28 +0000 (11:34 -0600)]
comments

16 years agouse VERT_ATTRIB_MAX for loop limit
Brian [Fri, 21 Sep 2007 17:34:20 +0000 (11:34 -0600)]
use VERT_ATTRIB_MAX for loop limit

16 years agoremove SEMANTIC_TEXCOORD
Brian [Fri, 21 Sep 2007 17:22:34 +0000 (11:22 -0600)]
remove SEMANTIC_TEXCOORD

16 years agoGet rid of TGSI_SEMANTIC_TEXCOORD and just use TGSI_SEMANTIC_GENERIC.
Brian [Fri, 21 Sep 2007 17:20:29 +0000 (11:20 -0600)]
Get rid of TGSI_SEMANTIC_TEXCOORD and just use TGSI_SEMANTIC_GENERIC.

16 years agorename index var from i to attr, use FRAG_ATTRIB_MAX instead of 16
Brian [Fri, 21 Sep 2007 17:01:26 +0000 (11:01 -0600)]
rename index var from i to attr, use FRAG_ATTRIB_MAX instead of 16

16 years agominor renaming
Brian [Fri, 21 Sep 2007 16:57:30 +0000 (10:57 -0600)]
minor renaming

16 years agopass vs output semantics to tgsi_mesa_compile_vp_program() to generate output DECs
Brian [Fri, 21 Sep 2007 16:56:32 +0000 (10:56 -0600)]
pass vs output semantics to tgsi_mesa_compile_vp_program() to generate output DECs

16 years agofix in/out typos
Brian [Fri, 21 Sep 2007 16:53:45 +0000 (10:53 -0600)]
fix in/out typos

16 years agoPass vertex program input semantics into tgsi_mesa_compile_vp_program() to produce...
Brian [Fri, 21 Sep 2007 16:40:18 +0000 (10:40 -0600)]
Pass vertex program input semantics into tgsi_mesa_compile_vp_program() to produce DCLs.

16 years agofix 1/i typos
Brian [Fri, 21 Sep 2007 16:38:18 +0000 (10:38 -0600)]
fix 1/i typos

16 years agoFix the doxygen target in the top-level Makefile.
José Fonseca [Fri, 21 Sep 2007 15:47:00 +0000 (16:47 +0100)]
Fix the doxygen target in the top-level Makefile.

16 years agoConvert i915 to use cso semantics of alpha_test.
Zack Rusin [Fri, 21 Sep 2007 11:06:19 +0000 (07:06 -0400)]
Convert i915 to use cso semantics of alpha_test.

16 years agoMake the alpha test state a cso.
Zack Rusin [Fri, 21 Sep 2007 11:00:20 +0000 (07:00 -0400)]
Make the alpha test state a cso.

16 years agoSilence a few warnings.
Zack Rusin [Fri, 21 Sep 2007 08:56:39 +0000 (04:56 -0400)]
Silence a few warnings.

16 years agoremove :5 form format field in pipe_surface, makes no difference at this time
Brian [Fri, 21 Sep 2007 01:06:26 +0000 (19:06 -0600)]
remove :5 form format field in pipe_surface, makes no difference at this time

16 years agoremove old code in src_vector()
Brian [Thu, 20 Sep 2007 21:32:18 +0000 (15:32 -0600)]
remove old code in src_vector()