mesa.git
16 years agocell: Added check for PIPE_FLUSH_RENDER_CACHE to cell_flush to fix black blocks...
Jonathan White [Thu, 30 Oct 2008 17:22:20 +0000 (11:22 -0600)]
cell:  Added check for PIPE_FLUSH_RENDER_CACHE to cell_flush to fix black blocks during st_readpixels due to a flush wait not happening in order to allow any previous rendering to complete.

16 years agogallium: grow SPE instruction buffer as needed
Brian Paul [Wed, 29 Oct 2008 22:56:28 +0000 (16:56 -0600)]
gallium: grow SPE instruction buffer as needed

16 years agogallium: no longer pass max_inst to ppc_init_func()
Brian Paul [Wed, 29 Oct 2008 22:35:59 +0000 (16:35 -0600)]
gallium: no longer pass max_inst to ppc_init_func()

16 years agogallium: use execmem for PPC code, grow instruction buffer as needed
Brian Paul [Wed, 29 Oct 2008 22:26:10 +0000 (16:26 -0600)]
gallium: use execmem for PPC code, grow instruction buffer as needed

16 years agogallium: fix alignment parameter passed to u_mmAllocMem()
Brian Paul [Wed, 29 Oct 2008 20:28:57 +0000 (14:28 -0600)]
gallium: fix alignment parameter passed to u_mmAllocMem()

Was 32, now 5.  The param is expressed as a power of two exponent.
The net effect is that the alignment was a no-op on X86 but on PPC we
always got the same memory address everytime rtasm_exec_malloc() was called.

16 years agogallium: prefix memory manager functions with u_ to differentiate from functions...
Brian Paul [Wed, 29 Oct 2008 20:19:12 +0000 (14:19 -0600)]
gallium: prefix memory manager functions with u_ to differentiate from functions in mesa/main/mm.c

16 years agogallium: test for PIPE_OS_LINUX instead of __linux__
Brian Paul [Wed, 29 Oct 2008 20:08:13 +0000 (14:08 -0600)]
gallium: test for PIPE_OS_LINUX instead of __linux__

16 years agocell: add scalar param to emit_function_call() to indicate scalar function calls
Brian Paul [Wed, 29 Oct 2008 18:14:11 +0000 (12:14 -0600)]
cell: add scalar param to emit_function_call() to indicate scalar function calls

Scalar calls only use the X component of the src regs and smear the
result across the dest register's X/Y/Z/W.

16 years agocell: use simd utilities for pow, exp2, log2
Brian Paul [Wed, 29 Oct 2008 18:12:30 +0000 (12:12 -0600)]
cell: use simd utilities for pow, exp2, log2

16 years agogallium: added PPC support for SWZ, XPD, POW
Brian Paul [Wed, 29 Oct 2008 17:05:34 +0000 (11:05 -0600)]
gallium: added PPC support for SWZ, XPD, POW

That's the last of the ARB_v_p opcodes, except for ARL.

16 years agogallium: clean-ups
Brian Paul [Wed, 29 Oct 2008 17:04:05 +0000 (11:04 -0600)]
gallium: clean-ups

16 years agogallium: added ppc_vnmsubfp()
Brian Paul [Wed, 29 Oct 2008 17:03:51 +0000 (11:03 -0600)]
gallium: added ppc_vnmsubfp()

16 years agomove glut.h include
Brian Paul [Wed, 29 Oct 2008 01:01:38 +0000 (19:01 -0600)]
move glut.h include

16 years agomesa: use APP_CC compiler in progs/vp/
Brian Paul [Wed, 29 Oct 2008 01:00:56 +0000 (19:00 -0600)]
mesa: use APP_CC compiler in progs/vp/

16 years agomesa: convert log/exp tests to ARB_v_p
Brian Paul [Wed, 29 Oct 2008 01:00:25 +0000 (19:00 -0600)]
mesa: convert log/exp tests to ARB_v_p

16 years agogallium: ppc: implement TGSI_OPCODE_LOG/EXP
Brian Paul [Wed, 29 Oct 2008 00:57:54 +0000 (18:57 -0600)]
gallium: ppc: implement TGSI_OPCODE_LOG/EXP

