mesa.git
16 years agoMerge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Ben Skeggs [Wed, 10 Sep 2008 20:09:05 +0000 (06:09 +1000)]
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1

Conflicts:
configs/default

16 years agotgsi: Fix newline pos.
José Fonseca [Wed, 10 Sep 2008 01:33:03 +0000 (10:33 +0900)]
tgsi: Fix newline pos.

16 years agotgsi: Verify constants are set before attempting to read them.
José Fonseca [Wed, 10 Sep 2008 01:32:52 +0000 (10:32 +0900)]
tgsi: Verify constants are set before attempting to read them.

16 years agosoftpipe: Code (commented out) to dump BMPs.
José Fonseca [Tue, 9 Sep 2008 13:17:31 +0000 (22:17 +0900)]
softpipe: Code (commented out) to dump BMPs.

16 years agoutil: Ensure we always have a full qualified file name on windows display.
José Fonseca [Tue, 9 Sep 2008 12:16:36 +0000 (21:16 +0900)]
util: Ensure we always have a full qualified file name on windows display.

16 years agoutil: Enable u_stream_std.c for PIPE_SUBSYSTEM_WINDOWS_USER.
Michal Krol [Tue, 9 Sep 2008 09:25:05 +0000 (11:25 +0200)]
util: Enable u_stream_std.c for PIPE_SUBSYSTEM_WINDOWS_USER.

16 years agosoftpipe: Silence compiler warning on Windows.
Michal Krol [Tue, 9 Sep 2008 09:21:57 +0000 (11:21 +0200)]
softpipe: Silence compiler warning on Windows.

16 years agosoftpipe: Protect pipe_condvar_signal/broadcast calls with a mutex.
Michal Krol [Mon, 8 Sep 2008 21:04:17 +0000 (23:04 +0200)]
softpipe: Protect pipe_condvar_signal/broadcast calls with a mutex.

16 years agosoftpipe: Set SP_NUM_QUAD_THREADS 1 effectively disabling multithreaded softpipe.
Michal Krol [Mon, 8 Sep 2008 15:21:13 +0000 (17:21 +0200)]
softpipe: Set SP_NUM_QUAD_THREADS 1 effectively disabling multithreaded softpipe.

We want to make it env variable, or even better, autodetect as the feature makes
softpipe run slower on a single CPU.

16 years agosoftpipe: More improvements for multithreaded softpipe.
Michal Krol [Sat, 6 Sep 2008 14:35:23 +0000 (16:35 +0200)]
softpipe: More improvements for multithreaded softpipe.

Store only input and inout of a quad_header in job que.

16 years agosoftpipe: Split changing fields of quad_header into input, inout and output parts.
Michal Krol [Sat, 6 Sep 2008 14:02:24 +0000 (16:02 +0200)]
softpipe: Split changing fields of quad_header into input, inout and output parts.

16 years agosoftpipe: Improve multithreaded softpipe.
Michal Krol [Sat, 6 Sep 2008 13:19:02 +0000 (15:19 +0200)]
softpipe: Improve multithreaded softpipe.

Use condition vars to communicate between threads instead of stalling.

16 years agosoftpipe: First attempts at multithreaded softpipe.
Michal Krol [Fri, 5 Sep 2008 21:21:08 +0000 (23:21 +0200)]
softpipe: First attempts at multithreaded softpipe.

Configured for 2 cores.

16 years agotgsi: Cleanup code.
Michal Krol [Fri, 5 Sep 2008 15:08:50 +0000 (17:08 +0200)]
tgsi: Cleanup code.

16 years agotrace: Request a growable file.
José Fonseca [Mon, 8 Sep 2008 13:57:01 +0000 (22:57 +0900)]
trace: Request a growable file.

16 years agoutil: Allow to define the maximum file size.
José Fonseca [Mon, 8 Sep 2008 13:56:38 +0000 (22:56 +0900)]
util: Allow to define the maximum file size.

