mesa.git
16 years ago965: cope better with range decls for temps, immediates, etc
Keith Whitwell [Thu, 10 Jan 2008 14:57:07 +0000 (14:57 +0000)]
965: cope better with range decls for temps, immediates, etc

16 years agogallium: include p_state.h, replace PIPE_MAX_SHADER_OUTPUTS with PIPE_MAX_SHADER_INPUTS
Brian [Fri, 25 Jan 2008 15:19:45 +0000 (08:19 -0700)]
gallium: include p_state.h, replace PIPE_MAX_SHADER_OUTPUTS with PIPE_MAX_SHADER_INPUTS

16 years agoCell: propogate vertex info to SPUs, use it for attrib interpolation
Brian [Fri, 25 Jan 2008 15:17:52 +0000 (08:17 -0700)]
Cell: propogate vertex info to SPUs, use it for attrib interpolation

16 years agoCell: batch_buffer_size should be uint, not ubyte
Brian [Fri, 25 Jan 2008 15:17:04 +0000 (08:17 -0700)]
Cell: batch_buffer_size should be uint, not ubyte

16 years agoCell: new ROUNDUP16() macro
Brian [Fri, 25 Jan 2008 01:26:37 +0000 (18:26 -0700)]
Cell: new ROUNDUP16() macro

16 years agogallium: optimizations to flatshade, two-side prim stages
Brian [Fri, 25 Jan 2008 15:15:04 +0000 (08:15 -0700)]
gallium: optimizations to flatshade, two-side prim stages

16 years agogallium: added rastpos_destroy()
Brian [Thu, 24 Jan 2008 22:23:27 +0000 (15:23 -0700)]
gallium: added rastpos_destroy()

16 years agoCell: insert dummy field into cell_command_render struct to work around apparent...
Brian [Fri, 25 Jan 2008 01:20:07 +0000 (18:20 -0700)]
Cell: insert dummy field into cell_command_render struct to work around apparent compiler bug

Without this dummy field, it seems the SPU code in cmd_render() gets a bogus
value when dereferencing render->num_indices, sometimes.
This showed up as missing tries in gears.c in the first frame rendered.
Using spu-gcc version 4.1.1, Cell SDK 2.1

16 years agoCell: s/-W/-Wall/ in linux-cell
Brian [Fri, 25 Jan 2008 00:04:54 +0000 (17:04 -0700)]
Cell: s/-W/-Wall/ in linux-cell

16 years agoCell: send actual vertex size in the render command
Brian [Thu, 24 Jan 2008 23:47:23 +0000 (16:47 -0700)]
Cell: send actual vertex size in the render command

16 years agoCell: rewrite compute_vertex_layout()
Brian [Thu, 24 Jan 2008 23:41:03 +0000 (16:41 -0700)]
Cell: rewrite compute_vertex_layout()

16 years agoCell: fix asst. warnings
Brian [Thu, 24 Jan 2008 23:39:34 +0000 (16:39 -0700)]
Cell: fix asst. warnings

16 years agogallium: added rastpos_destroy()
Brian [Thu, 24 Jan 2008 23:05:33 +0000 (16:05 -0700)]
gallium: added rastpos_destroy()

16 years agoi915: add case for TGSI_FILE_IMMEDIATE to avoid error, but still needs proper handling...
Brian [Thu, 24 Jan 2008 16:59:39 +0000 (09:59 -0700)]
i915: add case for TGSI_FILE_IMMEDIATE to avoid error, but still needs proper handling...

16 years agoCell: use Cell driver by default if linux-cell is built
Brian [Thu, 24 Jan 2008 16:18:15 +0000 (09:18 -0700)]
Cell: use Cell driver by default if linux-cell is built

To disable the Cell driver and use softpipe instead, export GALLIUM_NOCELL=1

16 years agodisable usage of llvm in fragment shaders
Zack Rusin [Thu, 24 Jan 2008 13:29:19 +0000 (08:29 -0500)]
disable usage of llvm in fragment shaders

it produces wrong results because it hasn't been adjusted to some
new changes and it will just be in the way while changing llvm
code to a different vector layout