16 years agogallium: remove old code
Brian Paul [Wed, 29 Oct 2008 00:22:14 +0000 (18:22 -0600)]
gallium: remove old code

16 years agogallium: ppc: don't replicate/smear immediate values, use vspltw instruction as with...
Brian Paul [Wed, 29 Oct 2008 00:21:03 +0000 (18:21 -0600)]
gallium: ppc: don't replicate/smear immediate values, use vspltw instruction as with constants

16 years agomesa: don't continually redraw
Brian Paul [Wed, 29 Oct 2008 00:18:31 +0000 (18:18 -0600)]
mesa: don't continually redraw

16 years agocell: fix a number of fence issues
Brian Paul [Tue, 28 Oct 2008 20:03:51 +0000 (14:03 -0600)]
cell: fix a number of fence issues

Plus add assertions to check status, alignment, etc.

16 years agogallium: use some PPC vec registers to store TGSI temps
Brian Paul [Tue, 28 Oct 2008 19:17:48 +0000 (13:17 -0600)]
gallium: use some PPC vec registers to store TGSI temps

This could be a lot better, but already makes for better code.

16 years agocell: don't include libmisc.h
Brian Paul [Tue, 28 Oct 2008 18:41:47 +0000 (12:41 -0600)]
cell: don't include libmisc.h

Doesn't seem to be needed and fixes compilation with SDK 3.1 beta.

16 years agocell: fix some problems when displaying to a PIPE_FORMAT_B8G8R8A8_UNORM screen
Brian Paul [Tue, 28 Oct 2008 00:25:33 +0000 (18:25 -0600)]
cell: fix some problems when displaying to a PIPE_FORMAT_B8G8R8A8_UNORM screen

16 years agocell: added -D_BSD_SOURCE flag
Brian Paul [Tue, 28 Oct 2008 00:15:56 +0000 (18:15 -0600)]
cell: added -D_BSD_SOURCE flag

Needed to get MAP_ANONYMOUS in execmem.c and to define timezone type in glxgears.c
Adding -std=c99 earlier caused this regression.

16 years agogallium: ppc: emit fewer 'li' instructions prior to vector loads/stores
Brian Paul [Mon, 27 Oct 2008 21:58:00 +0000 (15:58 -0600)]
gallium: ppc: emit fewer 'li' instructions prior to vector loads/stores

16 years agogallium: ppc: use a src register cache to avoid redundant loads
Brian Paul [Mon, 27 Oct 2008 21:36:25 +0000 (15:36 -0600)]
gallium: ppc: use a src register cache to avoid redundant loads

16 years agocell: Added support for untwiddling textures during glReadPixels. This allows glRea...
Jonathan White [Mon, 27 Oct 2008 22:29:20 +0000 (16:29 -0600)]
cell: Added support for untwiddling textures during glReadPixels.   This allows glReadPixels to work correctly on cell now and makes conformance tests that use pixel compares useable.

16 years agodisable OPENGL_BIT
Alan Hourihane [Mon, 27 Oct 2008 15:37:54 +0000 (15:37 +0000)]
disable OPENGL_BIT

16 years agoMerge commit 'origin/master' into gallium-0.2
Alan Hourihane [Mon, 27 Oct 2008 15:37:22 +0000 (15:37 +0000)]
Merge commit 'origin/master' into gallium-0.2

16 years agointel: GL_FALSE on a BO if it won't be modified when mapping this BO. (thanks Eric).
Xiang, Haihao [Sat, 25 Oct 2008 22:31:33 +0000 (06:31 +0800)]
intel: GL_FALSE on a BO if it won't be modified when mapping this BO. (thanks Eric).

16 years agoi965: don't emit state when dri_bufmgr_check_aperture_space fails.
Xiang, Haihao [Fri, 24 Oct 2008 08:05:48 +0000 (16:05 +0800)]
i965: don't emit state when dri_bufmgr_check_aperture_space fails.

This ensures there is an unfilled batchbuffer used for emitting states again. Partial fix for #17964.

16 years agointel: fallback for intelEmitCopyBlit.
Xiang, Haihao [Fri, 24 Oct 2008 07:55:32 +0000 (15:55 +0800)]
intel: fallback for intelEmitCopyBlit.