This avoids splitting the bitmaps in many files.

16 years agoutil: Dump surfaces to BMP.
José Fonseca [Mon, 8 Sep 2008 13:21:33 +0000 (22:21 +0900)]
util: Dump surfaces to BMP.

This allows quick inspection of surfaces in mass scale.

16 years agoscons: Install shared libs in the right subdir.
José Fonseca [Mon, 8 Sep 2008 12:50:50 +0000 (21:50 +0900)]
scons: Install shared libs in the right subdir.

16 years agotrace: Use util's stream.
José Fonseca [Mon, 8 Sep 2008 02:09:48 +0000 (11:09 +0900)]
trace: Use util's stream.

16 years agoutil: Rip-off trace's os-independent stream code.
José Fonseca [Mon, 8 Sep 2008 02:09:23 +0000 (11:09 +0900)]
util: Rip-off trace's os-independent stream code.

16 years agoscons: Install libGL.so and respective symlinks.
José Fonseca [Sun, 7 Sep 2008 22:54:15 +0000 (07:54 +0900)]
scons: Install libGL.so and respective symlinks.

16 years agog3dvl: Initialize DRI drawables correctly.
Younes Manton [Thu, 4 Sep 2008 08:43:34 +0000 (04:43 -0400)]
g3dvl: Initialize DRI drawables correctly.

16 years agog3dvl: Zero-block optimization.
Younes Manton [Thu, 4 Sep 2008 08:10:43 +0000 (04:10 -0400)]
g3dvl: Zero-block optimization.

For blocks whose contents are derived completely from ref surfaces, don't
bother zero-ing the corresponding block in the luma/chroma textures, except
for the first such luma, chroma Cb, and chroma Cr each frame. All later
zero blocks are textured from that first zero block.

16 years agog3dvl: Define texcoords seperately for luma, Cb, Cr textures.
Younes Manton [Thu, 4 Sep 2008 04:16:51 +0000 (00:16 -0400)]
g3dvl: Define texcoords seperately for luma, Cb, Cr textures.

Need to be able to address each texture separately to do zero-block.

16 years agog3dvl: Define block texcoords for each vertex instead of reusing pos.
Younes Manton [Wed, 3 Sep 2008 15:50:38 +0000 (11:50 -0400)]
g3dvl: Define block texcoords for each vertex instead of reusing pos.

This is needed for zero-block optimization.

16 years agocell: code clean-up, comments
Brian Paul [Fri, 5 Sep 2008 16:18:00 +0000 (10:18 -0600)]
cell: code clean-up, comments

16 years agocell: convert clear color if needed
Brian Paul [Fri, 5 Sep 2008 16:16:27 +0000 (10:16 -0600)]
cell: convert clear color if needed

16 years agosoftpipe: convert clear color to surface format if needed
Brian Paul [Fri, 5 Sep 2008 16:11:22 +0000 (10:11 -0600)]
softpipe: convert clear color to surface format if needed

16 years agogallium: document that clear color is intentionally always PIPE_FORMAT_A8R8G8B8_UNORM
Brian Paul [Fri, 5 Sep 2008 16:10:55 +0000 (10:10 -0600)]
gallium: document that clear color is intentionally always PIPE_FORMAT_A8R8G8B8_UNORM

16 years agogallium: remove debug code from prev commit
Brian Paul [Fri, 5 Sep 2008 16:10:18 +0000 (10:10 -0600)]
gallium: remove debug code from prev commit

16 years agogallium: new util_unpack_color_ub() function
Brian Paul [Fri, 5 Sep 2008 16:09:48 +0000 (10:09 -0600)]
gallium: new util_unpack_color_ub() function

16 years agogallium: Add pipe_thread primitives for PIPE_OS_LINUX.
Michal Krol [Fri, 5 Sep 2008 14:47:06 +0000 (16:47 +0200)]
gallium: Add pipe_thread primitives for PIPE_OS_LINUX.

