mesa.git
16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Fri, 14 Dec 2007 22:48:11 +0000 (09:48 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoAdded origin_lower_left field to pipe_rasterizer_state
Brian [Fri, 14 Dec 2007 19:25:25 +0000 (12:25 -0700)]
Added origin_lower_left field to pipe_rasterizer_state

This controls whether the window origin is considered to be the lower-left
or upper-left corner.
This effects computation of gl_FragCoord and the application of polygon stipple.

16 years agoupdate_samplers() didn't respect the sampler->texunit mapping.
Brian [Fri, 14 Dec 2007 18:43:15 +0000 (11:43 -0700)]
update_samplers() didn't respect the sampler->texunit mapping.

This fixes the glsl/texdemo1.c program.

16 years agoset SamplerUnit[] entry in load_texture() just to be safe
Brian [Fri, 14 Dec 2007 18:42:28 +0000 (11:42 -0700)]
set SamplerUnit[] entry in load_texture() just to be safe

16 years agoemit tgsi declarations for texture samplers
Brian [Fri, 14 Dec 2007 18:17:48 +0000 (11:17 -0700)]
emit tgsi declarations for texture samplers

16 years agoset program->SamplersUsed bit when using a texture instruction
Brian [Fri, 14 Dec 2007 18:16:49 +0000 (11:16 -0700)]
set program->SamplersUsed bit when using a texture instruction

16 years agoDon't always declare frag shader INPUT[0] as fragment position.
Brian [Fri, 14 Dec 2007 18:00:46 +0000 (11:00 -0700)]
Don't always declare frag shader INPUT[0] as fragment position.

We were doing this for the sake of softpipe and the tgsi intergrepter since
we always need the fragment position and W-coordinate information in order
to compute fragment interpolants.
But that's not appropriate for hardware drivers.
The tgsi interpreter now get x,y,w information from a separate tgsi_exec_vector
variable setup by softpipe.
The new pipe_shader_state->input_map[] defines how vert shader outputs map
to frag shader inputs.  It may go away though, since one can also examine
the semantic label on frag shader input[0] to figure things out.

16 years agoupdate comment for TGSI_TOKEN_TYPE_IMMEDIATE case
Brian [Fri, 14 Dec 2007 17:46:29 +0000 (10:46 -0700)]
update comment for TGSI_TOKEN_TYPE_IMMEDIATE case

16 years agonv40: less dodgy vp const/insn handling
Ben Skeggs [Fri, 14 Dec 2007 14:50:15 +0000 (01:50 +1100)]
nv40: less dodgy vp const/insn handling

16 years agoadd missing code for PIPE_FORMAT_S8_UNORM renderbuffer
Brian [Fri, 14 Dec 2007 01:26:48 +0000 (18:26 -0700)]
add missing code for PIPE_FORMAT_S8_UNORM renderbuffer

16 years agoremove unused var
Brian [Fri, 14 Dec 2007 01:26:10 +0000 (18:26 -0700)]
remove unused var

16 years ago965: get brw_wm_surface_state compiling again
Keith Whitwell [Thu, 13 Dec 2007 21:00:10 +0000 (21:00 +0000)]
965: get brw_wm_surface_state compiling again

16 years ago965: get fragment shader compiler compiling
Keith Whitwell [Thu, 13 Dec 2007 20:38:56 +0000 (20:38 +0000)]
965: get fragment shader compiler compiling

Don't think that it will run though.

16 years agoi965: make the wm_surface compile
Zack Rusin [Thu, 13 Dec 2007 16:42:30 +0000 (11:42 -0500)]
i965: make the wm_surface compile

16 years ago965: implement magic buffer offset callback
Keith Whitwell [Thu, 13 Dec 2007 16:39:49 +0000 (16:39 +0000)]
965: implement magic buffer offset callback

16 years ago965: magic callback to get buffer offset
Keith Whitwell [Thu, 13 Dec 2007 16:35:27 +0000 (16:35 +0000)]
965: magic callback to get buffer offset

16 years agoAdd QuadX,Y fields to tgsi_exec_machine to pass quad's position to tgsi interpreter.
Brian [Thu, 13 Dec 2007 16:05:15 +0000 (09:05 -0700)]
Add QuadX,Y fields to tgsi_exec_machine to pass quad's position to tgsi interpreter.

The tgsi linear/perspective attribute code now uses these values rather than
input[0].  Need to update SSE path to take quad x,y as function params.
Then, we can remove additional code.

16 years ago965: missing code from last commit
Keith Whitwell [Thu, 13 Dec 2007 15:39:34 +0000 (15:39 +0000)]
965: missing code from last commit

16 years ago965: remove dead code
Keith Whitwell [Thu, 13 Dec 2007 14:52:31 +0000 (14:52 +0000)]
965: remove dead code

16 years ago965: remove dead code
Keith Whitwell [Thu, 13 Dec 2007 11:12:44 +0000 (11:12 +0000)]
965: remove dead code

16 years ago965: remove dead code
Keith Whitwell [Thu, 13 Dec 2007 10:57:02 +0000 (10:57 +0000)]
965: remove dead code

16 years ago965: remove dead code
Keith Whitwell [Thu, 13 Dec 2007 10:56:09 +0000 (10:56 +0000)]
965: remove dead code

16 years ago965: remove reference to metaops
Keith Whitwell [Thu, 13 Dec 2007 10:55:47 +0000 (10:55 +0000)]
965: remove reference to metaops

16 years ago965: use state atom array directly
Keith Whitwell [Thu, 13 Dec 2007 10:55:16 +0000 (10:55 +0000)]
965: use state atom array directly

16 years ago965: calculate nr enabled vbos on the fly
Keith Whitwell [Thu, 13 Dec 2007 10:54:31 +0000 (10:54 +0000)]
965: calculate nr enabled vbos on the fly

16 years agoActually allocate the output registers.
Zack Rusin [Thu, 13 Dec 2007 15:32:36 +0000 (10:32 -0500)]
Actually allocate the output registers.

In tgsi the output's will (hopefully) consecutive so this
check (besides not being currently implemented) is not
necessary.

16 years agoDon't generate spurious vs, move the enable a bit to do that.
Zack Rusin [Thu, 13 Dec 2007 15:31:39 +0000 (10:31 -0500)]
Don't generate spurious vs, move the enable a bit to do that.

16 years agonv40: Do all fp setup in nv40_fragprog.c
Ben Skeggs [Thu, 13 Dec 2007 14:51:43 +0000 (01:51 +1100)]
nv40: Do all fp setup in nv40_fragprog.c

16 years agonouveau: mass renaming for consistency, no functional changes
Ben Skeggs [Thu, 13 Dec 2007 14:14:23 +0000 (01:14 +1100)]
nouveau: mass renaming for consistency, no functional changes

16 years agonouveau: more adaption..
Ben Skeggs [Thu, 13 Dec 2007 00:55:35 +0000 (11:55 +1100)]
nouveau: more adaption..

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Wed, 12 Dec 2007 23:41:43 +0000 (10:41 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoadded r5g5b5_put_tile_rgba()
Brian [Wed, 12 Dec 2007 23:30:49 +0000 (16:30 -0700)]
added r5g5b5_put_tile_rgba()

16 years agoRemove get/put_tile_rgba() functions.
Brian [Wed, 12 Dec 2007 23:05:38 +0000 (16:05 -0700)]
Remove get/put_tile_rgba() functions.

Temporarily, use the functions from sp_rgba_tile.c

16 years agoremove #include
Brian [Wed, 12 Dec 2007 23:04:52 +0000 (16:04 -0700)]
remove #include

16 years agoMove float/rgba tile get/put functions into new file.
Brian [Wed, 12 Dec 2007 23:00:11 +0000 (16:00 -0700)]
Move float/rgba tile get/put functions into new file.

This should be moved into a gallium util lib (location tbd) so it can also
be used by the state tracker.
Then, remove the pipe->get/put_tile_rgba() functions.

16 years agoPIPE_SCREEN_SURFACE no longer needed
Brian [Wed, 12 Dec 2007 22:24:01 +0000 (15:24 -0700)]
PIPE_SCREEN_SURFACE no longer needed

16 years agoRe-org of st_create_framebuffer() and renderbuffer format selection.
Brian [Wed, 12 Dec 2007 21:55:57 +0000 (14:55 -0700)]
Re-org of st_create_framebuffer() and renderbuffer format selection.

st_create_framebuffer() now takes pipe_formats for the color, depth, stencil
buffers.
This avoids a round-about chain of calls to pipe->is_format_supported() for
window renderbuffers (their format never changes).
Renderbuffer format selection code in st_format.c is simpler now too.

16 years agomove some code to avoid deref of NULL ptr
Brian [Wed, 12 Dec 2007 21:45:22 +0000 (14:45 -0700)]
move some code to avoid deref of NULL ptr

16 years ago965: remove complex compiler for simple fragment programs.
Keith Whitwell [Wed, 12 Dec 2007 20:07:35 +0000 (20:07 +0000)]
965: remove complex compiler for simple fragment programs.

Keep the simple compiler for complex fragment programs...

16 years ago965: sketch changes to brw_wm_surface_state.c
Keith Whitwell [Wed, 12 Dec 2007 19:53:41 +0000 (19:53 +0000)]
965: sketch changes to brw_wm_surface_state.c

16 years ago965: delete dead files
Keith Whitwell [Wed, 12 Dec 2007 18:44:03 +0000 (18:44 +0000)]
965: delete dead files

16 years ago965: delete dead files
Keith Whitwell [Wed, 12 Dec 2007 17:24:10 +0000 (17:24 +0000)]
965: delete dead files

16 years ago965: delete dead files
Keith Whitwell [Wed, 12 Dec 2007 17:22:51 +0000 (17:22 +0000)]
965: delete dead files

16 years agoremove old assertion
Brian [Wed, 12 Dec 2007 20:08:00 +0000 (13:08 -0700)]
remove old assertion

16 years agoadd PIPE_FORMAT_R5G6B5_UNORM to list of supported screen surface types
Brian [Wed, 12 Dec 2007 19:59:45 +0000 (12:59 -0700)]
add PIPE_FORMAT_R5G6B5_UNORM to list of supported screen surface types

16 years agoupdate format param type
Brian [Wed, 12 Dec 2007 19:59:19 +0000 (12:59 -0700)]
update format param type

16 years agoTry PIPE_FORMAT_R5G6B5_UNORM for GL_RGB5 request.
Brian [Wed, 12 Dec 2007 19:58:59 +0000 (12:58 -0700)]
Try PIPE_FORMAT_R5G6B5_UNORM for GL_RGB5 request.

16 years agofix some mistakes in the _PIPE_FORMAT_x #defines
Brian [Wed, 12 Dec 2007 19:58:04 +0000 (12:58 -0700)]
fix some mistakes in the _PIPE_FORMAT_x #defines

16 years agoi965: compile vertex shaders and emit hardware instructions
Zack Rusin [Wed, 12 Dec 2007 17:26:00 +0000 (12:26 -0500)]
i965: compile vertex shaders and emit hardware instructions

impossible to test because fragment shaders haven't been done yet
and it crahses in the fragment shading code. but given that i'm
infallible (and highly dillusional) i'm sure it's correct.

16 years agoAdd src/mesa to include path.
José Fonseca [Wed, 12 Dec 2007 16:04:58 +0000 (16:04 +0000)]
Add src/mesa to include path.

16 years agonouveau: take jumps into account properly when debugging pushbuf
Ben Skeggs [Wed, 12 Dec 2007 14:04:12 +0000 (01:04 +1100)]
nouveau: take jumps into account properly when debugging pushbuf

16 years agonv40: Fix bug in vtxprog + a few tweaks
Ben Skeggs [Wed, 12 Dec 2007 12:37:52 +0000 (23:37 +1100)]
nv40: Fix bug in vtxprog + a few tweaks

16 years agonv40: small bug
Ben Skeggs [Wed, 12 Dec 2007 12:31:16 +0000 (23:31 +1100)]
nv40: small bug

16 years agoi915tex: remove. it's deprecated and causes merge problems
Zack Rusin [Tue, 11 Dec 2007 22:46:06 +0000 (17:46 -0500)]
i915tex: remove. it's deprecated and causes merge problems

we did some small changes in the beginning of the gallium3d
lifecycle in i915tex which is not in master anymore and just
causes problems when doing merges. getting rid of the headache
by just nuking it here

16 years agonouveau: adapt
Ben Skeggs [Wed, 12 Dec 2007 03:19:59 +0000 (14:19 +1100)]
nouveau: adapt

Some things that worked before are now broken, there's an "XXX:" around one
of the culprits in the GL state tracker so hopefully it'll get fixed soon!

16 years agoremove more -I paths
Brian [Wed, 12 Dec 2007 02:17:31 +0000 (19:17 -0700)]
remove more -I paths

16 years agoprefix some #includes
Brian [Wed, 12 Dec 2007 02:16:46 +0000 (19:16 -0700)]
prefix some #includes

16 years agotrim down #includes
Brian [Wed, 12 Dec 2007 02:16:26 +0000 (19:16 -0700)]
trim down #includes

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Wed, 12 Dec 2007 02:11:19 +0000 (13:11 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

Conflicts:

src/mesa/pipe/Makefile

16 years agotrim down -I options
Brian [Wed, 12 Dec 2007 01:58:48 +0000 (18:58 -0700)]
trim down -I options

16 years agoinclude pipe/tgsi/exec/tgsi_sse2.h if needed. Silences warning.
Brian [Wed, 12 Dec 2007 01:58:32 +0000 (18:58 -0700)]
include pipe/tgsi/exec/tgsi_sse2.h if needed.  Silences warning.

16 years agoCell: draw smooth-shaded triangle
Brian [Wed, 12 Dec 2007 01:26:52 +0000 (18:26 -0700)]
Cell: draw smooth-shaded triangle

16 years agoCollect some global vars in a single struct.
Brian [Tue, 11 Dec 2007 17:28:45 +0000 (10:28 -0700)]
Collect some global vars in a single struct.

16 years agoRemove temporary cell_create_surface()
Brian [Tue, 11 Dec 2007 16:44:04 +0000 (09:44 -0700)]
Remove temporary cell_create_surface()

16 years agoSPU function prototypes, etc.
Brian [Tue, 11 Dec 2007 20:49:48 +0000 (13:49 -0700)]
SPU function prototypes, etc.

16 years agoPort to libspe2
Ian Romanick [Tue, 11 Dec 2007 20:40:58 +0000 (12:40 -0800)]
Port to libspe2

libspe is deprecated in Cell SDK 2.1, and it is removed in Cell SDK 3.0.
This patch ports the existing libspe-based code to libspe2.  Some error
checking (eh-hem) would be nice.

16 years agoRemove '-include altivec.h'.
Ian Romanick [Tue, 11 Dec 2007 20:39:17 +0000 (12:39 -0800)]
Remove '-include altivec.h'.

Including altivec.h caused problems in some places that use "pixel" as a
variable name.

16 years agoMention 965 driver on main page.
José Fonseca [Tue, 11 Dec 2007 18:18:25 +0000 (18:18 +0000)]
Mention 965 driver on main page.

16 years agoWrite a nicer doxygen main page, based on the TG's Gallium3D technical overview pages.
José Fonseca [Tue, 11 Dec 2007 18:10:41 +0000 (18:10 +0000)]
Write a nicer doxygen main page, based on the TG's Gallium3D technical overview pages.

16 years agoCover LLVM code in doxygen output.
José Fonseca [Tue, 11 Dec 2007 18:09:08 +0000 (18:09 +0000)]
Cover LLVM code in doxygen output.

16 years agosoftpipe: Support for PIPE_FORMAT_A4R4G4B4_UNORM and PIPE_FORMAT_R5G6B5_UNORM.
Michel Dänzer [Tue, 11 Dec 2007 18:07:12 +0000 (19:07 +0100)]
softpipe: Support for PIPE_FORMAT_A4R4G4B4_UNORM and PIPE_FORMAT_R5G6B5_UNORM.

The packedpixels test runs with the xlib winsys, though not all cases look
correct yet.

16 years agoRemove internal_format field from struct pipe_texture.
Michel Dänzer [Tue, 11 Dec 2007 18:02:26 +0000 (19:02 +0100)]
Remove internal_format field from struct pipe_texture.

It's state tracker specific / not really necessary anyway.

16 years agoRework gallium and mesa queries a little.
Keith Whitwell [Tue, 11 Dec 2007 17:10:26 +0000 (17:10 +0000)]
Rework gallium and mesa queries a little.

Add a 'CheckQuery()' driver callback to mesa to check query completion.
Make pipe_query an opaque type.
Rework softpipe queries, support overlapping occlusion queries.

16 years ago965: remove duplicate brw_draw functions, make init a bit cleaner
Keith Whitwell [Tue, 11 Dec 2007 17:07:31 +0000 (17:07 +0000)]
965: remove duplicate brw_draw functions, make init a bit cleaner

16 years agogallium: remove clear values from depth, stencil state
Keith Whitwell [Tue, 11 Dec 2007 15:48:30 +0000 (15:48 +0000)]
gallium: remove clear values from depth, stencil state

16 years agoFix align16() function to work with 32/64-bit pointers on big-endian.
Brian [Tue, 11 Dec 2007 16:13:12 +0000 (09:13 -0700)]
Fix align16() function to work with 32/64-bit pointers on big-endian.

16 years agochange align_malloc() alignment to uint
Brian [Tue, 11 Dec 2007 16:09:06 +0000 (09:09 -0700)]
change align_malloc() alignment to uint

16 years agoMove align_malloc(), align_free() to p_util.h
Brian [Tue, 11 Dec 2007 15:58:39 +0000 (08:58 -0700)]
Move align_malloc(), align_free() to p_util.h

16 years agouse ALIGN16_ATTRIB from p_compiler.h
Brian [Tue, 11 Dec 2007 15:47:13 +0000 (08:47 -0700)]
use ALIGN16_ATTRIB from p_compiler.h

16 years agoRemove obsolete clear_color, tex sampler state
Brian [Tue, 11 Dec 2007 15:46:49 +0000 (08:46 -0700)]
Remove obsolete clear_color, tex sampler state

16 years agoRemove obsolete clear_color, tex sampler state functions
Brian [Tue, 11 Dec 2007 15:46:13 +0000 (08:46 -0700)]
Remove obsolete clear_color, tex sampler state functions

16 years agoadd missing case statements for TGSI_TOKEN_TYPE_IMMEDIATE and assert(0)
Brian [Tue, 11 Dec 2007 15:18:47 +0000 (08:18 -0700)]
add missing case statements for TGSI_TOKEN_TYPE_IMMEDIATE and assert(0)

We're hitting this with quite a few Mesa demos.

16 years agoAdopt llvm to some of the latest changes.
Zack Rusin [Tue, 11 Dec 2007 14:44:41 +0000 (09:44 -0500)]
Adopt llvm to some of the latest changes.

16 years agoRedo the fragment program examples to match vp's
Zack Rusin [Fri, 9 Nov 2007 15:08:15 +0000 (10:08 -0500)]
Redo the fragment program examples to match vp's

we just load text files instead of compiling tons of small
binaries

16 years agoAdd a simple fps counter to the example
Zack Rusin [Fri, 9 Nov 2007 13:19:27 +0000 (08:19 -0500)]
Add a simple fps counter to the example

16 years agoRedo the way we pass arguments to the llvm.
Zack Rusin [Wed, 7 Nov 2007 18:26:45 +0000 (13:26 -0500)]
Redo the way we pass arguments to the llvm.

simply pass aligned arrays, they should cast to vectors without
any problems. also remove unnecessary memset

16 years agonumber of outputs is nr_attribs - 2
Zack Rusin [Wed, 7 Nov 2007 13:59:35 +0000 (08:59 -0500)]
number of outputs is nr_attribs - 2

16 years agoImplement kilp and make it work
Zack Rusin [Tue, 6 Nov 2007 11:06:04 +0000 (06:06 -0500)]
Implement kilp and make it work

16 years agoRewrite argument passing to prepare for handling of the kil instruction.
Zack Rusin [Mon, 5 Nov 2007 18:41:56 +0000 (13:41 -0500)]
Rewrite argument passing to prepare for handling of the kil instruction.

Pass the inputs/outputs pointer in the structure instead of infinitely
expanding arguments to the functions.

16 years agogallium: remove set_sampler_units interface
Keith Whitwell [Tue, 11 Dec 2007 14:39:37 +0000 (14:39 +0000)]
gallium: remove set_sampler_units interface

The effect of this mapping can be acheived by the state tracker and
setting up the pipe texture state pointers to incorporate its affects.

16 years agogallium: remove redundant clear_color state.
Keith Whitwell [Tue, 11 Dec 2007 13:19:33 +0000 (13:19 +0000)]
gallium: remove redundant clear_color state.

16 years agogallium: Remove feedback interfaces from pipe driver.
Keith Whitwell [Tue, 11 Dec 2007 13:00:12 +0000 (13:00 +0000)]
gallium: Remove feedback interfaces from pipe driver.

Something similar will return when geometry shaders are added, but for now
this interface is not required.

16 years agogallium: remove dead pbo zcopy code
Keith Whitwell [Tue, 11 Dec 2007 12:25:42 +0000 (12:25 +0000)]
gallium: remove dead pbo zcopy code

16 years agoHmm, missed these two files. Sorry.
Zack Rusin [Tue, 11 Dec 2007 12:44:07 +0000 (07:44 -0500)]
Hmm, missed these two files. Sorry.

16 years agoPort i965 driver to Gallium3D.
Zack Rusin [Tue, 11 Dec 2007 12:19:11 +0000 (07:19 -0500)]
Port i965 driver to Gallium3D.

This is a squashed commit of i965 branch on
ssh://people.freedesktop.org/~zack/mesa
Because of the porting the branch often didn't compile so
squashing it makes more sense.
The port is still far from complete.

16 years agonv40: insanely stupid bug..
Ben Skeggs [Tue, 11 Dec 2007 08:06:00 +0000 (19:06 +1100)]
nv40: insanely stupid bug..

16 years agonv40: allow reading from fragprog result regs
Ben Skeggs [Tue, 11 Dec 2007 05:02:14 +0000 (16:02 +1100)]
nv40: allow reading from fragprog result regs

16 years agonv40: depth textures
Ben Skeggs [Tue, 11 Dec 2007 03:53:37 +0000 (14:53 +1100)]
nv40: depth textures

16 years agonv40: some forgotten adaptions
Ben Skeggs [Tue, 11 Dec 2007 03:08:42 +0000 (14:08 +1100)]
nv40: some forgotten adaptions

16 years agoAdd surface storage allocation function to winsys interface.
José Fonseca [Tue, 11 Dec 2007 01:14:38 +0000 (01:14 +0000)]
Add surface storage allocation function to winsys interface.