mesa.git
16 years agonv40: rework fragment texture state
Ben Skeggs [Fri, 22 Feb 2008 02:32:51 +0000 (13:32 +1100)]
nv40: rework fragment texture state

16 years agonouveau: fix build
Ben Skeggs [Fri, 22 Feb 2008 01:36:48 +0000 (12:36 +1100)]
nouveau: fix build

16 years agoMerge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
Ben Skeggs [Fri, 22 Feb 2008 01:25:15 +0000 (12:25 +1100)]
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1

Conflicts:

src/gallium/drivers/Makefile

16 years agogallium: new draw stage for polygon stipple.
Brian [Thu, 21 Feb 2008 23:56:32 +0000 (16:56 -0700)]
gallium: new draw stage for polygon stipple.

For hardware without native polygon stipple.  Create a 32x32 alpha texture
that encodes the stipple pattern.  Modify the user's fragment program to
sample the texture (with gl_FragCoord) and kill the fragment according to
the texel value.
Temporarily enabled in softpipe driver, replacing the sp_quad_stipple.c step.

16 years agogallium: new AA point drawing stage
Brian [Thu, 21 Feb 2008 23:18:05 +0000 (16:18 -0700)]
gallium: new AA point drawing stage

AA points are drawn by converting the point to a quad, then modifying the
user's fragment shader to compute a coverage value.  The final fragment
color's alpha is modulated by the coverage value.  Fragments outside the
point's radius are killed.

16 years agogallium: fill in some blend/rasterizer template fields to make sure they're all valid...
Brian [Thu, 21 Feb 2008 19:32:38 +0000 (12:32 -0700)]
gallium: fill in some blend/rasterizer template fields to make sure they're all valid, even if not relevant

16 years agogallium: comments, white-space clean-up
Brian [Thu, 21 Feb 2008 15:37:49 +0000 (08:37 -0700)]
gallium: comments, white-space clean-up

16 years ago[PATCH] softpipe: unbreak sp_setup_pos_vector on non-x86 systems
Keith Whitwell [Thu, 21 Feb 2008 19:07:31 +0000 (19:07 +0000)]
[PATCH] softpipe: unbreak sp_setup_pos_vector on non-x86 systems

16 years ago[PATCH] gallium: include p_compiler.h for boolean defn
Keith Whitwell [Thu, 21 Feb 2008 10:07:58 +0000 (10:07 +0000)]
[PATCH] gallium: include p_compiler.h for boolean defn

16 years agodraw: vertex cache rework
Keith Whitwell [Fri, 15 Feb 2008 18:56:41 +0000 (18:56 +0000)]
draw: vertex cache rework

Take a baby step to straightening out vertex paths.

16 years agotgsi: print debug messages on failure to codegenerate
Keith Whitwell [Fri, 15 Feb 2008 18:54:00 +0000 (18:54 +0000)]
tgsi: print debug messages on failure to codegenerate

16 years agoCell: Remove erroneous ALIGN16_ATTRIB attributes
Ian Romanick [Thu, 21 Feb 2008 18:32:02 +0000 (10:32 -0800)]
Cell: Remove erroneous ALIGN16_ATTRIB attributes

If a structure is marked as being aligned the SPE compiler performs
extra optimizations (sadly, only -O2 is used) when reading the
structure.  Since most of the structures sent in batch buffers are
only 8-byte aligned, this resulted in mysterous bugs with -O2.

16 years agoCell: Add spu_dcache.c to Makefile.
Ian Romanick [Thu, 21 Feb 2008 18:24:29 +0000 (10:24 -0800)]
Cell: Add spu_dcache.c to Makefile.

This was erroneously missing in previous commits.

16 years agoCell: Initial scalar implementation of spu_dcache_mark_dirty
Ian Romanick [Thu, 21 Feb 2008 17:03:29 +0000 (09:03 -0800)]
Cell: Initial scalar implementation of spu_dcache_mark_dirty