16 years agomesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib()
Brian Paul [Fri, 5 Sep 2008 14:07:20 +0000 (08:07 -0600)]
mesa: replace MALLOC w/ CALLOC to fix memory error in glPushClientAttrib()

16 years agogallium: Add pipe_thread primitives for PIPE_SUBSYSTEM_WINDOWS_USER config.
Michal Krol [Fri, 5 Sep 2008 13:10:47 +0000 (15:10 +0200)]
gallium: Add pipe_thread primitives for PIPE_SUBSYSTEM_WINDOWS_USER config.

16 years agomesa: _mesa_program_state_string() returns char *, not const char *.
Michal Krol [Fri, 5 Sep 2008 10:25:50 +0000 (12:25 +0200)]
mesa: _mesa_program_state_string() returns char *, not const char *.

16 years agotgsi: Refactor tgsi_dump to avoid using string buffers when dumping.
José Fonseca [Fri, 5 Sep 2008 01:29:17 +0000 (10:29 +0900)]
tgsi: Refactor tgsi_dump to avoid using string buffers when dumping.

This fixes a stack overflow when dumping shaders.

It ended up being pretty much as the original code Michal had before,
before I went on a cleanup rampage on it and took things that ended up
needing...

16 years agogallium: Pass 512 bytes max to EngDebugPrint.
José Fonseca [Fri, 5 Sep 2008 01:27:03 +0000 (10:27 +0900)]
gallium: Pass 512 bytes max to EngDebugPrint.

16 years agogallium: New pf_has_alpha utility function.
José Fonseca [Fri, 5 Sep 2008 01:26:30 +0000 (10:26 +0900)]
gallium: New pf_has_alpha utility function.

16 years agopython: Cleanup tri example.
José Fonseca [Thu, 4 Sep 2008 13:23:32 +0000 (22:23 +0900)]
python: Cleanup tri example.

16 years agocell: move batch buffer init code
Brian Paul [Fri, 5 Sep 2008 01:10:05 +0000 (19:10 -0600)]
cell: move batch buffer init code

16 years agocell: comments
Brian Paul [Fri, 5 Sep 2008 01:09:50 +0000 (19:09 -0600)]
cell: comments

16 years agocell: more cell_init_*_functions()
Brian Paul [Fri, 5 Sep 2008 01:00:56 +0000 (19:00 -0600)]
cell: more cell_init_*_functions()

16 years agocell: implement CELL_DEBUG env/options var
Brian Paul [Fri, 5 Sep 2008 00:36:22 +0000 (18:36 -0600)]
cell: implement CELL_DEBUG env/options var

Options so far:
  "checker"  module tile clear color by SPU ID to see where the tiles are
  "sync"  to do synchronous DMA (only partially implemented)

16 years agomesa: improved gl_buffer_object reference counting
Brian Paul [Thu, 4 Sep 2008 21:25:45 +0000 (15:25 -0600)]
mesa: improved gl_buffer_object reference counting

Use new _mesa_reference_buffer_object() function wherever possible.
Fixes buffer object/display list crash reported in ParaView.

16 years agomesa: fix minor mem leak
Brian Paul [Thu, 4 Sep 2008 21:05:03 +0000 (15:05 -0600)]
mesa: fix minor mem leak

16 years agocell: assorted comments, clean-ups, etc.
Brian Paul [Thu, 4 Sep 2008 18:36:20 +0000 (12:36 -0600)]
cell: assorted comments, clean-ups, etc.

16 years agocell: use util_surface_copy/fill()
Brian Paul [Thu, 4 Sep 2008 16:38:00 +0000 (10:38 -0600)]
cell: use util_surface_copy/fill()

16 years agocell: include p_inlines.h
Brian Paul [Thu, 4 Sep 2008 16:37:30 +0000 (10:37 -0600)]
cell: include p_inlines.h