16 years agochange the name of the shaders to reflect what they do.
Zack Rusin [Thu, 24 Jan 2008 12:49:36 +0000 (07:49 -0500)]
change the name of the shaders to reflect what they do.
remove stale code and do some general cleanups.

16 years agoCell: s/FORMAT/EMIT/
Brian [Thu, 24 Jan 2008 06:33:35 +0000 (23:33 -0700)]
Cell: s/FORMAT/EMIT/

16 years agogallium: rename FORMAT_x to EMIT_x and use EMIT_ALL to emit whole vertex as-is in...
Brian [Thu, 24 Jan 2008 06:27:31 +0000 (23:27 -0700)]
gallium: rename FORMAT_x to EMIT_x and use EMIT_ALL to emit whole vertex as-is in vbuf code

16 years agogallium: improved vertex layout and interpolant setup in softpipe
Brian [Thu, 24 Jan 2008 06:08:59 +0000 (23:08 -0700)]
gallium: improved vertex layout and interpolant setup in softpipe

16 years agoSpecify linker instead of letting mklib use gcc
Ian Romanick [Thu, 3 Jan 2008 23:11:02 +0000 (15:11 -0800)]
Specify linker instead of letting mklib use gcc

This is the final bit required to get Cell builds on x86 working.
Without this, mklib tries to link using the x86 gcc instead of
ppu32-gcc.

16 years agoUse HOST_CC for programs that will run on the build host
Ian Romanick [Thu, 3 Jan 2008 23:08:53 +0000 (15:08 -0800)]
Use HOST_CC for programs that will run on the build host

16 years agoUse EXTRA_LIB_PATH with *_LIB_DEPS
Ian Romanick [Thu, 3 Jan 2008 22:59:14 +0000 (14:59 -0800)]
Use EXTRA_LIB_PATH with *_LIB_DEPS

Make sure EXTRA_LIB_PATH is used with all the LIB_DEPS.  Re-order some
of the options and tweak the whitespace to make the various LIB_DEPS
more readable.  This makes building for Cell on x86 a bit easier and
doesn't seem to effect other builds.

16 years agoRemove unnecessary paths
Ian Romanick [Thu, 3 Jan 2008 22:57:07 +0000 (14:57 -0800)]
Remove unnecessary paths

Removing the paths on certain commands (e.g., ppu32-gcc) and removing
-I/usr/include makes it possible to build for Cell on both PowerPC and
x86 hosts.

16 years agoCell: remove old test code
Brian [Wed, 23 Jan 2008 23:19:40 +0000 (16:19 -0700)]
Cell: remove old test code

16 years agoCell: asst. updates to sync up with today's earlier gallium changes
Brian [Wed, 23 Jan 2008 23:17:49 +0000 (16:17 -0700)]
Cell: asst. updates to sync up with today's earlier gallium changes

16 years agogallium: remove support for separate depth/stencil buffers. Always combined now.
Brian [Wed, 23 Jan 2008 22:45:52 +0000 (15:45 -0700)]
gallium: remove support for separate depth/stencil buffers.  Always combined now.

16 years agogallium: in sp_tile_cache_clear() mark all cache slots as empty/free. Fixes progs...
Brian [Wed, 23 Jan 2008 22:39:34 +0000 (15:39 -0700)]
gallium: in sp_tile_cache_clear() mark all cache slots as empty/free.  Fixes progs/redbook/stencil.c

16 years agogallium: rework compute_vertex_layout() to intelligently map vs outputs to fs inputs
Brian [Wed, 23 Jan 2008 21:23:49 +0000 (14:23 -0700)]
gallium: rework compute_vertex_layout() to intelligently map vs outputs to fs inputs

Some follow-on simplification in prim setup is possible...

16 years agogallium: restore/rewrite vbuf code for softpipe
Brian [Wed, 23 Jan 2008 20:17:50 +0000 (13:17 -0700)]
gallium: restore/rewrite vbuf code for softpipe

Now based on the draw_vbuf code, instead being a custom one-off.
Disabled by default, enable with SP_VBUF env var.

16 years agogallium: overhaul usage of vertex_info in draw module.
Brian [Wed, 23 Jan 2008 19:48:41 +0000 (12:48 -0700)]
gallium: overhaul usage of vertex_info in draw module.