16 years agoCell: Fix off-by-one error in spu_dcache_fetch_unaligned
Ian Romanick [Wed, 20 Feb 2008 22:45:08 +0000 (14:45 -0800)]
Cell: Fix off-by-one error in spu_dcache_fetch_unaligned

An off-by-one error caused an extra qword to be fetched under certain
alignment / size combinations.

16 years agoCell: Initial pass at unified data cache
Ian Romanick [Wed, 20 Feb 2008 22:32:25 +0000 (14:32 -0800)]
Cell: Initial pass at unified data cache

16 years agogallium: include p_inlines.h
Brian [Thu, 21 Feb 2008 01:00:03 +0000 (18:00 -0700)]
gallium: include p_inlines.h

16 years agogallium: s/pipe_reference_texture/pipe_texture_reference/
Brian [Thu, 21 Feb 2008 00:57:40 +0000 (17:57 -0700)]
gallium: s/pipe_reference_texture/pipe_texture_reference/

16 years agogallium: re-fix some msvc warnings
Brian [Wed, 20 Feb 2008 22:32:41 +0000 (15:32 -0700)]
gallium: re-fix some msvc warnings

16 years agocell: use pipe_texture_reference()
Brian [Wed, 20 Feb 2008 22:13:33 +0000 (15:13 -0700)]
cell: use pipe_texture_reference()

16 years agogallium: replace some ordinary assignments with pipe_reference_texture()
Brian [Wed, 20 Feb 2008 22:09:27 +0000 (15:09 -0700)]
gallium: replace some ordinary assignments with pipe_reference_texture()

This fixes at least one instance of dereferencing an invalid texture pointer.

16 years agogallium: fix bad ptr comparison
Brian [Wed, 20 Feb 2008 21:44:15 +0000 (14:44 -0700)]
gallium: fix bad ptr comparison

16 years agocell: rename cell_state_fs.c -> cell_state_shader.c
Brian [Wed, 20 Feb 2008 21:32:43 +0000 (14:32 -0700)]
cell: rename cell_state_fs.c -> cell_state_shader.c

16 years agocell: init shader-related functions in cell_init_shader_functions()
Brian [Wed, 20 Feb 2008 21:30:50 +0000 (14:30 -0700)]
cell: init shader-related functions in cell_init_shader_functions()

16 years agocell: #includes to silence warnings
Brian [Wed, 20 Feb 2008 21:27:08 +0000 (14:27 -0700)]
cell: #includes to silence warnings

16 years agocell: plug in cell_set_sampler_texture
Brian [Wed, 20 Feb 2008 21:25:07 +0000 (14:25 -0700)]
cell: plug in cell_set_sampler_texture

16 years agoRemove obsolete files replaced by cell_pipe_state.c
Brian [Wed, 20 Feb 2008 21:24:46 +0000 (14:24 -0700)]
Remove obsolete files replaced by cell_pipe_state.c

16 years agocell: put most simple state-setter functions in new cell_pipe_state.c file
Brian [Wed, 20 Feb 2008 21:21:45 +0000 (14:21 -0700)]
cell: put most simple state-setter functions in new cell_pipe_state.c file

Also, re-org of texture/surface functions.

16 years agogallium: re-org of i965 texture/surface code, functions
Brian [Wed, 20 Feb 2008 21:04:05 +0000 (14:04 -0700)]
gallium: re-org of i965 texture/surface code, functions

16 years agogallium: minor re-org of 915 surface/texture code
Brian [Wed, 20 Feb 2008 21:00:42 +0000 (14:00 -0700)]
gallium: minor re-org of 915 surface/texture code

16 years agogallium: new pipe->texture_update() function
Brian [Wed, 20 Feb 2008 20:24:52 +0000 (13:24 -0700)]
gallium: new pipe->texture_update() function

Called whenever texture data is changed (glTexImage, glTexSubImage,
glCopyTexSubImage, etc).

16 years agogallium: mark texture object data dirty in do_copy_texsubimage()
Brian [Wed, 20 Feb 2008 20:12:36 +0000 (13:12 -0700)]
gallium: mark texture object data dirty in do_copy_texsubimage()