16 years agosoftpipe: use the new util_surface_copy/fill() functions
Brian Paul [Thu, 4 Sep 2008 16:32:29 +0000 (10:32 -0600)]
softpipe: use the new util_surface_copy/fill() functions

16 years agogallium: remove the copyHeight hack for compresssed formats
Brian Paul [Thu, 4 Sep 2008 16:31:50 +0000 (10:31 -0600)]
gallium: remove the copyHeight hack for compresssed formats

16 years agogallium: new util_surface_copy() and util_surface_fill() helpers
Brian Paul [Thu, 4 Sep 2008 16:31:23 +0000 (10:31 -0600)]
gallium: new util_surface_copy() and util_surface_fill() helpers

These are plug-in fallbacks for the pipe->surface_copy() and
pipe->surface_fill() functions.

16 years agomesa: Silence compiler warnings on Windows.
Michal Krol [Thu, 4 Sep 2008 11:37:15 +0000 (13:37 +0200)]
mesa: Silence compiler warnings on Windows.

16 years agomesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24
Xiang, Haihao [Thu, 4 Sep 2008 03:32:52 +0000 (11:32 +0800)]
mesa: merge stencil values into depth values for MESA_FORMAT_S8_Z24

Cherry-picked from master

16 years agomesa: Remove unused var.
José Fonseca [Thu, 4 Sep 2008 02:15:19 +0000 (11:15 +0900)]
mesa: Remove unused var.

16 years agosoftpipe: Add missing include.
José Fonseca [Thu, 4 Sep 2008 02:15:08 +0000 (11:15 +0900)]
softpipe: Add missing include.

16 years agoi915: Add missing include.
José Fonseca [Thu, 4 Sep 2008 02:14:59 +0000 (11:14 +0900)]
i915: Add missing include.

16 years agogallium: Fix typo.
José Fonseca [Thu, 4 Sep 2008 02:14:35 +0000 (11:14 +0900)]
gallium: Fix typo.

16 years agocell: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:34:12 +0000 (09:34 +0900)]
cell: Use pipe_buffer_* inlines as much as possible.

16 years agoi915: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:34:04 +0000 (09:34 +0900)]
i915: Use pipe_buffer_* inlines as much as possible.

16 years agoi965: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:33:47 +0000 (09:33 +0900)]
i965: Use pipe_buffer_* inlines as much as possible.

16 years agosoftpipe: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:33:27 +0000 (09:33 +0900)]
softpipe: Use pipe_buffer_* inlines as much as possible.

16 years agopython: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:33:10 +0000 (09:33 +0900)]
python: Use pipe_buffer_* inlines as much as possible.

16 years agogallium: Use pipe_buffer_* inlines as much as possible.
José Fonseca [Thu, 4 Sep 2008 00:32:54 +0000 (09:32 +0900)]
gallium: Use pipe_buffer_* inlines as much as possible.

16 years agocell: flush rendering to current surfaces before installing new ones
Brian Paul [Wed, 3 Sep 2008 20:38:02 +0000 (14:38 -0600)]
cell: flush rendering to current surfaces before installing new ones

This fixes crashes when resizing windows.

16 years agocell: update comments, fix typos
Brian Paul [Wed, 3 Sep 2008 20:36:56 +0000 (14:36 -0600)]
cell: update comments, fix typos

16 years agocell: change context type passed to cell_flush_int()
Brian Paul [Wed, 3 Sep 2008 20:31:11 +0000 (14:31 -0600)]
cell: change context type passed to cell_flush_int()

16 years agogallium: comments about nblocksx/y, etc
Brian Paul [Wed, 3 Sep 2008 20:23:22 +0000 (14:23 -0600)]
gallium: comments about nblocksx/y, etc

16 years agogallium: silence warnings
Brian Paul [Wed, 3 Sep 2008 19:32:09 +0000 (13:32 -0600)]
gallium: silence warnings