Remove all dependencies on vertex_info, except for draw_vbuf.
Drawing stages now strictly operate on post-transformed vertices and don't
know anything about hw vertices.
Use vertex program output info for two-side/flat/etc stages.
Temporarily disable vbuf module in softpipe driver.

16 years agogallium: s/INTERP_NONE/INTERP_LINEAR/ to fix assertion with progs/samples/select.c
Brian [Wed, 23 Jan 2008 16:27:39 +0000 (09:27 -0700)]
gallium: s/INTERP_NONE/INTERP_LINEAR/ to fix assertion with progs/samples/select.c

16 years agogallium: fix computation of raster.point_size_per_vertex flag
Brian [Wed, 23 Jan 2008 15:24:30 +0000 (08:24 -0700)]
gallium: fix computation of raster.point_size_per_vertex flag

16 years agogallium: multiply vertex point size by 0.5
Brian [Wed, 23 Jan 2008 15:24:08 +0000 (08:24 -0700)]
gallium: multiply vertex point size by 0.5

16 years agogallium: use temp reg for storing color to avoid reading 'result.color'
Brian [Wed, 23 Jan 2008 03:52:48 +0000 (20:52 -0700)]
gallium: use temp reg for storing color to avoid reading 'result.color'

16 years agogallium: Don't allocate a vertex buffer until after setting the prim type.
Brian [Tue, 22 Jan 2008 23:37:19 +0000 (16:37 -0700)]
gallium: Don't allocate a vertex buffer until after setting the prim type.

The vertex size may depend on whether we're drawing points, lines or triangles.

16 years agoadded stipple_destroy()
José Fonseca [Tue, 22 Jan 2008 23:35:50 +0000 (16:35 -0700)]
added stipple_destroy()

16 years agogallium: Added FORMAT_1F_PSIZE to insert constant point size into vertices
Brian [Tue, 22 Jan 2008 17:16:30 +0000 (10:16 -0700)]
gallium: Added FORMAT_1F_PSIZE to insert constant point size into vertices

Also, added draw_convert_wide_points/lines() so a driver can tell the draw
module whether to convert wide points/lines into triangles, or just pass
them through.

16 years agogallium: silence warnings
Brian [Tue, 22 Jan 2008 04:19:24 +0000 (21:19 -0700)]
gallium: silence warnings

16 years agoCell: initial support for sampler state
Brian [Tue, 22 Jan 2008 04:15:43 +0000 (21:15 -0700)]
Cell: initial support for sampler state

16 years agoCell: s/cell_init_surface_funcs/cell_init_surface_functions/
Brian [Tue, 22 Jan 2008 03:54:38 +0000 (20:54 -0700)]
Cell: s/cell_init_surface_funcs/cell_init_surface_functions/

16 years agoCell: Added cell_surface.[ch] files
Brian [Tue, 22 Jan 2008 03:53:23 +0000 (20:53 -0700)]
Cell: Added cell_surface.[ch] files

16 years agogallium: remove unneeded protos, #includes, etc
Brian [Tue, 22 Jan 2008 03:51:03 +0000 (20:51 -0700)]
gallium: remove unneeded protos, #includes, etc

16 years agogallium: include sp_headers.h
Brian [Tue, 22 Jan 2008 03:50:39 +0000 (20:50 -0700)]
gallium: include sp_headers.h

16 years agoCell: renamed cell_surface.[ch] to cell_clear.[ch]
Brian [Tue, 22 Jan 2008 03:31:36 +0000 (20:31 -0700)]
Cell: renamed cell_surface.[ch] to cell_clear.[ch]

16 years agoCell: rename cell_surface.[ch] cell_clear.[ch]
Brian [Tue, 22 Jan 2008 03:31:16 +0000 (20:31 -0700)]
Cell: rename cell_surface.[ch] cell_clear.[ch]

16 years agoCell: Add initial texture functions
Brian [Tue, 22 Jan 2008 03:26:40 +0000 (20:26 -0700)]
Cell: Add initial texture functions