Use _mesa_copy_rect instead of BLT operation if dri_bufmgr_check_aperture_space
still fails after flushing batchbuffer. Partial fix for #17964.

16 years agomesa: version 43 of glext.h
Brian Paul [Thu, 23 Oct 2008 17:23:36 +0000 (11:23 -0600)]
mesa: version 43 of glext.h

16 years agomesa: version 21 of glxext.h
Brian Paul [Thu, 23 Oct 2008 17:21:32 +0000 (11:21 -0600)]
mesa: version 21 of glxext.h

16 years agomesa: remove calls to _mesa_adjust_image_for_convolution(), use texImage fields
Brian Paul [Thu, 23 Oct 2008 16:49:51 +0000 (10:49 -0600)]
mesa: remove calls to _mesa_adjust_image_for_convolution(), use texImage fields

The texImage->Width/Height fields will have the post-convolution width/height.

16 years agomesa: updated status in cell.html
Brian Paul [Thu, 23 Oct 2008 16:47:17 +0000 (10:47 -0600)]
mesa: updated status in cell.html

16 years agoscons: ppc support.
Michel Dänzer [Thu, 23 Oct 2008 08:28:48 +0000 (10:28 +0200)]
scons: ppc support.

16 years agoscons: Don't hardcode any drivers for the xlib winsys, just pick suitable ones.
Michel Dänzer [Thu, 23 Oct 2008 08:27:39 +0000 (10:27 +0200)]
scons: Don't hardcode any drivers for the xlib winsys, just pick suitable ones.

16 years agogallium: Fix typo, PPC_FEATURE_HAS_ALTIVEC not PPC_FEATURES_...
Michel Dänzer [Thu, 23 Oct 2008 08:26:19 +0000 (10:26 +0200)]
gallium: Fix typo, PPC_FEATURE_HAS_ALTIVEC not PPC_FEATURES_...

16 years agogallium: PPC: clamp y to [-128,128] for LIT
Brian Paul [Wed, 22 Oct 2008 23:29:37 +0000 (17:29 -0600)]
gallium: PPC: clamp y to [-128,128] for LIT

16 years agogallium: remove ppc_vload_float(), rename ppc_vecmove() -> ppc_vmove().
Brian Paul [Wed, 22 Oct 2008 23:21:43 +0000 (17:21 -0600)]
gallium: remove ppc_vload_float(), rename ppc_vecmove() -> ppc_vmove().

16 years agogallium: new PPC built-in constants array
Brian Paul [Wed, 22 Oct 2008 23:19:12 +0000 (17:19 -0600)]
gallium: new PPC built-in constants array

It's hard to form PPC vector immediates so load them from an array.

16 years agogallium: added ppc_vzero()
Brian Paul [Wed, 22 Oct 2008 23:17:11 +0000 (17:17 -0600)]
gallium: added ppc_vzero()

16 years agogallium: GALLIUM_NOPPC debug var to disable PPC codegen
Brian Paul [Wed, 22 Oct 2008 22:58:05 +0000 (16:58 -0600)]
gallium: GALLIUM_NOPPC debug var to disable PPC codegen

16 years agogallium: PPC LIT instruction (not quite complete yet)
Brian Paul [Wed, 22 Oct 2008 22:57:22 +0000 (16:57 -0600)]
gallium: PPC LIT instruction (not quite complete yet)

16 years agogallium: var renaming in tgsi_ppc.c
Brian Paul [Wed, 22 Oct 2008 21:34:16 +0000 (15:34 -0600)]
gallium: var renaming in tgsi_ppc.c

16 years agogallium: remove SSE remnants from tgsi_ppc.c
Brian Paul [Wed, 22 Oct 2008 21:30:00 +0000 (15:30 -0600)]
gallium: remove SSE remnants from tgsi_ppc.c

16 years agocell: turn on PPC assembly vertex transform
Brian Paul [Wed, 22 Oct 2008 21:25:04 +0000 (15:25 -0600)]
cell: turn on PPC assembly vertex transform

gears runs with it now (3x faster FPS than before).

