mesa.git
16 years agoInitial pass at instruction / declaration fetch
Ian Romanick [Tue, 29 Jan 2008 18:56:53 +0000 (10:56 -0800)]
Initial pass at instruction / declaration fetch

16 years agoInitial pass at vertex shader on SPU using TGSI VM
Ian Romanick [Tue, 29 Jan 2008 18:37:18 +0000 (10:37 -0800)]
Initial pass at vertex shader on SPU using TGSI VM

All of the code is wired in on the SPU side, but it is not called from
the PPU yet.  Instruction / declaration fetch still needs to be
implemented in spu_exec.c.

16 years agoCell: prototype SIMD code for z testing
Brian [Thu, 31 Jan 2008 03:40:26 +0000 (20:40 -0700)]
Cell: prototype SIMD code for z testing

16 years agoCell: start to SIMD-ize triangle attribute interpolation
Brian [Wed, 30 Jan 2008 22:26:51 +0000 (15:26 -0700)]
Cell: start to SIMD-ize triangle attribute interpolation

Using the spu_add(), etc intrinsics.
About a 15% speed-up with some tests.

16 years agoCell: fold setup_tri() into tri_draw()
Brian [Wed, 30 Jan 2008 19:13:04 +0000 (12:13 -0700)]
Cell: fold setup_tri() into tri_draw()

16 years agoCell: make 'setup' a regular var instead of passing around a pointer everywhere
Brian [Wed, 30 Jan 2008 19:08:23 +0000 (12:08 -0700)]
Cell: make 'setup' a regular var instead of passing around a pointer everywhere

We'll never have more than one of these objects.
Avoiding pointer deref improves performance a bit.

16 years agoCell: minor code refactoring, movement
Brian [Wed, 30 Jan 2008 18:56:41 +0000 (11:56 -0700)]
Cell: minor code refactoring, movement

16 years agoCell: check tile status before wait_on_mask()
Brian [Wed, 30 Jan 2008 18:56:14 +0000 (11:56 -0700)]
Cell: check tile status before wait_on_mask()

16 years agoCell: make wait_on_mask() static/inlined
Brian [Wed, 30 Jan 2008 18:49:51 +0000 (11:49 -0700)]
Cell: make wait_on_mask() static/inlined

16 years agoCell: move CELL_MAX_SPUS
Brian [Wed, 30 Jan 2008 18:49:26 +0000 (11:49 -0700)]
Cell: move CELL_MAX_SPUS

16 years agogallium: Teach draw_vf about draw vertices.
José Fonseca [Wed, 30 Jan 2008 07:46:41 +0000 (16:46 +0900)]
gallium: Teach draw_vf about draw vertices.

This reduces the emit overhead, which is significant since we're
emiting one vertex at a time.

16 years agogallium: Remove draw_vertex_fetch::lookup.
José Fonseca [Wed, 30 Jan 2008 06:24:56 +0000 (15:24 +0900)]
gallium: Remove draw_vertex_fetch::lookup.

It is not being used, and would be dangerous to use given the possibility of constants.

16 years agogallium: Fix build on WinXP.
Michal Krol [Tue, 29 Jan 2008 15:41:10 +0000 (16:41 +0100)]
gallium: Fix build on WinXP.

16 years agonouveau: 0xdeadc0de
Ben Skeggs [Wed, 30 Jan 2008 04:34:02 +0000 (15:34 +1100)]
nouveau: 0xdeadc0de

16 years agoCell: use _pack_rgba8() from pack_rgba8.h to do float[4]->uint color conversion
Brian [Tue, 29 Jan 2008 18:22:57 +0000 (11:22 -0700)]
Cell: use _pack_rgba8() from pack_rgba8.h to do float[4]->uint color conversion

texcyl.c is twice as fast now in non-texture mode

16 years agogallium: weaken assert slightly
Keith Whitwell [Tue, 29 Jan 2008 15:17:56 +0000 (15:17 +0000)]
gallium: weaken assert slightly

16 years agogallium: streamline various unfilled & stippled paths
Keith Whitwell [Tue, 29 Jan 2008 12:37:47 +0000 (12:37 +0000)]
gallium: streamline various unfilled & stippled paths

16 years agogallium: don't rely on assert(0) for error handling - may be disabled
Keith Whitwell [Tue, 29 Jan 2008 12:37:07 +0000 (12:37 +0000)]
gallium: don't rely on assert(0) for error handling - may be disabled

16 years agogallium: Emit point size as a constant.
José Fonseca [Tue, 29 Jan 2008 11:47:30 +0000 (20:47 +0900)]
gallium: Emit point size as a constant.

