mesa.git
16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Sat, 9 Feb 2008 05:15:14 +0000 (16:15 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agonv40: delay all state emit until before draw
Ben Skeggs [Sat, 9 Feb 2008 03:08:54 +0000 (14:08 +1100)]
nv40: delay all state emit until before draw

16 years agogallium: include st_cb_drawpixels.h
Brian [Fri, 8 Feb 2008 21:56:38 +0000 (14:56 -0700)]
gallium: include st_cb_drawpixels.h

16 years agofix comment typos
Brian [Fri, 8 Feb 2008 21:55:33 +0000 (14:55 -0700)]
fix comment typos

16 years agogallium: initial implemenation of auto mipmap generation in state tracker
Brian [Fri, 8 Feb 2008 21:54:18 +0000 (14:54 -0700)]
gallium: initial implemenation of auto mipmap generation in state tracker

Use hardware rendering to compute/render mipmap levels.
The fallback path (which will be used for non-renderable texture formats)
isn't working yet.

16 years agogallium: added inClipCoords param to st_draw_vertices() to indicate coord system...
Brian [Fri, 8 Feb 2008 21:51:32 +0000 (14:51 -0700)]
gallium: added inClipCoords param to st_draw_vertices() to indicate coord system of vertices

Also, export st_make_passthrough_vertex_shader() from st_cb_drawpixels.c

16 years agogallium: added draw_flush() call in softpipe_bind_sampler_state()
Brian [Fri, 8 Feb 2008 21:46:47 +0000 (14:46 -0700)]
gallium: added draw_flush() call in softpipe_bind_sampler_state()

16 years agoRemove unused texunit parameter to ctx->Driver.GenerateMipmap()
Brian [Fri, 8 Feb 2008 21:45:58 +0000 (14:45 -0700)]
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()

16 years agointel_winsys: remove leftover code
Jerome Glisse [Fri, 8 Feb 2008 17:47:25 +0000 (18:47 +0100)]
intel_winsys: remove leftover code

16 years agofailover: several fixes to failover pipe module
Jerome Glisse [Fri, 8 Feb 2008 17:25:49 +0000 (18:25 +0100)]
failover: several fixes to failover pipe module

16 years agotgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.
Michel Dänzer [Thu, 7 Feb 2008 19:44:42 +0000 (19:44 +0000)]
tgsi: Fall back to interpreter instead of assert(0) on unimplemented SSE code.

16 years agopipebuffer: Fix reversed assertion.
Michel Dänzer [Thu, 7 Feb 2008 19:43:34 +0000 (19:43 +0000)]
pipebuffer: Fix reversed assertion.

16 years agogallium: Conditionally use posix libraries/includes.
José Fonseca [Thu, 7 Feb 2008 10:59:17 +0000 (19:59 +0900)]
gallium: Conditionally use posix libraries/includes.

16 years agoCell: silence unused var warnings
Brian [Wed, 6 Feb 2008 16:48:56 +0000 (09:48 -0700)]
Cell: silence unused var warnings

16 years agogallium: #include p_debug.h since we use assert
Brian [Wed, 6 Feb 2008 16:48:37 +0000 (09:48 -0700)]
gallium: #include p_debug.h since we use assert

16 years agoCell: use mem_dup()
Brian [Wed, 6 Feb 2008 16:35:33 +0000 (09:35 -0700)]
Cell: use mem_dup()

16 years agogallium: use mem_dup()
Brian [Wed, 6 Feb 2008 16:29:00 +0000 (09:29 -0700)]
gallium: use mem_dup()

16 years agogallium: added mem_dup()
Brian [Wed, 6 Feb 2008 16:28:20 +0000 (09:28 -0700)]
gallium: added mem_dup()

16 years agogallium: change pipe->texture_create() to operate like the CSO functions
Brian [Wed, 6 Feb 2008 16:24:30 +0000 (09:24 -0700)]
gallium: change pipe->texture_create() to operate like the CSO functions

Now, pass in a template object and return a new object.

16 years agoclean-ups in guess_and_alloc_texture()
Brian [Wed, 6 Feb 2008 15:44:19 +0000 (08:44 -0700)]
clean-ups in guess_and_alloc_texture()

16 years agoplug in ctx->Driver.GenerateMipmap function
Brian [Wed, 6 Feb 2008 01:15:39 +0000 (18:15 -0700)]
plug in ctx->Driver.GenerateMipmap function

16 years agoAdded ctx->Driver.GenerateMipmap() driver hook
Brian [Wed, 6 Feb 2008 01:15:03 +0000 (18:15 -0700)]
Added ctx->Driver.GenerateMipmap() driver hook

16 years agoclean-ups
Brian [Wed, 6 Feb 2008 01:13:28 +0000 (18:13 -0700)]
clean-ups

16 years agoadded comment
Brian [Wed, 6 Feb 2008 01:01:18 +0000 (18:01 -0700)]
added comment

16 years agocomments, clean-ups, consts
Brian [Wed, 6 Feb 2008 00:55:16 +0000 (17:55 -0700)]
comments, clean-ups, consts

16 years agoclean-up
Brian [Wed, 6 Feb 2008 00:46:31 +0000 (17:46 -0700)]
clean-up

16 years agogallium: add bitmap/drawpixels texcoord bias support
Brian [Tue, 5 Feb 2008 23:32:15 +0000 (16:32 -0700)]
gallium: add bitmap/drawpixels texcoord bias support

The state tracker will call pipe->get_paramf(PIPE_CAP_BITMAP_TEXCOORD_BIAS)
to get a bias factor for adjusting the texcoords used in bitmap/drawpixels.
This allows us to compensate for small differences in rasterization from
one device to another.

16 years agogallium: Bring latest fixes.
José Fonseca [Wed, 6 Feb 2008 16:07:49 +0000 (01:07 +0900)]
gallium: Bring latest fixes.

16 years agogallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions.
José Fonseca [Wed, 6 Feb 2008 05:37:49 +0000 (14:37 +0900)]
gallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions.

16 years agogallium: Add forgotten return type.
José Fonseca [Wed, 6 Feb 2008 05:37:24 +0000 (14:37 +0900)]
gallium: Add forgotten return type.

16 years agogallium: Update scons instructions. Propagate user environment.
José Fonseca [Wed, 6 Feb 2008 05:36:50 +0000 (14:36 +0900)]
gallium: Update scons instructions. Propagate user environment.

16 years agogallium: Cross-platform debugging helpers.
José Fonseca [Wed, 6 Feb 2008 04:27:49 +0000 (13:27 +0900)]
gallium: Cross-platform debugging helpers.

16 years agogallium: Portability guidelines.
José Fonseca [Mon, 4 Feb 2008 08:02:08 +0000 (17:02 +0900)]
gallium: Portability guidelines.

16 years agoCell: remove accidentally added OPT_FLAGS lines
Brian [Tue, 5 Feb 2008 22:12:18 +0000 (15:12 -0700)]
Cell: remove accidentally added OPT_FLAGS lines

16 years agoCell: SIMD-ize tri_linear_coeff(), use vector float for vertex attributes in struct...
Brian [Tue, 5 Feb 2008 22:07:36 +0000 (15:07 -0700)]
Cell: SIMD-ize tri_linear_coeff(), use vector float for vertex attributes in struct vertex_header

16 years agoCell: re-enable inlined vertex buffers
Brian [Tue, 5 Feb 2008 21:23:34 +0000 (14:23 -0700)]
Cell: re-enable inlined vertex buffers

Vertex data must be on a 16-byte address/offset so SIMD operations will work
properly in the SPU code.

16 years agoCell: remove dummy fields, update/add some comments
Brian [Tue, 5 Feb 2008 21:21:48 +0000 (14:21 -0700)]
Cell: remove dummy fields, update/add some comments

16 years agoCell: added cell_batch_alloc_aligned()
Brian [Tue, 5 Feb 2008 21:21:01 +0000 (14:21 -0700)]
Cell: added cell_batch_alloc_aligned()

16 years agoUse _transpose_matrix4x4 from Cell SDK instead of my own version
Ian Romanick [Tue, 5 Feb 2008 17:43:52 +0000 (09:43 -0800)]
Use _transpose_matrix4x4 from Cell SDK instead of my own version

16 years agoAdd some debug messages
Ian Romanick [Tue, 5 Feb 2008 00:03:55 +0000 (16:03 -0800)]
Add some debug messages

16 years agoMore semi-trivial vectorization in the shader VM
Ian Romanick [Sat, 2 Feb 2008 01:14:09 +0000 (17:14 -0800)]
More semi-trivial vectorization in the shader VM

16 years agoVectorize vertex puller
Ian Romanick [Sat, 2 Feb 2008 01:12:20 +0000 (17:12 -0800)]
Vectorize vertex puller

16 years agoVectorize all micro ops
Ian Romanick [Fri, 1 Feb 2008 22:58:38 +0000 (14:58 -0800)]
Vectorize all micro ops

Fold single instruction micro ops inline.  Remove unused micro ops.

16 years agonv40: cleanup state handling a bit
Ben Skeggs [Tue, 5 Feb 2008 13:26:49 +0000 (00:26 +1100)]
nv40: cleanup state handling a bit

16 years agogallium: Use align_free to free aligned memory.
Michal Krol [Tue, 5 Feb 2008 14:50:56 +0000 (07:50 -0700)]
gallium: Use align_free to free aligned memory.

16 years agoCell: fix some alignment issues by aligning commands to 8-byte boundaries
Brian [Tue, 5 Feb 2008 01:05:37 +0000 (18:05 -0700)]
Cell: fix some alignment issues by aligning commands to 8-byte boundaries

Contributed by Ian Romanick.
Also, temporarily disable inlined vertex buffers.  They need to be 16-byte
aligned...

16 years agoCell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
Brian [Tue, 5 Feb 2008 01:03:05 +0000 (18:03 -0700)]
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0

16 years agoCell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0
Brian [Tue, 5 Feb 2008 01:02:21 +0000 (18:02 -0700)]
Cell: don't use VEC_LITERAL macro, doesn't work w/ SDK 3.0

16 years agoCell: move float4 typedef (temporary datatype)
Brian [Mon, 4 Feb 2008 23:48:36 +0000 (16:48 -0700)]
Cell: move float4 typedef (temporary datatype)

16 years agoCell: fix small sampling error in sample_texture_bilinear()
Brian [Mon, 4 Feb 2008 23:48:00 +0000 (16:48 -0700)]
Cell: fix small sampling error in sample_texture_bilinear()

16 years agoCell: texture sampler functions always return vector float now
Brian [Mon, 4 Feb 2008 23:06:51 +0000 (16:06 -0700)]
Cell: texture sampler functions always return vector float now

Texture colors look the same now, regardless of X display/pixel format

16 years agoCell: added spu_unpack_A8R8G8B8()
Brian [Mon, 4 Feb 2008 23:05:13 +0000 (16:05 -0700)]
Cell: added spu_unpack_A8R8G8B8()

16 years agoCell: fix typo
Brian [Mon, 4 Feb 2008 23:04:50 +0000 (16:04 -0700)]
Cell: fix typo

16 years agoCell: some basic blending code
Brian [Mon, 4 Feb 2008 22:17:50 +0000 (15:17 -0700)]
Cell: some basic blending code

16 years agoCell: replace float 4 with vector float in eval_coeff()
Brian [Mon, 4 Feb 2008 22:10:35 +0000 (15:10 -0700)]
Cell: replace float 4 with vector float in eval_coeff()

16 years agoCell: emit blend state to SPUs
Brian [Mon, 4 Feb 2008 22:06:10 +0000 (15:06 -0700)]
Cell: emit blend state to SPUs

16 years agoCell: choose bilinear vs. nearest filtering according to sampler state
Brian [Mon, 4 Feb 2008 20:23:07 +0000 (13:23 -0700)]
Cell: choose bilinear vs. nearest filtering according to sampler state

16 years agoCell: improved bilinear filtering
Brian [Mon, 4 Feb 2008 20:16:10 +0000 (13:16 -0700)]
Cell: improved bilinear filtering

avoid calling get_tex_tile() if all texels are in same tile

16 years agoCell: implement basic bilinear texture sampler
Brian [Mon, 4 Feb 2008 19:50:42 +0000 (12:50 -0700)]
Cell: implement basic bilinear texture sampler

16 years agoCell: added spu_unpack_color(), spu_pack_R8G8B8A8()
Brian [Mon, 4 Feb 2008 19:50:16 +0000 (12:50 -0700)]
Cell: added spu_unpack_color(), spu_pack_R8G8B8A8()

16 years agoCell: SIMD-ize more of texture sampling
Brian [Mon, 4 Feb 2008 18:02:47 +0000 (11:02 -0700)]
Cell: SIMD-ize more of texture sampling

16 years agoCell: checkpoint: start to SIMD-ize texture sampling
Brian [Mon, 4 Feb 2008 16:54:21 +0000 (09:54 -0700)]
Cell: checkpoint: start to SIMD-ize texture sampling

16 years agoCell: move tile clear code to flush_spans()
Brian [Mon, 4 Feb 2008 15:53:18 +0000 (08:53 -0700)]
Cell: move tile clear code to flush_spans()

16 years agoCell: clamp txmax, tymax in tile_bounding_box()
Brian [Mon, 4 Feb 2008 15:46:44 +0000 (08:46 -0700)]
Cell: clamp txmax, tymax in tile_bounding_box()

Also, added some debug printfs

16 years agoCell: insert some draw_flush() calls
Brian [Mon, 4 Feb 2008 15:45:33 +0000 (08:45 -0700)]
Cell: insert some draw_flush() calls

16 years agonv40: the 0x4497 version of curie doesn't support index buffers.
Ben Skeggs [Sun, 3 Feb 2008 14:37:07 +0000 (01:37 +1100)]
nv40: the 0x4497 version of curie doesn't support index buffers.

16 years agonouveau: avoid relocations where possible.
Ben Skeggs [Sun, 3 Feb 2008 01:08:31 +0000 (12:08 +1100)]
nouveau: avoid relocations where possible.

Potential relocations are emitted as NOPs where they're needed.  In the
event a buffer moves, the pushbuf code will emit the relevant state
changes into the NOPs.

Just a start, more work is needed to get this looking how I want it to.

16 years agonouveau: implement a bo_set_status()
Ben Skeggs [Sat, 2 Feb 2008 03:21:06 +0000 (14:21 +1100)]
nouveau: implement a bo_set_status()

16 years agoCell: comment about emit_quad() mask
Brian [Fri, 1 Feb 2008 23:54:46 +0000 (16:54 -0700)]
Cell: comment about emit_quad() mask

16 years agoCell: move some tile get/clear code
Brian [Fri, 1 Feb 2008 23:42:09 +0000 (16:42 -0700)]
Cell: move some tile get/clear code

Also, we weren't marking the ztile as dirty after ztesting, fixes gears glitches.

16 years agoCell: use global color_shuffle to remove a switch stmnt
Brian [Fri, 1 Feb 2008 23:25:42 +0000 (16:25 -0700)]
Cell: use global color_shuffle to remove a switch stmnt

16 years agoCell: New color packing functions (A8R8G8B8 and B8G8R8A8)
Brian [Fri, 1 Feb 2008 22:45:02 +0000 (15:45 -0700)]
Cell: New color packing functions (A8R8G8B8 and B8G8R8A8)

16 years agoCell: rename/move global vars
Brian [Fri, 1 Feb 2008 22:33:53 +0000 (15:33 -0700)]
Cell: rename/move global vars

Put tile-related globals into spu_global struct.
Rename c/ztile fields to be more consistant.

16 years agoCell: deprecate some use of struct cell_command - it should go away completely
Brian [Fri, 1 Feb 2008 22:24:00 +0000 (15:24 -0700)]
Cell: deprecate some use of struct cell_command - it should go away completely

Also, remove ALIGN16_ATTRIB from structs that no longer need it.

16 years agoCell: remove commands from top-level while loop which should only appear in batch...
Brian [Fri, 1 Feb 2008 22:20:07 +0000 (15:20 -0700)]
Cell: remove commands from top-level while loop which should only appear in batch buffers

16 years agoCell: move ztest before color interp/packing
Brian [Fri, 1 Feb 2008 21:02:22 +0000 (14:02 -0700)]
Cell: move ztest before color interp/packing

16 years agoCell: rename fields of the tile_t union
Brian [Fri, 1 Feb 2008 20:49:51 +0000 (13:49 -0700)]
Cell: rename fields of the tile_t union

16 years agoCell: implement Z16 and Z32 testing with SIMD instructions.
Brian [Fri, 1 Feb 2008 20:45:58 +0000 (13:45 -0700)]
Cell: implement Z16 and Z32 testing with SIMD instructions.

16 years agoCell: store current tile status in cur_tile_status_c/z, add TILE_STATUS_GETTING
Brian [Fri, 1 Feb 2008 16:27:57 +0000 (09:27 -0700)]
Cell: store current tile status in cur_tile_status_c/z, add TILE_STATUS_GETTING

16 years agoFix using "ccache ppu-gcc" for CC and fix parallel builds
Ian Romanick [Fri, 1 Feb 2008 01:22:07 +0000 (17:22 -0800)]
Fix using "ccache ppu-gcc" for CC and fix parallel builds

CC wasn't quoted in a couple places in src/mesa/Makefile.  Also, the
OSMesa link was missing a dependency.

16 years agofix typo
Brian [Fri, 1 Feb 2008 00:05:43 +0000 (17:05 -0700)]
fix typo

16 years agogallium: fix problem in which texcoords and varying vars got mapped to the same slot
Brian [Thu, 31 Jan 2008 21:35:25 +0000 (14:35 -0700)]
gallium: fix problem in which texcoords and varying vars got mapped to the same slot

This fixes the glsl/bump.c and glsl/texdemo1.c programs

16 years agoFix problem in mapping vertex program outputs (found with "spring" game engine)
Brian [Thu, 31 Jan 2008 21:05:04 +0000 (14:05 -0700)]
Fix problem in mapping vertex program outputs (found with "spring" game engine)

If the vertex program writes to an output that's not consumed by the
fragment program, map the vp output to an unused slot.

16 years agogallium: comments about fragment Z computation
Brian [Thu, 31 Jan 2008 20:37:01 +0000 (13:37 -0700)]
gallium: comments about fragment Z computation

16 years agogallium: Fix z clear bug when TILE_CLEAR_OPTIMIZATION==0
Brian [Thu, 31 Jan 2008 20:36:00 +0000 (13:36 -0700)]
gallium: Fix z clear bug when TILE_CLEAR_OPTIMIZATION==0

16 years agogallium: fix get/put typo regression
Brian [Thu, 31 Jan 2008 20:32:29 +0000 (13:32 -0700)]
gallium: fix get/put typo regression

This came from commit f3aa4de034b0d791ce2e38e8aeb3b3abdb4e3b50 on 1/22/08.
Fixes strange Z buffer glitches seen in progs/glsl/texdemo1.c

16 years agoCell: SIMD-ize const_coeff()
Brian [Thu, 31 Jan 2008 15:21:38 +0000 (08:21 -0700)]
Cell: SIMD-ize const_coeff()

16 years agoCell: set GALLIUM_CELL_VS env var to enable SPU-based vertex transformation
Brian [Thu, 31 Jan 2008 15:12:47 +0000 (08:12 -0700)]
Cell: set GALLIUM_CELL_VS env var to enable SPU-based vertex transformation

16 years agotgsi: Use ESI instead of EBX as temp reg on non-win32
Keith Whitwell [Thu, 31 Jan 2008 11:57:15 +0000 (11:57 +0000)]
tgsi: Use ESI instead of EBX as temp reg on non-win32

16 years agogallium: Portability fixes.
José Fonseca [Thu, 31 Jan 2008 05:26:39 +0000 (14:26 +0900)]
gallium: Portability fixes.

16 years agogallium: Make the build output dir depend on the configuration.
José Fonseca [Thu, 31 Jan 2008 05:21:49 +0000 (14:21 +0900)]
gallium: Make the build output dir depend on the configuration.

The build output dirs mimics the old config names:

  build/linux
  build/linux-dri
  build/linux-dri-x86
  build/linux-dri-x86-debug
  ...

16 years agogallium: Add SCons as alternative build system for Gallium.
José Fonseca [Thu, 31 Jan 2008 04:14:35 +0000 (13:14 +0900)]
gallium: Add SCons as alternative build system for Gallium.

16 years agoI don't know why using uint64_t for "base" doesn't work. Ugh.
Ian Romanick [Thu, 31 Jan 2008 04:14:14 +0000 (20:14 -0800)]
I don't know why using uint64_t for "base" doesn't work.  Ugh.

16 years agoUse SPUs for vertex shader processing
Ian Romanick [Thu, 31 Jan 2008 04:12:00 +0000 (20:12 -0800)]
Use SPUs for vertex shader processing

16 years agoAdd driver_private field for drivers that hook shader_queue_flush.
Ian Romanick [Thu, 31 Jan 2008 04:10:45 +0000 (20:10 -0800)]
Add driver_private field for drivers that hook shader_queue_flush.

16 years agoNumerous small fixed to PPU-SPU vertex shader protocol
Ian Romanick [Thu, 31 Jan 2008 03:40:24 +0000 (19:40 -0800)]
Numerous small fixed to PPU-SPU vertex shader protocol

16 years agocell_array_info should not be 16-byte aligned
Ian Romanick [Thu, 31 Jan 2008 03:34:22 +0000 (19:34 -0800)]
cell_array_info should not be 16-byte aligned

Forcing cell_array_info to be 16-byte aligned makes it more difficult
to stuff that state in batch commands.

16 years agoCorrectly read / write vertex header from / to main memory
Ian Romanick [Thu, 31 Jan 2008 03:33:30 +0000 (19:33 -0800)]
Correctly read / write vertex header from / to main memory

16 years agoHandle CELL_CMD_VS_EXECUTE *only* outside batch commands.
Ian Romanick [Thu, 31 Jan 2008 03:30:15 +0000 (19:30 -0800)]
Handle CELL_CMD_VS_EXECUTE *only* outside batch commands.

16 years agoSet machine->Processor
Ian Romanick [Thu, 31 Jan 2008 03:25:47 +0000 (19:25 -0800)]
Set machine->Processor

The default value is 0, which is TGSI_PROCESSOR_FRAGMENT...not correct
for a vertex shader!