16 years agoCell: add cell_set_sampler_texture()
Brian [Tue, 22 Jan 2008 03:25:44 +0000 (20:25 -0700)]
Cell: add cell_set_sampler_texture()

16 years agogallium: move softpipe_get_tex_surface() prototype
Brian [Tue, 22 Jan 2008 03:23:48 +0000 (20:23 -0700)]
gallium: move softpipe_get_tex_surface() prototype

16 years agogallium: add license comment
Brian [Tue, 22 Jan 2008 03:16:13 +0000 (20:16 -0700)]
gallium: add license comment

16 years agogallium: move softpipe_get_tex_surface() into sp_texture.c
Brian [Tue, 22 Jan 2008 03:14:22 +0000 (20:14 -0700)]
gallium: move softpipe_get_tex_surface() into sp_texture.c

16 years agoCell: added asmfiles rule
Brian [Tue, 22 Jan 2008 02:25:10 +0000 (19:25 -0700)]
Cell: added asmfiles rule

16 years agogallium: prototype draw_linestipple.c replaced by draw_stipple.c
Brian [Mon, 21 Jan 2008 22:29:54 +0000 (15:29 -0700)]
gallium: prototype draw_linestipple.c replaced by draw_stipple.c

16 years agogallium: remove per-fragment line stipple code
Brian [Mon, 21 Jan 2008 21:10:16 +0000 (14:10 -0700)]
gallium: remove per-fragment line stipple code

16 years agogallium: new 'draw' stage for line stipple
Brian [Mon, 21 Jan 2008 21:08:20 +0000 (14:08 -0700)]
gallium: new 'draw' stage for line stipple

Stippled lines are converted into a series of shorter line segments

16 years agofix broken point rendering in sp_vbuf_render()
Brian [Mon, 21 Jan 2008 18:37:58 +0000 (11:37 -0700)]
fix broken point rendering in sp_vbuf_render()

16 years agogallium: add a src_index[] array to draw's vertex_info for mapping post-xform vertex...
Brian [Mon, 21 Jan 2008 18:16:22 +0000 (11:16 -0700)]
gallium: add a src_index[] array to draw's vertex_info for mapping post-xform vertex attribs to hw vertex attribs

16 years agoCell: use tile_t for color tile
Brian [Mon, 21 Jan 2008 00:39:07 +0000 (17:39 -0700)]
Cell: use tile_t for color tile

16 years agoCell: clean-up/re-org tile code
Brian [Mon, 21 Jan 2008 00:27:05 +0000 (17:27 -0700)]
Cell: clean-up/re-org tile code

Also, support 16 or 32-bit Z buffer at runtime.

16 years agoCell: use depth/stencil state to enable ztest
Brian [Sun, 20 Jan 2008 22:00:18 +0000 (15:00 -0700)]
Cell: use depth/stencil state to enable ztest

Move z-test code into do_depth_test().
Add ZSIZE symbol to support 2 or 4-byte Z values.

16 years agoenable call to cell_emit_state()
Brian [Sun, 20 Jan 2008 21:58:29 +0000 (14:58 -0700)]
enable call to cell_emit_state()

16 years agoCell: improve "finished copying batch buffer" signalling.
Brian [Sat, 19 Jan 2008 19:04:06 +0000 (12:04 -0700)]
Cell: improve "finished copying batch buffer" signalling.

When the SPU is done copying a batch buffer to local store, use an mfc_put()
to write a "done" message back to the buffer status array in main memory.
We were previously using a mailbox message for synchronization.

16 years agos/varible/variable/
Brian [Fri, 18 Jan 2008 19:47:20 +0000 (12:47 -0700)]
s/varible/variable/

16 years agoset param type to PROGRAM_CONSTANT when parsing immediates
Brian [Fri, 18 Jan 2008 19:45:55 +0000 (12:45 -0700)]
set param type to PROGRAM_CONSTANT when parsing immediates

16 years agouse PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals
Brian [Fri, 18 Jan 2008 19:45:27 +0000 (12:45 -0700)]
use PROGRAM_CONSTANT instead of PROGRAM_STATE_VAR when generating immediates/literals

16 years agoUnify copy_rect helpers.
Michel Dänzer [Fri, 18 Jan 2008 18:08:30 +0000 (19:08 +0100)]
Unify copy_rect helpers.