16 years agogallium: re-enable GenerateMipmap calls
Brian [Wed, 20 Feb 2008 20:11:51 +0000 (13:11 -0700)]
gallium: re-enable GenerateMipmap calls

16 years agoTest calling glTexSubImage2D mid-way through a frame.
Brian [Wed, 20 Feb 2008 18:58:33 +0000 (11:58 -0700)]
Test calling glTexSubImage2D mid-way through a frame.

16 years agogallium: state tracker didn't always notify drivers of texobj data changes
Brian [Wed, 20 Feb 2008 18:20:25 +0000 (11:20 -0700)]
gallium: state tracker didn't always notify drivers of texobj data changes

Calling glTexSubImage() or glTexImage() to replace texture data didn't
reliably cause pipe->set_sampler_texture() to get called so drivers didn't
always get notified of new texture data.
The st_texture_object->pt pointer doesn't always indicate changed data so
added a dirtyData field.

16 years agogallium: use pipe_texture_reference() in sp_tile_cache_set_texture()
Brian [Wed, 20 Feb 2008 18:15:59 +0000 (11:15 -0700)]
gallium: use pipe_texture_reference() in sp_tile_cache_set_texture()

16 years agonv40: fb state
Ben Skeggs [Wed, 20 Feb 2008 06:22:40 +0000 (17:22 +1100)]
nv40: fb state

16 years agonv40: almost there..
Ben Skeggs [Wed, 20 Feb 2008 06:14:41 +0000 (17:14 +1100)]
nv40: almost there..

16 years agonv40: keep track of generated context state vs current channel state
Ben Skeggs [Wed, 20 Feb 2008 05:21:28 +0000 (16:21 +1100)]
nv40: keep track of generated context state vs current channel state

16 years agogallium: general clean-up of xlib winsys Makefile
Brian [Tue, 19 Feb 2008 23:51:19 +0000 (16:51 -0700)]
gallium: general clean-up of xlib winsys Makefile

16 years agogallium: initialize the killmask register to zero before running shader
Brian [Tue, 19 Feb 2008 23:28:25 +0000 (16:28 -0700)]
gallium: initialize the killmask register to zero before running shader

This fixes mysterious missing fragments when running with SSE.

16 years agogallium: add some casts to prevent likely msvc warnings
Brian [Tue, 19 Feb 2008 21:58:23 +0000 (14:58 -0700)]
gallium: add some casts to prevent likely msvc warnings

16 years agogallium: don't hard-code attrib slot=0 in setup_fragcoord_coeff()
Brian [Tue, 19 Feb 2008 21:56:01 +0000 (14:56 -0700)]
gallium: don't hard-code attrib slot=0 in setup_fragcoord_coeff()

16 years agogallium: implement correct sampling for RECT targets / unnormalized texcoords
Brian [Tue, 19 Feb 2008 21:55:18 +0000 (14:55 -0700)]
gallium: implement correct sampling for RECT targets / unnormalized texcoords

16 years agogallium: updated cell build
Brian [Tue, 19 Feb 2008 18:14:54 +0000 (11:14 -0700)]
gallium: updated cell build

Building on Ian's Cell build fix.
Put libcell.a in the gallium/drivers/cell/ directory.
General Makefile clean-up, simplification, updated comments.

16 years agoCell: Add missing "gallium/winsys" to SRC_DIRS to fix build.
Ian Romanick [Tue, 19 Feb 2008 17:43:47 +0000 (09:43 -0800)]
Cell: Add missing "gallium/winsys" to SRC_DIRS to fix build.

16 years agoCell: emit vertex shaders and uniforms more intelligently
Ian Romanick [Tue, 19 Feb 2008 02:55:39 +0000 (18:55 -0800)]
Cell: emit vertex shaders and uniforms more intelligently

16 years agoCell: trivial clean-ups
Ian Romanick [Tue, 19 Feb 2008 02:51:57 +0000 (18:51 -0800)]
Cell: trivial clean-ups