16 years agogallium: Emit constants.
José Fonseca [Tue, 29 Jan 2008 11:46:48 +0000 (20:46 +0900)]
gallium: Emit constants.

16 years agogallium: Allow draw_vf usage to be controlled at runtime.
José Fonseca [Tue, 29 Jan 2008 09:01:17 +0000 (18:01 +0900)]
gallium: Allow draw_vf usage to be controlled at runtime.

16 years agogallium: Add extern keyword to global.
José Fonseca [Tue, 29 Jan 2008 02:21:29 +0000 (11:21 +0900)]
gallium: Add extern keyword to global.

16 years agoCell: add OPT_FLAGS var
Brian [Tue, 29 Jan 2008 01:17:55 +0000 (18:17 -0700)]
Cell: add OPT_FLAGS var

16 years agoCell: move cmd_render() into new spu_render.c file
Brian [Tue, 29 Jan 2008 01:17:30 +0000 (18:17 -0700)]
Cell: move cmd_render() into new spu_render.c file

16 years agoCell: add a few null texture tests
Brian [Tue, 29 Jan 2008 01:09:16 +0000 (18:09 -0700)]
Cell: add a few null texture tests

16 years agoCell: compute min index referenced in draw command, use it to reduce size of vertex...
Brian [Tue, 29 Jan 2008 01:03:45 +0000 (18:03 -0700)]
Cell: compute min index referenced in draw command, use it to reduce size of vertex data payload

16 years agoCell: minor optimization for flat shading
Brian [Tue, 29 Jan 2008 00:32:23 +0000 (17:32 -0700)]
Cell: minor optimization for flat shading

16 years agoCell: basic texture mapping
Brian [Tue, 29 Jan 2008 00:23:44 +0000 (17:23 -0700)]
Cell: basic texture mapping

Texture images are tiled in PPU code.  SPUs use a texture cache for getting
texels from textures.
This is very rough code, but demos/texcyl.c works.

16 years agoCell: initial texture cache/sampling code
Brian [Tue, 29 Jan 2008 00:22:12 +0000 (17:22 -0700)]
Cell: initial texture cache/sampling code

16 years agoCell: emit state in cell_clear_surface() if dirty.
Brian [Mon, 28 Jan 2008 20:02:11 +0000 (13:02 -0700)]
Cell: emit state in cell_clear_surface() if dirty.

Without this a program that does nothing but glClear() doesn't work.  We need
the framebuffer state.

16 years agoCell: re-enable bounding boxes
Brian [Mon, 28 Jan 2008 19:46:05 +0000 (12:46 -0700)]
Cell: re-enable bounding boxes

The geometry bounding box is used to restrict rasterization to just those
tiles that are relevant.
Note another dummy field had to be added to the cell_command_render struct.
Apparently, every 4th word in a struct is susceptible to corruption in some
circumstances.  Might be a compiler bug.

16 years agogallium: Use GALLIUM_ prefix for env vars.
José Fonseca [Tue, 29 Jan 2008 00:42:03 +0000 (09:42 +0900)]
gallium: Use GALLIUM_ prefix for env vars.

16 years agogallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initia...
José Fonseca [Tue, 29 Jan 2008 00:41:21 +0000 (09:41 +0900)]
gallium: Use CALLOC for pb_buffer to ensure that all fields of pipe_buffer are initiallized.

16 years agogallium: Remove direct dependencies to mesa internals.
José Fonseca [Tue, 29 Jan 2008 00:34:09 +0000 (09:34 +0900)]
gallium: Remove direct dependencies to mesa internals.

_mesa_exec_free is still being called. More invasive refactoring is necessary to clean it out.

16 years agogallium: remove dead vars, code
Keith Whitwell [Mon, 28 Jan 2008 20:57:58 +0000 (20:57 +0000)]
gallium: remove dead vars, code

16 years agogallium: fix typos in hardwired fetch path
Keith Whitwell [Mon, 28 Jan 2008 20:57:16 +0000 (20:57 +0000)]
gallium: fix typos in hardwired fetch path

16 years agopush out far clip plane to 200
Brian [Mon, 28 Jan 2008 19:41:47 +0000 (12:41 -0700)]
push out far clip plane to 200

16 years agoAdded d/D keys to change viewing distance, 'a' to toggle animation
Brian [Mon, 28 Jan 2008 19:35:20 +0000 (12:35 -0700)]
Added d/D keys to change viewing distance, 'a' to toggle animation