Some of the copies were buggy.

16 years agoRevert "temporarily don't emit TGSI immediates, use the constant buffer"
José Fonseca [Thu, 17 Jan 2008 08:20:46 +0000 (17:20 +0900)]
Revert "temporarily don't emit TGSI immediates, use the constant buffer"

This reverts commit 310e7ca44b33558a9aa22f43024d1bfb63642128.

16 years agoBack-port miscellaneous fixes from internal branch (mostly portability fixes).
José Fonseca [Thu, 17 Jan 2008 04:39:14 +0000 (13:39 +0900)]
Back-port miscellaneous fixes from internal branch (mostly portability fixes).

These are changes that are in our internal branch, but somehow were skipped
so far. It was done using visual comparison of the branches --
it is likely that changes are being carried on the wrong way

16 years agogallium: Pass PIPE_BUFFER_USAGE_PIXEL to buffer_data.
José Fonseca [Thu, 17 Jan 2008 04:37:17 +0000 (13:37 +0900)]
gallium: Pass PIPE_BUFFER_USAGE_PIXEL to buffer_data.

16 years agogallium: Handle TGSI_OPCODE_END on sse2.
José Fonseca [Thu, 17 Jan 2008 02:00:51 +0000 (11:00 +0900)]
gallium: Handle TGSI_OPCODE_END on sse2.

16 years agotemporarily don't emit TGSI immediates, use the constant buffer
Brian [Thu, 17 Jan 2008 00:21:05 +0000 (17:21 -0700)]
temporarily don't emit TGSI immediates, use the constant buffer

This allows a few more programs to run and not crash.
Need to get constant buffer uploads working...

16 years agogallium: Fix cut-n-paste error.
José Fonseca [Tue, 18 Dec 2007 22:19:40 +0000 (22:19 +0000)]
gallium: Fix cut-n-paste error.

16 years agogallium: Alternative mm_bufmgr_create_from_buffer constructor for mm pool managers.
José Fonseca [Tue, 18 Dec 2007 22:01:35 +0000 (22:01 +0000)]
gallium: Alternative mm_bufmgr_create_from_buffer constructor for mm pool managers.

16 years agogallium: Detect if a null buffer is passed.
José Fonseca [Tue, 18 Dec 2007 18:59:49 +0000 (18:59 +0000)]
gallium: Detect if a null buffer is passed.

16 years agogallium: fix warning
Keith Whitwell [Mon, 17 Dec 2007 12:03:51 +0000 (12:03 +0000)]
gallium: fix warning

16 years agogallium: fix warning
Keith Whitwell [Mon, 17 Dec 2007 11:59:02 +0000 (11:59 +0000)]
gallium: fix warning

16 years agogallium: hardwire reset_temps functionality
Keith Whitwell [Fri, 14 Dec 2007 15:51:07 +0000 (15:51 +0000)]
gallium: hardwire reset_temps functionality

16 years agogallium: whitespace changes
Keith Whitwell [Fri, 14 Dec 2007 15:50:06 +0000 (15:50 +0000)]
gallium: whitespace changes

16 years agogallium: Ignore generated files.
José Fonseca [Fri, 14 Dec 2007 16:37:10 +0000 (16:37 +0000)]
gallium: Ignore generated files.

16 years agouse NEGATE_X/Y/Z/W tokens
Brian [Wed, 16 Jan 2008 23:43:50 +0000 (16:43 -0700)]
use NEGATE_X/Y/Z/W tokens

16 years agoclean-up swizzle fields in fog code, fix NegateBase
Brian [Wed, 16 Jan 2008 23:43:36 +0000 (16:43 -0700)]
clean-up swizzle fields in fog code, fix NegateBase

16 years agoFix broken fog.
Brian [Wed, 16 Jan 2008 23:31:37 +0000 (16:31 -0700)]
Fix broken fog.

Note that fogcoord and front-facing attribs are in the same register, in the
X and Y channels, respectively.

16 years agoFix incorrect [0,1] clamping in store_dest().
Brian [Wed, 16 Jan 2008 23:29:36 +0000 (16:29 -0700)]
Fix incorrect [0,1] clamping in store_dest().