16 years agoFix windows build.
José Fonseca [Tue, 19 Feb 2008 09:57:25 +0000 (18:57 +0900)]
Fix windows build.

16 years agoPortability fixes.
José Fonseca [Tue, 19 Feb 2008 09:56:55 +0000 (18:56 +0900)]
Portability fixes.

Eliminate C99/C++ constructs.

(We should actually disable gcc C99 syntax options if we are serious about
portability.)

16 years agoWindows (DDK) compilation support.
José Fonseca [Tue, 19 Feb 2008 09:53:16 +0000 (18:53 +0900)]
Windows (DDK) compilation support.

It also works when cross compiling with Wine.

16 years agoRemove src/mesa and src/mesa/main from gallium source include paths.
José Fonseca [Tue, 19 Feb 2008 06:07:53 +0000 (15:07 +0900)]
Remove src/mesa and src/mesa/main from gallium source include paths.

16 years agoBring in ppc spe rtasm into gallium's rtasm module.
José Fonseca [Tue, 19 Feb 2008 05:00:16 +0000 (14:00 +0900)]
Bring in ppc spe rtasm into gallium's rtasm module.

Moving files since these are not being used outside gallium.

16 years agoAdd run-time cpu capabilities detection stubs.
José Fonseca [Tue, 19 Feb 2008 04:41:38 +0000 (13:41 +0900)]
Add run-time cpu capabilities detection stubs.

16 years agoSimplify makefile boilerplate code.
José Fonseca [Tue, 19 Feb 2008 04:27:13 +0000 (13:27 +0900)]
Simplify makefile boilerplate code.

Don't define ASM_SOURCES variable globally -- reserve that variable to be defined
locally by makefiles, together with C_SOURCES and CPP_SOURCES.

16 years agoUse gallium's rtasm module.
José Fonseca [Tue, 19 Feb 2008 03:52:28 +0000 (12:52 +0900)]
Use gallium's rtasm module.

16 years agoMove mm.c code into util module.
José Fonseca [Tue, 19 Feb 2008 03:24:42 +0000 (12:24 +0900)]
Move mm.c code into util module.

Using the u_ prefix to distingish the c source files that support gallium
interfaces and those that have really no relation with gallium itself.

16 years agoAdd copyright headers to all rtasm source files.
José Fonseca [Tue, 19 Feb 2008 03:05:32 +0000 (12:05 +0900)]
Add copyright headers to all rtasm source files.

16 years agoRename rtasm files.
José Fonseca [Tue, 19 Feb 2008 03:00:48 +0000 (12:00 +0900)]
Rename rtasm files.

16 years agoBring rtasm from mesa to gallium.
José Fonseca [Tue, 19 Feb 2008 02:49:48 +0000 (11:49 +0900)]
Bring rtasm from mesa to gallium.

16 years agoInitial scons support to build gallivm.
José Fonseca [Tue, 19 Feb 2008 01:50:39 +0000 (10:50 +0900)]
Initial scons support to build gallivm.

Not yet complete.

16 years agoMore llvm -> gallivm.
José Fonseca [Mon, 18 Feb 2008 14:35:19 +0000 (14:35 +0000)]
More llvm -> gallivm.

Forgot this one on the last commit.

16 years agogallium: move draw_set_viewport_state() call, plus code clean-up, remove obsolete...
Brian [Tue, 19 Feb 2008 01:39:55 +0000 (18:39 -0700)]
gallium: move draw_set_viewport_state() call, plus code clean-up, remove obsolete comments

16 years agogallium: call draw_flush() for scissor/stipple state changes
Brian [Tue, 19 Feb 2008 01:36:20 +0000 (18:36 -0700)]
gallium: call draw_flush() for scissor/stipple state changes

16 years agogallium: remove the prototype/unused wide_line_aa() function
Brian [Mon, 18 Feb 2008 23:50:07 +0000 (16:50 -0700)]
gallium: remove the prototype/unused wide_line_aa() function

16 years agogallium: antialiased line drawing
Brian [Mon, 18 Feb 2008 23:19:05 +0000 (16:19 -0700)]
gallium: antialiased line drawing

