Commit graph

13619 commits

Author SHA1 Message Date
Keith Whitwell
a97b3f64b3 gallium: remove makefile whitespace 2008-01-26 10:29:47 +09:00
Brian
0b958e3b7c Cell: updates to match pipe_buffer changes 2008-01-25 17:34:22 -07:00
Brian
b5618330c6 Cell: typedefs need semicolons, Ian :) 2008-01-25 17:34:04 -07:00
Brian
4d534124e7 Cell: emit framebuffer state like other state
Plus misc clean-up.  Window resize sometimes works now.
2008-01-25 17:25:56 -07:00
Brian
42d38ac02f gallium: replace loop w/ memset in draw_vertex_cache_invalidate() 2008-01-25 17:22:56 -07:00
Brian
1603a33fb2 gallium: better flush logic in draw module
This is the other half of Keith's draw/flush patch.

There are now 5 flush flags to control what's flushed (post-xform vertex
cache, prim cache, vbuf, etc).

The gears slow-down in this part of the patch was due to the cull stage not
getting invoked.  It was unconditional before, but is now gated by 'need_det'.
But it also needs to be gated by draw->rasterizer->cull_mode.  Gears uses
back-face culling.
2008-01-25 17:22:56 -07:00
Brian
0bfd085e28 gallium: replace prim pipeline begin/end() functions with flush()
This is basically half of Keith's draw/flush patch.

The stage->point/line/tri() functions are now self-validating, the validator
functions are installed by the flush() function.

There were excessive calls to validate_pipeline(), however.  This was caused
by draw_prim_queue_flush() keeping a local 'first' variable that always pointed
to the validate functions.  Replaced 'first' with 'draw->pipeline.first'.

Performance in gears is up just slightly with this patch.
2008-01-25 17:22:56 -07:00
Ian Romanick
bd8bf60b6f Work around parameter differences for main in different SDK versions 2008-01-25 14:47:20 -08:00
Keith Whitwell
1e0d30a515 gallium: rename pipe_buffer_handle to pipe_buffer, rework pipebuffer/ code
Provide an actual definition of the pipe_buffer struct,  containing
the parameters used to create the buffer, and its refcount.

Shift refcounting buffers out of the winsys interface, similar to
surfaces & textures.