16 years agotweaks to quad drawing, set UsesKill in bitmap shader
Brian [Wed, 16 Jan 2008 20:55:08 +0000 (13:55 -0700)]
tweaks to quad drawing, set UsesKill in bitmap shader

16 years agocopy UsesKill state in _mesa_combine_programs()
Brian [Wed, 16 Jan 2008 20:54:32 +0000 (13:54 -0700)]
copy UsesKill state in _mesa_combine_programs()

16 years agovbuf updates/fixes (KeithW)
Brian [Wed, 16 Jan 2008 17:57:53 +0000 (10:57 -0700)]
vbuf updates/fixes (KeithW)

Plus, update i915 and Cell drivers for latest vbuf->draw() params.

16 years agos/DBG/DRAW_DBG
Brian [Wed, 16 Jan 2008 17:57:10 +0000 (10:57 -0700)]
s/DBG/DRAW_DBG

16 years agoremove useless assertions
Brian [Wed, 16 Jan 2008 17:56:38 +0000 (10:56 -0700)]
remove useless assertions

16 years agoinit front/back color attrib indexes to 0, not -1
Brian [Wed, 16 Jan 2008 17:56:23 +0000 (10:56 -0700)]
init front/back color attrib indexes to 0, not -1

16 years agoFix a two-sided lighting bug (fixes samples/wave.c)
Brian [Wed, 16 Jan 2008 15:30:00 +0000 (08:30 -0700)]
Fix a two-sided lighting bug (fixes samples/wave.c)

16 years agotypedef uintptr_t for non-HAVE_POSIX_MEMALIGN build
Brian [Wed, 16 Jan 2008 01:32:51 +0000 (18:32 -0700)]
typedef uintptr_t for non-HAVE_POSIX_MEMALIGN build

16 years agoDon't include stdint.h or inttypes. Use the uint64 typedef instead of uint64_t.
Brian [Wed, 16 Jan 2008 01:27:14 +0000 (18:27 -0700)]
Don't include stdint.h or inttypes.  Use the uint64 typedef instead of uint64_t.

16 years agoreplace _mesa_printf() with fprintf()
Brian [Wed, 16 Jan 2008 01:26:21 +0000 (18:26 -0700)]
replace _mesa_printf() with fprintf()

16 years agoremove redundant llvm subdir
Brian [Wed, 16 Jan 2008 01:22:35 +0000 (18:22 -0700)]
remove redundant llvm subdir

16 years agoinclude pipe/draw/draw_context.h
Brian [Wed, 16 Jan 2008 01:22:23 +0000 (18:22 -0700)]
include pipe/draw/draw_context.h

16 years agoAdd surface status/clear_value fields, PIPE_SURFACE_STATUS_x tokens
Brian [Tue, 15 Jan 2008 21:18:17 +0000 (14:18 -0700)]
Add surface status/clear_value fields, PIPE_SURFACE_STATUS_x tokens

16 years agofree stvp->draw_shader
Brian [Tue, 15 Jan 2008 02:18:35 +0000 (19:18 -0700)]
free stvp->draw_shader

16 years agoFix problems with vertex shaders and the private draw module.
Brian [Tue, 15 Jan 2008 02:12:46 +0000 (19:12 -0700)]
Fix problems with vertex shaders and the private draw module.

The CSO returned by pipe->create_vs_state() can't be passed to the
private draw module.  That was causing glRasterPos to blow up.
Add a 'draw_shader' field to st_vertex_program for use with the private
draw module.
Change st_context->state.vs type from cso_vertex_shader to st_vertex_program.

16 years agodisable debug printf
Brian [Tue, 15 Jan 2008 02:04:45 +0000 (19:04 -0700)]
disable debug printf

16 years agoCell: after sending a batch, wait for a DMA completion signal.
Brian [Mon, 14 Jan 2008 23:39:26 +0000 (16:39 -0700)]
Cell: after sending a batch, wait for a DMA completion signal.

This fixes sporadic rendering glitches.
Using a mailbox msg for now, until spe_mfcio_tag_status_read() or similar
is found to work.