New draw/prim stage: draw_aaline.  When installed, lines are replaced by
textured quads to do antialiasing.  The current user-defined fragment shader
is modified to do a texture fetch and modulate fragment alpha.

16 years agoUpdate for llvm -> gallivm rename.
José Fonseca [Mon, 18 Feb 2008 12:33:34 +0000 (12:33 +0000)]
Update for llvm -> gallivm rename.

16 years agoRename llvm -> gallivm.
José Fonseca [Mon, 18 Feb 2008 11:05:06 +0000 (20:05 +0900)]
Rename llvm -> gallivm.

Following the directory == library name policy simplifies the build system.

16 years agoStandardize on using the pipe/ include prefix.
José Fonseca [Mon, 18 Feb 2008 11:02:42 +0000 (20:02 +0900)]
Standardize on using the pipe/ include prefix.

16 years agoUpdate scons build for new code layout.
José Fonseca [Mon, 18 Feb 2008 10:52:44 +0000 (10:52 +0000)]
Update scons build for new code layout.

16 years agoAdd an "all" target alias for "default" target.
José Fonseca [Mon, 18 Feb 2008 07:47:35 +0000 (16:47 +0900)]
Add an "all" target alias for "default" target.

"all" is more commonly expected, expecially by many IDEs.

16 years agonouveau: cleanups + fixes
Ben Skeggs [Mon, 18 Feb 2008 07:23:12 +0000 (18:23 +1100)]
nouveau: cleanups + fixes

16 years agoBuild glx/x11.
José Fonseca [Mon, 18 Feb 2008 06:45:29 +0000 (15:45 +0900)]
Build glx/x11.

16 years agoCleanup depend files.
José Fonseca [Mon, 18 Feb 2008 06:37:52 +0000 (15:37 +0900)]
Cleanup depend files.

16 years agonv40: and vertprog..
Ben Skeggs [Mon, 18 Feb 2008 06:36:24 +0000 (17:36 +1100)]
nv40: and vertprog..

16 years agonv40: get fragprog onto new state mechanism
Ben Skeggs [Mon, 18 Feb 2008 06:07:59 +0000 (17:07 +1100)]
nv40: get fragprog onto new state mechanism

16 years agoActually use GALLIUM_DRIVER_DIRS.
José Fonseca [Mon, 18 Feb 2008 06:07:17 +0000 (15:07 +0900)]
Actually use GALLIUM_DRIVER_DIRS.

16 years agonv40: move some things around
Ben Skeggs [Mon, 18 Feb 2008 05:38:27 +0000 (16:38 +1100)]
nv40: move some things around

16 years agonv40: until gallium is fixed we'll need a fallback for user clip planes
Ben Skeggs [Mon, 18 Feb 2008 05:26:33 +0000 (16:26 +1100)]
nv40: until gallium is fixed we'll need a fallback for user clip planes

16 years agoCode reorganization: split gallium and mesa makefiles.
José Fonseca [Mon, 18 Feb 2008 05:25:04 +0000 (14:25 +0900)]
Code reorganization: split gallium and mesa makefiles.

In other words, don't build src/gallium source code from within src/mesa/Makefile.