16 years agocell: replace assert() with special spu ASSERT() macro
Brian Paul [Wed, 3 Sep 2008 19:31:51 +0000 (13:31 -0600)]
cell: replace assert() with special spu ASSERT() macro

16 years agocell: add pipe_texture_reference() call in cell_get_tex_surface()
Brian Paul [Wed, 3 Sep 2008 19:31:14 +0000 (13:31 -0600)]
cell: add pipe_texture_reference() call in cell_get_tex_surface()

16 years agocell: updated assertion
Brian Paul [Wed, 3 Sep 2008 19:30:46 +0000 (13:30 -0600)]
cell: updated assertion

16 years agocell: comments
Brian Paul [Wed, 3 Sep 2008 17:45:28 +0000 (11:45 -0600)]
cell: comments

16 years agogallium: do image clipping in xmesa_display_surface_tiled()
Brian Paul [Wed, 3 Sep 2008 17:44:14 +0000 (11:44 -0600)]
gallium: do image clipping in xmesa_display_surface_tiled()

16 years agocell: fix texture/surface allocation to allocate by multiple of tile size
Brian Paul [Wed, 3 Sep 2008 17:43:11 +0000 (11:43 -0600)]
cell: fix texture/surface allocation to allocate by multiple of tile size

This fixes the garbage blocks/pixels seen along the bottom of some windows.

16 years agocell: move misplaced assertions; put them after ximage is assigned.
Brian Paul [Wed, 3 Sep 2008 16:26:38 +0000 (10:26 -0600)]
cell: move misplaced assertions; put them after ximage is assigned.

16 years agoi915: Fix typo in intel_lock.c
Jakob Bornecrantz [Wed, 3 Sep 2008 13:01:19 +0000 (15:01 +0200)]
i915: Fix typo in intel_lock.c

16 years agocell: add -DDEBUG flag, fixes to Cell Makefiles
Brian Paul [Wed, 3 Sep 2008 15:31:36 +0000 (09:31 -0600)]
cell: add -DDEBUG flag, fixes to Cell Makefiles

16 years agoCell: added linux-cell-debug config
Brian Paul [Wed, 3 Sep 2008 15:08:19 +0000 (09:08 -0600)]
Cell: added linux-cell-debug config

linux-cell is now the optimized configuration.
Remove some Cell-specific stuff from winsys/xlib/Makefile.

16 years agocell: add missing cell_tex_surface_release()
Brian Paul [Wed, 27 Aug 2008 22:45:41 +0000 (16:45 -0600)]
cell: add missing cell_tex_surface_release()

16 years agogallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.
José Fonseca [Wed, 3 Sep 2008 02:48:05 +0000 (11:48 +0900)]
gallium: Have pipe_buffer_* receive a pipe_screen instead of a pipe_context.

We want to use the pipe_buffer_* inlines everywhere, but a pipe context
is not always available nor is it needed.

16 years agodraw: Describe the steps in emit_load_R32G32B32A32.
José Fonseca [Wed, 3 Sep 2008 01:30:09 +0000 (10:30 +0900)]
draw: Describe the steps in emit_load_R32G32B32A32.

16 years agofix BUFFER_DEPTH/BUFFER_ACCUM mix-up
Brian Paul [Wed, 3 Sep 2008 00:10:34 +0000 (18:10 -0600)]
fix BUFFER_DEPTH/BUFFER_ACCUM mix-up

16 years agogallium: increase string buffer size to 16000 to avoid truncated output of long shaders
Brian Paul [Wed, 3 Sep 2008 00:05:09 +0000 (18:05 -0600)]
gallium: increase string buffer size to 16000 to avoid truncated output of long shaders

16 years agogallium: fix out of bounds array errors in SSE execution
Brian Paul [Wed, 3 Sep 2008 00:04:08 +0000 (18:04 -0600)]
gallium: fix out of bounds array errors in SSE execution

1. #define MAX_INPUTS/OUTPUTS/TEMPS/etc with better values.
2. Add assertions in aos_get_x86() to check register file indexes
3. Assert that constant regs haven't changed after running SSE code.