Rework pipebuffer/ to reflect the fact these changes, and also Michel's
reworking of the buffer interface.
2008-01-25 20:53:31 +00:00
Michel Dänzer
756d52ec12 gallium: Simplify winsys buffer interface.
The properties of a buffer represented by struct pipe_buffer_handle are now
basically constant over its lifetime. The state tracker gets to deal with any
more complex buffer semantics it may need to provide.
2008-01-25 17:01:01 +01:00
Keith Whitwell
7a207682aa 965: add asserts to catch batch overrun 2008-01-25 15:50:05 +00:00
Keith Whitwell
59d66bf9df 965: cope better with range decls for temps, immediates, etc 2008-01-25 15:50:05 +00:00
Brian
c344bda34d gallium: include p_state.h, replace PIPE_MAX_SHADER_OUTPUTS with PIPE_MAX_SHADER_INPUTS 2008-01-25 08:20:10 -07:00
Brian
235da629dc Cell: propogate vertex info to SPUs, use it for attrib interpolation 2008-01-25 08:20:10 -07:00
Brian
4c4f691069 Cell: batch_buffer_size should be uint, not ubyte 2008-01-25 08:20:09 -07:00
Brian
78bff07f73 Cell: new ROUNDUP16() macro 2008-01-25 08:20:09 -07:00
Brian
a148cc51fb gallium: optimizations to flatshade, two-side prim stages 2008-01-25 08:15:50 -07:00
Brian
48355538a6 gallium: added rastpos_destroy() 2008-01-25 08:15:50 -07:00
Brian
547e52f4a0 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
2008-01-24 18:20:07 -07:00
Brian
7d0421d6cd Cell: s/-W/-Wall/ in linux-cell 2008-01-24 17:04:54 -07:00
Brian
fa82d86368 Cell: send actual vertex size in the render command 2008-01-24 16:47:23 -07:00
Brian
0673c571c7 Cell: rewrite compute_vertex_layout() 2008-01-24 16:41:03 -07:00
Brian
95ff06d610 Cell: fix asst. warnings 2008-01-24 16:39:34 -07:00
Brian
c753e7adde gallium: added rastpos_destroy() 2008-01-24 16:05:33 -07:00
Brian
6c29be9f41 i915: add case for TGSI_FILE_IMMEDIATE to avoid error, but still needs proper handling... 2008-01-24 09:59:39 -07:00
Brian
47b3afc53f Cell: use Cell driver by default if linux-cell is built
To disable the Cell driver and use softpipe instead, export GALLIUM_NOCELL=1
2008-01-24 09:18:43 -07:00
Zack Rusin
6e2c3b3a49 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
2008-01-24 08:29:19 -05:00
Zack Rusin
bac991d645 change the name of the shaders to reflect what they do.
remove stale code and do some general cleanups.
2008-01-24 07:49:36 -05:00
Brian
11349b6a5f Cell: s/FORMAT/EMIT/ 2008-01-23 23:33:35 -07:00
Brian
2549d79ae5 gallium: rename FORMAT_x to EMIT_x and use EMIT_ALL to emit whole vertex as-is in vbuf code 2008-01-23 23:27:31 -07:00
Brian
6000dcc973 gallium: improved vertex layout and interpolant setup in softpipe 2008-01-23 23:08:59 -07:00
Ian Romanick
dc1abc3932 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.
2008-01-23 15:25:52 -08:00
Ian Romanick
b3492a2052 Use HOST_CC for programs that will run on the build host 2008-01-23 15:25:52 -08:00
Ian Romanick
ffcb4d8498 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.
2008-01-23 15:25:52 -08:00
Ian Romanick
eb4a7382dc 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.
2008-01-23 15:25:52 -08:00
Brian
f5d2c1eef9 Cell: remove old test code 2008-01-23 16:19:40 -07:00
Brian
f19b2d7221 Cell: asst. updates to sync up with today's earlier gallium changes 2008-01-23 16:17:49 -07:00
Brian
8de2331e43 gallium: remove support for separate depth/stencil buffers. Always combined now. 2008-01-23 15:45:52 -07:00
Brian
1cf3c77e08 gallium: in sp_tile_cache_clear() mark all cache slots as empty/free. Fixes progs/redbook/stencil.c 2008-01-23 15:39:34 -07:00
Brian
336e2cb9ec gallium: rework compute_vertex_layout() to intelligently map vs outputs to fs inputs
Some follow-on simplification in prim setup is possible...
2008-01-23 14:23:49 -07:00
Brian
2d37e78e63 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.
2008-01-23 13:17:50 -07:00
Brian
cd3643698e 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.
2008-01-23 12:48:41 -07:00
Brian
b3f081999f gallium: s/INTERP_NONE/INTERP_LINEAR/ to fix assertion with progs/samples/select.c 2008-01-23 09:27:39 -07:00
Brian
2444f6c6a4 gallium: fix computation of raster.point_size_per_vertex flag 2008-01-23 08:24:30 -07:00
Brian
46a787ad97 gallium: multiply vertex point size by 0.5 2008-01-23 08:24:08 -07:00
Brian
286380020b gallium: use temp reg for storing color to avoid reading 'result.color' 2008-01-22 20:52:48 -07:00
Brian
59e8f3e5e9 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.
2008-01-22 16:37:19 -07:00
José Fonseca
52264ec53d added stipple_destroy() 2008-01-22 16:35:50 -07:00
Brian
f1fb69a6e5 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.
2008-01-22 10:17:28 -07:00
Brian
7049ff53f6 gallium: silence warnings 2008-01-21 21:19:24 -07:00