16 years agoCell: additional assertions
Brian [Mon, 28 Jan 2008 18:21:25 +0000 (11:21 -0700)]
Cell: additional assertions

16 years agoCell: make sure state commands aren't split across batches
Brian [Mon, 28 Jan 2008 18:20:47 +0000 (11:20 -0700)]
Cell: make sure state commands aren't split across batches

16 years agoCell: remove unneeded flush(), dead code
Brian [Mon, 28 Jan 2008 17:41:51 +0000 (10:41 -0700)]
Cell: remove unneeded flush(), dead code

16 years agoCell: clean-up of render path
Brian [Mon, 28 Jan 2008 17:41:27 +0000 (10:41 -0700)]
Cell: clean-up of render path

Finally removed a number of unneeded flush commands.  Vertex buffers are
allocated from the general buffer pool, freed by SPUs when done.
Still an occasional failed assertion (invalid batch buffer command)...

16 years agoCell: checkpoint commit: always inline prim indexes into batch buffer
Brian [Mon, 28 Jan 2008 17:00:27 +0000 (10:00 -0700)]
Cell: checkpoint commit: always inline prim indexes into batch buffer

Also, explicit release-vertex-buffer command.
Lots of debug/stale code still in place...

16 years agoCell: If flushing for swapbuffers, wait for frame completion
Brian [Mon, 28 Jan 2008 16:57:51 +0000 (09:57 -0700)]
Cell: If flushing for swapbuffers, wait for frame completion

16 years agoCell: additional debug code, misc clean-up
Brian [Mon, 28 Jan 2008 16:57:13 +0000 (09:57 -0700)]
Cell: additional debug code, misc clean-up

16 years agoCell: generalize the batch buffer code for vertex buffers...
Brian [Sun, 27 Jan 2008 19:01:47 +0000 (12:01 -0700)]
Cell: generalize the batch buffer code for vertex buffers...

16 years agogallium: check if surface has defined status in check_clear_depth_with_quad()
Brian [Mon, 28 Jan 2008 16:23:29 +0000 (09:23 -0700)]
gallium: check if surface has defined status in check_clear_depth_with_quad()

This was part of Keith's patch from Friday.

16 years agogallium: handle flatshading explicitly in clipper stage
Keith Whitwell [Mon, 28 Jan 2008 15:50:02 +0000 (15:50 +0000)]
gallium: handle flatshading explicitly in clipper stage

We can do a better job in the clip stage than just relying on the
brute-force approach of copying colors to all incoming vertices applied
in the flatshade stage.

At very least, it is only necessary to do this in the clipper when a
primitive is actually being clipped.

16 years agogallium: add a couple of hardwired vertex fetch functions
Keith Whitwell [Mon, 28 Jan 2008 12:40:29 +0000 (12:40 +0000)]
gallium: add a couple of hardwired vertex fetch functions

16 years agogallium: only call vertex/prim queue flush when there is something to flush
Keith Whitwell [Mon, 28 Jan 2008 11:12:11 +0000 (11:12 +0000)]
gallium: only call vertex/prim queue flush when there is something to flush

16 years agogallium: explictly cast double to float in vertex fetch
Keith Whitwell [Mon, 28 Jan 2008 10:48:22 +0000 (10:48 +0000)]
gallium: explictly cast double to float in vertex fetch

16 years agogallium: fill in missing formats for vertex_fetch
Keith Whitwell [Mon, 28 Jan 2008 10:46:52 +0000 (10:46 +0000)]
gallium: fill in missing formats for vertex_fetch

16 years agogallium: remove dead code from draw_vf*
Keith Whitwell [Mon, 28 Jan 2008 10:14:13 +0000 (10:14 +0000)]
gallium: remove dead code from draw_vf*

16 years agoFirst stab at hooking draw_vbuf & vf.
José Fonseca [Mon, 28 Jan 2008 09:46:21 +0000 (18:46 +0900)]
First stab at hooking draw_vbuf & vf.

Emit disabled for now. Tested with softpipe. Only one vertex at a time for now (slow).

16 years agoClone vf module.
José Fonseca [Mon, 28 Jan 2008 06:48:51 +0000 (15:48 +0900)]
Clone vf module.

16 years agonouveau: oops and make nouveau winsys build by default
Stephane Marchesin [Fri, 15 Feb 2008 01:41:34 +0000 (02:41 +0100)]
nouveau: oops and make nouveau winsys build by default

16 years agonouveau: add nv30.
Stephane Marchesin [Fri, 15 Feb 2008 01:36:28 +0000 (02:36 +0100)]
nouveau: add nv30.