16 years agoIntialize swizzled_surface object
Patrice Mandin [Mon, 1 Sep 2008 20:21:08 +0000 (22:21 +0200)]
Intialize swizzled_surface object

16 years agoi915: Fix typo in ws_dri_bufmgr.c
Jakob Bornecrantz [Tue, 2 Sep 2008 15:29:19 +0000 (17:29 +0200)]
i915: Fix typo in ws_dri_bufmgr.c

16 years agoi915: Small fixes for tiled textures
Jakob Bornecrantz [Tue, 2 Sep 2008 15:28:42 +0000 (17:28 +0200)]
i915: Small fixes for tiled textures

16 years agog3dvl: Use consistent variable names.
Younes Manton [Tue, 2 Sep 2008 00:22:41 +0000 (20:22 -0400)]
g3dvl: Use consistent variable names.

16 years agog3dvl: Use one VB for all MBs, sort MBs at flush to determine placement.
Younes Manton [Tue, 2 Sep 2008 00:13:50 +0000 (20:13 -0400)]
g3dvl: Use one VB for all MBs, sort MBs at flush to determine placement.

16 years agogallium: remove glthread.h file (not used)
Brian Paul [Mon, 1 Sep 2008 21:32:40 +0000 (15:32 -0600)]
gallium: remove glthread.h file (not used)

16 years agogallium: removed p_pointer.h (use util/u_pointer.h instead)
Brian Paul [Mon, 1 Sep 2008 21:31:18 +0000 (15:31 -0600)]
gallium: removed p_pointer.h (use util/u_pointer.h instead)

16 years agogallium: include u_pointer,h, not p_pointer.h
Brian Paul [Mon, 1 Sep 2008 21:30:26 +0000 (15:30 -0600)]
gallium: include u_pointer,h, not p_pointer.h

16 years agomesa: use CALLOC instead of MALLOC to fix valgrind warning
Brian Paul [Mon, 1 Sep 2008 19:10:23 +0000 (13:10 -0600)]
mesa: use CALLOC instead of MALLOC to fix valgrind warning

16 years agogallium: added st_bind/release_teximage() functions
Brian Paul [Mon, 1 Sep 2008 19:10:00 +0000 (13:10 -0600)]
gallium: added st_bind/release_teximage() functions

16 years agogallium: move st_texture_image() cast wrapper to header file
Brian Paul [Mon, 1 Sep 2008 19:09:31 +0000 (13:09 -0600)]
gallium: move st_texture_image() cast wrapper to header file

16 years agoegl: CreatePbufferSurface, Bind/ReleaseTexImage functions
Brian Paul [Mon, 1 Sep 2008 19:08:44 +0000 (13:08 -0600)]
egl: CreatePbufferSurface, Bind/ReleaseTexImage functions

16 years agoegl: additional error checking in _eglBind/ReleaseTexImage()
Brian Paul [Mon, 1 Sep 2008 19:08:12 +0000 (13:08 -0600)]
egl: additional error checking in _eglBind/ReleaseTexImage()

16 years agog3dvl: Some clean ups.
Younes Manton [Sun, 31 Aug 2008 05:01:51 +0000 (01:01 -0400)]
g3dvl: Some clean ups.

16 years agog3dvl: Inline hint for relatively small, frequently called functions.
Younes Manton [Sat, 30 Aug 2008 17:26:06 +0000 (13:26 -0400)]
g3dvl: Inline hint for relatively small, frequently called functions.

16 years agog3dvl: Re-enable buffer rotation, disable high quality 420->444 conversion.
Younes Manton [Fri, 29 Aug 2008 04:22:09 +0000 (00:22 -0400)]
g3dvl: Re-enable buffer rotation, disable high quality 420->444 conversion.

Using linear interpolation when upscaling the chroma blocks causes some
discoloration around the edges.