16 years agocell: TGSI->PPC for RSQ, RCP and src register sign modes
Brian Paul [Wed, 22 Oct 2008 21:21:22 +0000 (15:21 -0600)]
cell: TGSI->PPC for RSQ, RCP and src register sign modes

16 years agogallium: TGSI->PPC inequality operators
Brian Paul [Wed, 22 Oct 2008 20:48:58 +0000 (14:48 -0600)]
gallium: TGSI->PPC inequality operators

16 years agogallium: added ppc_vload_float(), for limited cases
Brian Paul [Wed, 22 Oct 2008 20:48:33 +0000 (14:48 -0600)]
gallium: added ppc_vload_float(), for limited cases

16 years agogallium: fix broken TGSI_FILE_CONSTANT case, use ppc_reserver_register()
Brian Paul [Wed, 22 Oct 2008 19:59:11 +0000 (13:59 -0600)]
gallium: fix broken TGSI_FILE_CONSTANT case, use ppc_reserver_register()

16 years agogallium: fix-up confusing register allocation masks in rtasm_ppc.c
Brian Paul [Wed, 22 Oct 2008 19:57:56 +0000 (13:57 -0600)]
gallium: fix-up confusing register allocation masks in rtasm_ppc.c

Plus, add ppc_reserve_register() func.

16 years agocell: add -std=c99 flag to solve some warning/prototype issues
Brian Paul [Wed, 22 Oct 2008 17:13:55 +0000 (11:13 -0600)]
cell: add -std=c99 flag to solve some warning/prototype issues

16 years agogallium: temporarily disable PPC vertex shader until more things run
Brian Paul [Wed, 22 Oct 2008 17:13:31 +0000 (11:13 -0600)]
gallium: temporarily disable PPC vertex shader until more things run

16 years agogallium: PPC vertex shader support
Brian Paul [Wed, 22 Oct 2008 17:08:45 +0000 (11:08 -0600)]
gallium: PPC vertex shader support

Works, but dead code lingering, debug code present, etc.

16 years agogallium: TGSI to PPC code generation
Brian Paul [Wed, 22 Oct 2008 17:07:35 +0000 (11:07 -0600)]
gallium: TGSI to PPC code generation

Based on the TGSIto SSE2 code generator.
Incomplete and lots of SSE stuff still hanging around but the basic dozen
or so TGSI opcodes are functioning.

16 years agogallium: added ppc_lvewx()
Brian Paul [Wed, 22 Oct 2008 17:06:39 +0000 (11:06 -0600)]
gallium: added ppc_lvewx()

16 years agocell: include pthread.h
Brian Paul [Wed, 22 Oct 2008 17:04:29 +0000 (11:04 -0600)]
cell: include pthread.h

16 years agocell: implement many more PPC instructions for code gen
Brian Paul [Wed, 22 Oct 2008 16:35:38 +0000 (10:35 -0600)]
cell: implement many more PPC instructions for code gen

16 years agocell: implement fencing for texture buffers
Brian Paul [Wed, 22 Oct 2008 16:34:13 +0000 (10:34 -0600)]
cell: implement fencing for texture buffers

If we delete a texture, we need to keep the underlying tiled data buffer
around until any rendering that references it has completed.
Keep a list of buffers referenced by a rendering batch.  Unref/free them when
the associated batch's fence is executed/signalled.

16 years agocell: set cell->num_textures
Brian Paul [Wed, 22 Oct 2008 16:30:12 +0000 (10:30 -0600)]
cell: set cell->num_textures

16 years agocell: note that dst reg writing needs clamping
Brian Paul [Wed, 22 Oct 2008 14:12:42 +0000 (08:12 -0600)]
cell: note that dst reg writing needs clamping

16 years agomesa: move convolution image adjustment code for glCopyTexSubImage1/2/3D()
Brian Paul [Wed, 22 Oct 2008 13:53:26 +0000 (07:53 -0600)]
mesa: move convolution image adjustment code for glCopyTexSubImage1/2/3D()

Do it after initial error checking, after we know the texture's internal format.