16 years agonouveau: hook in nv30.
Stephane Marchesin [Fri, 15 Feb 2008 01:25:17 +0000 (02:25 +0100)]
nouveau: hook in nv30.

16 years agonouveau: Update to latest header.
Stephane Marchesin [Fri, 15 Feb 2008 01:23:56 +0000 (02:23 +0100)]
nouveau: Update to latest header.

16 years agoHook nv30 into the build.
Stephane Marchesin [Sun, 10 Feb 2008 18:14:02 +0000 (19:14 +0100)]
Hook nv30 into the build.

16 years agonv40: Avoid a nasty array overflow leading to a corrupt memory pointer.
Maarten Maathuis [Wed, 13 Feb 2008 21:57:09 +0000 (22:57 +0100)]
nv40: Avoid a nasty array overflow leading to a corrupt memory pointer.

16 years agonouveau: update to latest header.
Stephane Marchesin [Mon, 4 Feb 2008 16:31:45 +0000 (17:31 +0100)]
nouveau: update to latest header.

16 years agoAdd NV63.
Stephane Marchesin [Sun, 3 Feb 2008 22:08:06 +0000 (23:08 +0100)]
Add NV63.

16 years agonouveau: support nv67
Ben Skeggs [Tue, 29 Jan 2008 13:05:50 +0000 (00:05 +1100)]
nouveau: support nv67