Also, allow to customize which gallium auxiliary dirs, driver driver, winsys
dirs get built from the config/* files.

16 years agonouveau: header update
Ben Skeggs [Mon, 18 Feb 2008 04:31:55 +0000 (15:31 +1100)]
nouveau: header update

16 years agonv40: obey polygon offset state
Ben Skeggs [Mon, 18 Feb 2008 04:17:39 +0000 (15:17 +1100)]
nv40: obey polygon offset state

Almost sure this isn't entirely correct.  However, I'm not sure what
gallium expects yet, and this fixes some bugs, so it'll do for now.

16 years agonv40: similar changes to polygon stipple as were done for scissor
Ben Skeggs [Mon, 18 Feb 2008 03:12:58 +0000 (14:12 +1100)]
nv40: similar changes to polygon stipple as were done for scissor

16 years agoUpdate doxygen configuration file for new tree layout.
José Fonseca [Mon, 18 Feb 2008 03:07:24 +0000 (12:07 +0900)]
Update doxygen configuration file for new tree layout.

16 years agonv40: ensure scissor gets disabled where necessary
Ben Skeggs [Sat, 16 Feb 2008 10:27:53 +0000 (21:27 +1100)]
nv40: ensure scissor gets disabled where necessary

Fixes progs/demos/lodbias.

Makes a complete mess of things, but now there's a motivation to finish
this off :)

16 years agoMerge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
Ben Skeggs [Mon, 18 Feb 2008 01:45:56 +0000 (12:45 +1100)]
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1

16 years agofix the build
Zack Rusin [Sun, 17 Feb 2008 14:42:26 +0000 (09:42 -0500)]
fix the build

16 years agogallium: add missing mip level clamp
Brian [Sat, 16 Feb 2008 20:55:47 +0000 (13:55 -0700)]
gallium: add missing mip level clamp

16 years agogallium: tweak texture filter min/mag thresholds
Brian [Sat, 16 Feb 2008 20:50:31 +0000 (13:50 -0700)]
gallium: tweak texture filter min/mag thresholds

16 years agogallium: implement min vs. mag filter determination for non-mipmapped textures
Brian [Sat, 16 Feb 2008 17:05:01 +0000 (10:05 -0700)]
gallium: implement min vs. mag filter determination for non-mipmapped textures

Fixes tests/minmag.c

16 years agoAdded minmag.c test
Brian [Sat, 16 Feb 2008 16:38:34 +0000 (09:38 -0700)]
Added minmag.c test

Test that different minification and magnification filters are chosen for the
non-mipmapped texture case.

16 years agonouveau: fix potential userbuf crash.
Ben Skeggs [Sat, 16 Feb 2008 06:51:44 +0000 (17:51 +1100)]
nouveau: fix potential userbuf crash.

16 years agonouveau: match gallium code reorginisation.
Ben Skeggs [Sat, 16 Feb 2008 06:23:12 +0000 (17:23 +1100)]
nouveau: match gallium code reorginisation.

That was... fun..

16 years agoMerge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1
Ben Skeggs [Sat, 16 Feb 2008 05:30:22 +0000 (16:30 +1100)]
Merge branch 'upstream-gallium-0.1' into nouveau-gallium-0.1

Conflicts:

configs/linux-dri
src/mesa/pipe/Makefile

16 years agoMerge branch 'nouveau-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Sat, 16 Feb 2008 05:20:40 +0000 (16:20 +1100)]
Merge branch 'nouveau-gallium-0.1' into darktama-gallium-0.1

Conflicts:

src/mesa/pipe/nouveau/nouveau_stateobj.h
src/mesa/pipe/nv40/nv40_context.c
src/mesa/pipe/nv40/nv40_miptree.c

16 years agonv30: fixes.
Stephane Marchesin [Sat, 16 Feb 2008 02:04:28 +0000 (03:04 +0100)]
nv30: fixes.

16 years agonv30: fixes.
Stephane Marchesin [Sat, 16 Feb 2008 01:54:11 +0000 (02:54 +0100)]
nv30: fixes.

16 years agoCell: Enable code gen for SPE attribute fetch
Ian Romanick [Fri, 15 Feb 2008 19:03:54 +0000 (11:03 -0800)]
Cell: Enable code gen for SPE attribute fetch

Doubles are still unsupported.

16 years agoCell: Add missing back-slash in linux-cell config file
Ian Romanick [Fri, 15 Feb 2008 18:36:48 +0000 (10:36 -0800)]
Cell: Add missing back-slash in linux-cell config file

16 years agoCell: Add INCLUDE_DIRS to SPU_CFLAGS to fix build.
Ian Romanick [Fri, 15 Feb 2008 18:33:12 +0000 (10:33 -0800)]
Cell: Add INCLUDE_DIRS to SPU_CFLAGS to fix build.