16 years agomesa: some re-org of glCopyTexSubImage1/2/3D() error checking
Brian Paul [Wed, 22 Oct 2008 13:48:37 +0000 (07:48 -0600)]
mesa: some re-org of glCopyTexSubImage1/2/3D() error checking

16 years agomesa: in textore.c, only adjust image for convolution if image is a color format
Brian Paul [Wed, 22 Oct 2008 13:36:33 +0000 (07:36 -0600)]
mesa: in textore.c, only adjust image for convolution if image is a color format

Makes things consistant with the code in teximage.c.
We only want to apply convolution to color formats (not depth/index formats)

16 years agogallium: implement tests for PPC/PPC64
Brian Paul [Tue, 21 Oct 2008 20:12:17 +0000 (14:12 -0600)]
gallium: implement tests for PPC/PPC64

16 years agogallium: remove unused var
Brian Paul [Tue, 21 Oct 2008 20:10:09 +0000 (14:10 -0600)]
gallium: remove unused var

16 years agoglx: updated comment
Kristof Ralovich [Tue, 21 Oct 2008 14:20:24 +0000 (08:20 -0600)]
glx: updated comment

16 years agoi915: fix carsh in i830_emit_state. (bug #17766)
Xiang, Haihao [Tue, 21 Oct 2008 02:30:39 +0000 (10:30 +0800)]
i915: fix carsh in i830_emit_state. (bug #17766)

16 years agomesa: more test options in progs/demos/textures.c
Brian Paul [Mon, 20 Oct 2008 23:43:05 +0000 (17:43 -0600)]
mesa: more test options in progs/demos/textures.c

16 years agocell: minor improvements to batch buffer functions
Brian Paul [Mon, 20 Oct 2008 21:44:22 +0000 (15:44 -0600)]
cell: minor improvements to batch buffer functions

16 years agocell: temporarily disable freeing of tiled texture memory
Brian Paul [Mon, 20 Oct 2008 15:35:18 +0000 (09:35 -0600)]
cell: temporarily disable freeing of tiled texture memory

Allows glDrawPixels to work for now...

16 years agocell: use an approximation in compute_lambda_2d() to avoid sqrt
Brian Paul [Fri, 17 Oct 2008 15:09:57 +0000 (09:09 -0600)]
cell: use an approximation in compute_lambda_2d() to avoid sqrt

Though, the logf() call still needs attention.

16 years agocell: add new debug flag (cache) to report texture cache stats on exit
Brian Paul [Fri, 17 Oct 2008 02:25:28 +0000 (20:25 -0600)]
cell: add new debug flag (cache) to report texture cache stats on exit

16 years agocell: more efficient state emit for textures/samplers
Brian Paul [Thu, 16 Oct 2008 22:51:23 +0000 (16:51 -0600)]
cell: more efficient state emit for textures/samplers

16 years agocell: use 7-bit weights in sample_texture_2d_bilinear_int()
Brian Paul [Thu, 16 Oct 2008 21:48:04 +0000 (15:48 -0600)]
cell: use 7-bit weights in sample_texture_2d_bilinear_int()

This allows us to use 16-bit signed mul/add instructions.  Had to
used unsigned mul before and there's no unsigned mul/add instruction.

16 years agoMerge commit 'origin/gallium-0.1' into gallium-0.2
Brian Paul [Fri, 17 Oct 2008 20:13:00 +0000 (14:13 -0600)]
Merge commit 'origin/gallium-0.1' into gallium-0.2

Conflicts:

progs/trivial/tri.c

16 years agomesa: redraw upon keypress in trivial/tri.c
Brian Paul [Fri, 17 Oct 2008 19:37:11 +0000 (13:37 -0600)]
mesa: redraw upon keypress in trivial/tri.c

16 years agogallium: fix mis-matched malloc/free vs. aligned malloc/free
Brian Paul [Fri, 17 Oct 2008 19:35:42 +0000 (13:35 -0600)]
gallium: fix mis-matched malloc/free vs. aligned malloc/free

Use aligned malloc/free for teximage data everywhere to be consistant.
The mismatch didn't make any difference when HAVE_POSIX_MEMALIGN was defined.

16 years agobuild "GLX" egl driver by default and egl demos
Alan Hourihane [Thu, 16 Oct 2008 22:41:13 +0000 (23:41 +0100)]
build "GLX" egl driver by default and egl demos

16 years agoglxswapcontrol: added -fullscreen option
Brian Paul [Thu, 16 Oct 2008 20:21:17 +0000 (14:21 -0600)]
glxswapcontrol: added -fullscreen option

16 years agoglxgears: for fullscreen, disable window borders the right way
Brian Paul [Thu, 16 Oct 2008 20:16:41 +0000 (14:16 -0600)]
glxgears: for fullscreen, disable window borders the right way

16 years agocell: pass spu_texture_level ptr to get_four_texels()
Brian Paul [Thu, 16 Oct 2008 19:54:17 +0000 (13:54 -0600)]
cell: pass spu_texture_level ptr to get_four_texels()

16 years agocell: implement KIL instruction
Brian Paul [Thu, 16 Oct 2008 19:49:42 +0000 (13:49 -0600)]
cell: implement KIL instruction

16 years agocell: CELL_NUM_SPUS env var
Brian Paul [Thu, 16 Oct 2008 17:48:05 +0000 (11:48 -0600)]
cell: CELL_NUM_SPUS env var

16 years agocell: trilinear mipmap interpolation
Brian Paul [Thu, 16 Oct 2008 17:19:22 +0000 (11:19 -0600)]
cell: trilinear mipmap interpolation

16 years agocell: update comments
Brian Paul [Thu, 16 Oct 2008 15:52:02 +0000 (09:52 -0600)]
cell: update comments

16 years agocell: call proper sampler function in sample_texture_cube()
Brian Paul [Thu, 16 Oct 2008 15:33:45 +0000 (09:33 -0600)]
cell: call proper sampler function in sample_texture_cube()

16 years agocell: clean up various texture-related things
Brian Paul [Thu, 16 Oct 2008 15:00:05 +0000 (09:00 -0600)]
cell: clean up various texture-related things

Distinguish among texture targets in codegen.
progs/demos/cubemap.c runs correctly now too.

16 years agofix span issue with really old ddx and non-tcl r100 chips
Roland Scheidegger [Thu, 16 Oct 2008 14:23:47 +0000 (16:23 +0200)]
fix span issue with really old ddx and non-tcl r100 chips

16 years agomesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861
Brian Paul [Thu, 16 Oct 2008 14:23:28 +0000 (08:23 -0600)]
mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861

16 years agocell: start some performance measurements
Brian Paul [Thu, 16 Oct 2008 02:46:43 +0000 (20:46 -0600)]
cell: start some performance measurements

Use the spu_write_decrementer() and spu_read_decrementer() functions to
measure time.  Convert to milliseconds according to the system timebase value.

16 years agocell: updated debug code
Brian Paul [Thu, 16 Oct 2008 01:40:51 +0000 (19:40 -0600)]
cell: updated debug code

16 years agocell: updated status in docs/cell.html
Brian Paul [Wed, 15 Oct 2008 21:46:53 +0000 (15:46 -0600)]
cell: updated status in docs/cell.html

16 years agocell: get rid of last usage of float4 union/typedef
Brian Paul [Wed, 15 Oct 2008 21:34:02 +0000 (15:34 -0600)]
cell: get rid of last usage of float4 union/typedef

Results in slightly tighter code.

16 years agocell: simplify triangle front/back face determination
Brian Paul [Wed, 15 Oct 2008 21:20:09 +0000 (15:20 -0600)]
cell: simplify triangle front/back face determination

16 years agocell: send rasterizer state to SPUs in proper way, remove front_winding hack
Brian Paul [Wed, 15 Oct 2008 20:39:16 +0000 (14:39 -0600)]
cell: send rasterizer state to SPUs in proper way, remove front_winding hack

16 years agocell: query # cells too
Brian Paul [Wed, 15 Oct 2008 20:26:08 +0000 (14:26 -0600)]
cell: query # cells too

16 years agocell: query number SPUs with spe_cpu_info_get()
Brian Paul [Wed, 15 Oct 2008 20:20:10 +0000 (14:20 -0600)]
cell: query number SPUs with spe_cpu_info_get()