16 years agonouveau: ddx versioning changed to match nouveau.ko versioning
Ben Skeggs [Mon, 28 Jan 2008 07:40:11 +0000 (18:40 +1100)]
nouveau: ddx versioning changed to match nouveau.ko versioning

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Mon, 28 Jan 2008 07:34:21 +0000 (18:34 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agonouveau: quicky-port to gallium changes
Ben Skeggs [Mon, 28 Jan 2008 07:32:46 +0000 (18:32 +1100)]
nouveau: quicky-port to gallium changes

16 years agoSimplify prototypes of draw_vbuf's internal functions.
José Fonseca [Mon, 28 Jan 2008 06:00:08 +0000 (15:00 +0900)]
Simplify prototypes of draw_vbuf's internal functions.

16 years agoCache the vinfo in vbuf_stage.
José Fonseca [Mon, 28 Jan 2008 05:51:14 +0000 (14:51 +0900)]
Cache the vinfo in vbuf_stage.

16 years agoDo refcounting trhoughout all buffer objects, since it is now a base requirement.
José Fonseca [Sun, 27 Jan 2008 10:22:25 +0000 (19:22 +0900)]
Do refcounting trhoughout all buffer objects, since it is now a base requirement.

16 years agoFullfill pipe_winsys->user_buffer_create. Aggregate winsys functions.
José Fonseca [Sun, 27 Jan 2008 10:20:48 +0000 (19:20 +0900)]
Fullfill pipe_winsys->user_buffer_create. Aggregate winsys functions.

16 years agoCell: added support for inlined vertex buffers.
Brian [Sun, 27 Jan 2008 02:38:16 +0000 (19:38 -0700)]
Cell: added support for inlined vertex buffers.

Small prims are now self-contained in batch buffers when space allows.

16 years agoCell: added ROUNUP4
Brian [Sun, 27 Jan 2008 02:31:20 +0000 (19:31 -0700)]
Cell: added ROUNUP4

16 years agoMerge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Ben Skeggs [Sun, 27 Jan 2008 01:35:33 +0000 (12:35 +1100)]
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1

16 years agoCell: added support for inlined indexes
Brian [Sun, 27 Jan 2008 01:30:44 +0000 (18:30 -0700)]
Cell: added support for inlined indexes

If there's room in the batch buffer after the rendering command to accomodate
the indexes, put them there rather than in a separate buffer.

16 years agoCell: added cell_batch_free_space()
Brian [Sun, 27 Jan 2008 01:27:37 +0000 (18:27 -0700)]
Cell: added cell_batch_free_space()

16 years agogallium: disable unnecessary point/line/tri re-validation in vbuf_flush_indices()
Brian [Sat, 26 Jan 2008 23:46:52 +0000 (16:46 -0700)]
gallium: disable unnecessary point/line/tri re-validation in vbuf_flush_indices()

16 years agoCell: remove some old tile code
Brian [Sat, 26 Jan 2008 23:06:26 +0000 (16:06 -0700)]
Cell: remove some old tile code

16 years agogallium: s/GLuint/unsigned/ to work with gallium when THREADS not defined
Brian [Sat, 26 Jan 2008 23:05:35 +0000 (16:05 -0700)]
gallium: s/GLuint/unsigned/ to work with gallium when THREADS not defined

16 years agogallium: fix a few segfaults/assertions that can happen during context init
Brian [Sat, 26 Jan 2008 23:04:47 +0000 (16:04 -0700)]
gallium: fix a few segfaults/assertions that can happen during context init

16 years agoCell: fix a recursive flushing bug
Brian [Sat, 26 Jan 2008 21:14:56 +0000 (14:14 -0700)]
Cell: fix a recursive flushing bug

16 years agoCell: add check to catch recursive batch flushing
Brian [Sat, 26 Jan 2008 21:12:33 +0000 (14:12 -0700)]
Cell: add check to catch recursive batch flushing

16 years agoCell: move ASSERT macro into common.h
Brian [Sat, 26 Jan 2008 21:11:50 +0000 (14:11 -0700)]
Cell: move ASSERT macro into common.h

16 years agogallium: Aggregate all buffer allocation info into a single struct. Obey requested...
José Fonseca [Thu, 17 Jan 2008 08:06:16 +0000 (17:06 +0900)]
gallium: Aggregate all buffer allocation info into a single struct. Obey requested alignment.

16 years agogallium: Make mm buffer manager more portable.
José Fonseca [Fri, 25 Jan 2008 09:38:25 +0000 (18:38 +0900)]
gallium: Make mm buffer manager more portable.

16 years agogallium: Remove unneeded headers.
José Fonseca [Fri, 25 Jan 2008 09:37:41 +0000 (18:37 +0900)]
gallium: Remove unneeded headers.

16 years agogallium: fix linux build
Keith Whitwell [Thu, 24 Jan 2008 11:09:07 +0000 (11:09 +0000)]
gallium: fix linux build

16 years agogallium: Fix build on Windows.
Michal Krol [Wed, 23 Jan 2008 14:47:10 +0000 (15:47 +0100)]
gallium: Fix build on Windows.

16 years agod3d: Fix build on Windows.
Michal Krol [Wed, 23 Jan 2008 14:47:10 +0000 (15:47 +0100)]
d3d: Fix build on Windows.

16 years agogallium: Fix build on WinXP.
Michal Krol [Sun, 20 Jan 2008 20:33:35 +0000 (21:33 +0100)]
gallium: Fix build on WinXP.

16 years agogallium: Use directory name in include.
José Fonseca [Mon, 21 Jan 2008 15:13:50 +0000 (00:13 +0900)]
gallium: Use directory name in include.

16 years agogallium: Fix build for WinXP.
Michal Krol [Sun, 20 Jan 2008 18:36:23 +0000 (19:36 +0100)]
gallium: Fix build for WinXP.

16 years agogallium: Define MALLOC_STRUCT.
José Fonseca [Fri, 25 Jan 2008 10:33:58 +0000 (19:33 +0900)]
gallium: Define MALLOC_STRUCT.

16 years agogallium: Fix build on Windows.
Michal Krol [Thu, 24 Jan 2008 17:15:30 +0000 (18:15 +0100)]
gallium: Fix build on Windows.

16 years agogallium: Fix build on Windows.
Michal Krol [Thu, 24 Jan 2008 15:41:29 +0000 (16:41 +0100)]
gallium: Fix build on Windows.

16 years agogallium: restructure vertex fetch code slightly
Keith Whitwell [Thu, 24 Jan 2008 11:19:06 +0000 (11:19 +0000)]
gallium: restructure vertex fetch code slightly

16 years agogallium: Fix MSVC float/double conversion warning.
José Fonseca [Thu, 24 Jan 2008 10:40:14 +0000 (19:40 +0900)]
gallium: Fix MSVC float/double conversion warning.

16 years agogallium: Complete integer types.
José Fonseca [Thu, 24 Jan 2008 10:37:37 +0000 (19:37 +0900)]
gallium: Complete integer types.

16 years agogallium: minor cleanups to pipe interface
Keith Whitwell [Tue, 22 Jan 2008 14:38:36 +0000 (14:38 +0000)]
gallium: minor cleanups to pipe interface

- Remove put/get tile, just have users call put_tile_raw, etc directly.
- Remove surface_data call, just map it locally.

16 years agogallium: add PIPE_FLUSH_SWAPBUFFERS flag
Keith Whitwell [Mon, 21 Jan 2008 20:25:19 +0000 (20:25 +0000)]
gallium: add PIPE_FLUSH_SWAPBUFFERS flag