profile/ivi/mesa.git
16 years agogallium: fix the compressed texture hack in st_texture_image_copy()
Brian Paul [Fri, 25 Apr 2008 16:33:48 +0000 (10:33 -0600)]
gallium: fix the compressed texture hack in st_texture_image_copy()

Actually, the hack is still there and needs to be revisited, but I get a bit
further with compressed textures now.

16 years agoscons: A few fixes for building mesa on windows.
José Fonseca [Fri, 25 Apr 2008 16:14:32 +0000 (01:14 +0900)]
scons: A few fixes for building mesa on windows.

16 years agodraw: emit extra flags whenever pipeline is active
Keith Whitwell [Fri, 25 Apr 2008 15:16:06 +0000 (16:16 +0100)]
draw: emit extra flags whenever pipeline is active

The assert was in fact over-sensitive, but emitting the extra flags
is pretty trivial & we may as well just do it whenever we know the
pipeline is running.

16 years agogallium: Use util_blit_pixels() for glCopyTexSubImage when appropriate.
Michel Dänzer [Fri, 25 Apr 2008 14:01:09 +0000 (15:01 +0100)]
gallium: Use util_blit_pixels() for glCopyTexSubImage when appropriate.

16 years agogallium: Add draw_pt_varray.c to scons build.
Michel Dänzer [Fri, 25 Apr 2008 13:57:50 +0000 (14:57 +0100)]
gallium: Add draw_pt_varray.c to scons build.

16 years agotgsi: fix compile when HIGH_PRECISION not defined
Keith Whitwell [Fri, 25 Apr 2008 13:20:02 +0000 (14:20 +0100)]
tgsi: fix compile when HIGH_PRECISION not defined

16 years agodraw: no need to special-case elts/get_elts for varray frontend
Keith Whitwell [Fri, 25 Apr 2008 13:10:32 +0000 (14:10 +0100)]
draw: no need to special-case elts/get_elts for varray frontend

16 years agodraw: remove unused vars
Keith Whitwell [Fri, 25 Apr 2008 13:10:02 +0000 (14:10 +0100)]
draw: remove unused vars

16 years agofrontend for rendering without elts
Zack Rusin [Thu, 24 Apr 2008 20:22:47 +0000 (16:22 -0400)]
frontend for rendering without elts

16 years agoscons: More windows userspace fixes.
José Fonseca [Fri, 25 Apr 2008 10:53:13 +0000 (19:53 +0900)]
scons: More windows userspace fixes.

16 years agogallium: Tell the driver the texture is updated when we finish rendering to it.
Michel Dänzer [Fri, 25 Apr 2008 09:34:20 +0000 (10:34 +0100)]
gallium: Tell the driver the texture is updated when we finish rendering to it.

16 years agogallium: Windows user mode portability fixes.
José Fonseca [Fri, 25 Apr 2008 09:19:51 +0000 (18:19 +0900)]
gallium: Windows user mode portability fixes.

16 years agogallium: New configuration header.
José Fonseca [Fri, 25 Apr 2008 09:18:48 +0000 (18:18 +0900)]
gallium: New configuration header.

To abstract all those weird #ifdef (__???__) checks.

It should typically be the first included header.

16 years agoscons: Teach scons about user-land windows.
José Fonseca [Fri, 25 Apr 2008 09:16:25 +0000 (18:16 +0900)]
scons: Teach scons about user-land windows.

Actually, more like get rid of all our hacks when compiling for
user-land windows.

Only MSVC is supported atm though.

16 years agogallium: fix an edgeflags crash
Brian Paul [Thu, 24 Apr 2008 22:40:08 +0000 (16:40 -0600)]
gallium: fix an edgeflags crash

16 years agodraw: remove old assignment of edgeflag value
Keith Whitwell [Thu, 24 Apr 2008 22:31:35 +0000 (23:31 +0100)]
draw: remove old assignment of edgeflag value

16 years agogallium: initial edgeflags code
Brian Paul [Thu, 24 Apr 2008 22:01:18 +0000 (16:01 -0600)]
gallium: initial edgeflags code

16 years agogallium: plug in softpipe_set_edgeflags() function
Brian Paul [Thu, 24 Apr 2008 21:59:08 +0000 (15:59 -0600)]
gallium: plug in softpipe_set_edgeflags() function

16 years agogallium: comments
Brian Paul [Thu, 24 Apr 2008 21:58:46 +0000 (15:58 -0600)]
gallium: comments

16 years agodraw: default edgeflag should be one
Keith Whitwell [Thu, 24 Apr 2008 20:13:56 +0000 (21:13 +0100)]
draw: default edgeflag should be one

16 years agogallium: disable the bitmap/texcoord bias
Brian Paul [Thu, 24 Apr 2008 19:44:40 +0000 (13:44 -0600)]
gallium: disable the bitmap/texcoord bias

Doesn't seem to be needed after fixing the float->int conversion problem.

16 years agomesa: adjust glBitmap coords by a small epsilon
Brian Paul [Thu, 24 Apr 2008 19:36:26 +0000 (13:36 -0600)]
mesa: adjust glBitmap coords by a small epsilon

Fixes problem with bitmaps jumping around by one pixel depending on window
size.  The rasterpos is often X.9999 instead of X+1.
Run progs/redbook/drawf and resize window to check.

16 years agogallium: use cso_destroy_vertex/fragment_shader() functions
Brian Paul [Thu, 24 Apr 2008 18:11:24 +0000 (12:11 -0600)]
gallium: use cso_destroy_vertex/fragment_shader() functions

Also, rearrange the st_destroy_context() code a bit to prevent some
invalid/NULL ptr derefs during tear-down.

16 years agogallium: make cso_release_all() public
Brian Paul [Thu, 24 Apr 2008 18:10:14 +0000 (12:10 -0600)]
gallium: make cso_release_all() public

16 years agogallium: minor clean-ups, comments
Brian Paul [Thu, 24 Apr 2008 17:59:22 +0000 (11:59 -0600)]
gallium: minor clean-ups, comments

16 years agogallium: tweak the new shader delete funcs
Brian Paul [Thu, 24 Apr 2008 17:56:06 +0000 (11:56 -0600)]
gallium: tweak the new shader delete funcs

16 years agogallium: added cso_delete_vertex_fragment_shader() functions
Brian Paul [Thu, 24 Apr 2008 17:52:37 +0000 (11:52 -0600)]
gallium: added cso_delete_vertex_fragment_shader() functions

The state tracker now uses these functions to free shaders, rather than
the pipe->delete_vs/fs-state() functions.  Before, we could get in a situation
where we free() a shader and happen to alloc() a new one at the same address.
The cso_set_vertex/fragment_shader() function would no-op the state change
since the pointers were the same.  This led to problems elsewhere, of course.

The new delete functions null-out the CSO's current shader pointers.

16 years agogallium: Make sure the size of non-existent storage components is set to 0.
Michel Dänzer [Thu, 24 Apr 2008 17:39:25 +0000 (18:39 +0100)]
gallium: Make sure the size of non-existent storage components is set to 0.

Before adding support for formats with unused storage components, the size of
components swizzled to 0 or 1 was ignored, so this didn't matter.

16 years agoi915: Fix for wrong texture in texobj with VBUF
Jakob Bornecrantz [Thu, 24 Apr 2008 15:07:45 +0000 (17:07 +0200)]
i915: Fix for wrong texture in texobj with VBUF

16 years agotranslate: Actually return a value from translate_cache_create().
Michal Krol [Thu, 24 Apr 2008 12:05:39 +0000 (14:05 +0200)]
translate: Actually return a value from translate_cache_create().

16 years agotrivial: simple edgeflag test
Keith Whitwell [Thu, 24 Apr 2008 11:38:58 +0000 (12:38 +0100)]
trivial: simple edgeflag test

16 years agodraw: handle edgeflags and reset-line-stipple again
Keith Whitwell [Thu, 24 Apr 2008 11:38:15 +0000 (12:38 +0100)]
draw: handle edgeflags and reset-line-stipple again

16 years agoxlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates...
Keith Whitwell [Thu, 24 Apr 2008 11:36:04 +0000 (12:36 +0100)]
xlib: only shortcircuit makecurrent if NO_RAST set, otherwise window size updates fail

16 years agogallium: Initial support for pixel formats with unused storage components.
Michel Dänzer [Thu, 24 Apr 2008 09:12:07 +0000 (10:12 +0100)]
gallium: Initial support for pixel formats with unused storage components.

Also clarify that RGB formats with no (used) alpha component are treated as
having alpha = 1.0.

16 years agogallium: reorder code to fix a recursive flush
Brian Paul [Thu, 24 Apr 2008 00:09:20 +0000 (18:09 -0600)]
gallium: reorder code to fix a recursive flush

16 years agogallium: fix issues in recursive flushing
Brian Paul [Thu, 24 Apr 2008 00:08:20 +0000 (18:08 -0600)]
gallium: fix issues in recursive flushing

When flushing/rendering, some stages (like AA line/point) need to set
pipe/driver state.  Those driver functions often call draw_flush().
That leads to recursion.

Use new draw->suspend_flush flag to explicitly prevent that in the key places.
Remove the draw->vcache_flushing field.
Reuse draw->flushing as a debug/assertion var.

16 years agogallium: fix comments
Brian Paul [Wed, 23 Apr 2008 23:41:30 +0000 (17:41 -0600)]
gallium: fix comments

16 years agogallium: fix comments, whitespace changes
Brian Paul [Wed, 23 Apr 2008 23:40:39 +0000 (17:40 -0600)]
gallium: fix comments, whitespace changes

16 years agogallium: passthrough tri, not point
Brian Paul [Wed, 23 Apr 2008 18:11:00 +0000 (12:11 -0600)]
gallium: passthrough tri, not point

16 years agoAdd translate cache to fetch_emit stage and add out of memory
Zack Rusin [Wed, 23 Apr 2008 18:07:53 +0000 (14:07 -0400)]
Add translate cache to fetch_emit stage and add out of memory
checks to code creating the cache.

16 years agoCreate a sharable translate_cache and use it.
Zack Rusin [Wed, 23 Apr 2008 18:00:13 +0000 (14:00 -0400)]
Create a sharable translate_cache and use it.

16 years agogallium: fix potential divide by zero in fog computation
Brian Paul [Wed, 23 Apr 2008 17:37:49 +0000 (11:37 -0600)]
gallium: fix potential divide by zero in fog computation

It's legal for Fog.Start == Fog.End and conformance testing does so.

16 years agogallium: additional debug code
Brian Paul [Wed, 23 Apr 2008 17:36:47 +0000 (11:36 -0600)]
gallium: additional debug code

16 years agogallium: move logicop test outside of loop
Brian Paul [Wed, 23 Apr 2008 17:24:42 +0000 (11:24 -0600)]
gallium: move logicop test outside of loop

16 years agogallium: fix broken PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE
Brian Paul [Wed, 23 Apr 2008 17:23:12 +0000 (11:23 -0600)]
gallium: fix broken PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE

16 years agogallium: more vertex debug code
Brian Paul [Wed, 23 Apr 2008 17:22:18 +0000 (11:22 -0600)]
gallium: more vertex debug code

16 years agofix the simple hash finding function and use it
Zack Rusin [Wed, 23 Apr 2008 17:32:41 +0000 (13:32 -0400)]
fix the simple hash finding function and use it

16 years agogallium: Fix texture refcount leak.
José Fonseca [Wed, 23 Apr 2008 17:13:31 +0000 (02:13 +0900)]
gallium: Fix texture refcount leak.

16 years agopipebuffer: New function to flush the buffer cache.
José Fonseca [Wed, 23 Apr 2008 16:59:57 +0000 (01:59 +0900)]
pipebuffer: New function to flush the buffer cache.

16 years agogallium: Add extern "C" to the headers.
José Fonseca [Wed, 23 Apr 2008 15:10:51 +0000 (00:10 +0900)]
gallium: Add extern "C" to the headers.

16 years agogallium: fix broken hashing for vertex translation
Brian Paul [Wed, 23 Apr 2008 16:29:52 +0000 (10:29 -0600)]
gallium: fix broken hashing for vertex translation

It seems we get hash collisions fairly easily and the code as it was didn't
deal with that properly.

I think we need a simpler hashing interface...

16 years agodraw: remove stupid debug (Keith)
Keith Whitwell [Wed, 23 Apr 2008 12:56:05 +0000 (13:56 +0100)]
draw: remove stupid debug (Keith)

16 years agodraw: add missing break (Jakob)
Keith Whitwell [Wed, 23 Apr 2008 12:51:50 +0000 (13:51 +0100)]
draw: add missing break (Jakob)

16 years agomesa: add dedicated point-wide-smooth test, restore original tri.c as tri-orig.c
Keith Whitwell [Wed, 23 Apr 2008 12:10:13 +0000 (13:10 +0100)]
mesa: add dedicated point-wide-smooth test, restore original tri.c as tri-orig.c

16 years agofix non-i386 builds
Ben Skeggs [Wed, 23 Apr 2008 02:38:37 +0000 (12:38 +1000)]
fix non-i386 builds

16 years agogallium: added a flushing_vcache flag, test in draw_do_flush()
Brian Paul [Wed, 23 Apr 2008 01:11:59 +0000 (19:11 -0600)]
gallium: added a flushing_vcache flag, test in draw_do_flush()

Fixes broken polygon stipple, aaline, aapoint stages

16 years agogallium: fix bad logic in bind_pstip_fragment_shader(): use &&, not ||
Brian Paul [Wed, 23 Apr 2008 01:10:52 +0000 (19:10 -0600)]
gallium: fix bad logic in bind_pstip_fragment_shader(): use &&, not ||

16 years agogallium: fix some bitmap frag shader issues
Brian Paul [Wed, 23 Apr 2008 00:38:37 +0000 (18:38 -0600)]
gallium: fix some bitmap frag shader issues

If texturing happens to be enabled when glBitmap() is called, need to be
careful about choosing a sampler unit, etc.

16 years agogallium: don't set buffer status to undefined in display_front_buffer()
Brian Paul [Wed, 23 Apr 2008 00:38:13 +0000 (18:38 -0600)]
gallium: don't set buffer status to undefined in display_front_buffer()

16 years agoIn case the 'func' is deleting the state move the iterator before
Zack Rusin [Tue, 22 Apr 2008 22:32:29 +0000 (18:32 -0400)]
In case the 'func' is deleting the state move the iterator before
calling it.

16 years agoFix a crash. Rasterizer can be null
Zack Rusin [Tue, 22 Apr 2008 22:30:31 +0000 (18:30 -0400)]
Fix a crash. Rasterizer can be null

16 years agoCache translate's structs for emits and fetches.
Zack Rusin [Tue, 22 Apr 2008 22:20:34 +0000 (18:20 -0400)]
Cache translate's structs for emits and fetches.

Results in a fair speed improvement.

16 years agoFix reporting of clipped vertices.
Zack Rusin [Tue, 22 Apr 2008 22:11:58 +0000 (18:11 -0400)]
Fix reporting of clipped vertices.

16 years agogallium: setup an identity viewport
Brian Paul [Tue, 22 Apr 2008 22:29:48 +0000 (16:29 -0600)]
gallium: setup an identity viewport

This fixes broken blits.

16 years agogallium: update comment about bypass clipping/viewport
Brian Paul [Tue, 22 Apr 2008 22:25:55 +0000 (16:25 -0600)]
gallium: update comment about bypass clipping/viewport

16 years agogallium: setup an identity viewport
Brian Paul [Tue, 22 Apr 2008 22:22:21 +0000 (16:22 -0600)]
gallium: setup an identity viewport

16 years agogallium: move the vertex print/debug code
Brian Paul [Tue, 22 Apr 2008 22:15:49 +0000 (16:15 -0600)]
gallium: move the vertex print/debug code

16 years agogallium: remove assertions
Brian Paul [Tue, 22 Apr 2008 20:42:36 +0000 (14:42 -0600)]
gallium: remove assertions

It's possible the current vs/fs is null when cso_save_vertex/fragment_shader()
is called.

16 years agogallium: st_translate_fragment_program() is void now
Brian Paul [Tue, 22 Apr 2008 20:41:32 +0000 (14:41 -0600)]
gallium: st_translate_fragment_program() is void now

The return value was never used.

16 years agoRevert "softpipe: squash warning"
Keith Whitwell [Tue, 22 Apr 2008 20:17:21 +0000 (21:17 +0100)]
Revert "softpipe: squash warning"

This reverts commit 1f0f029ba6f22ef4ada01fcdc153da91571a7963.

Which broke the debug build.

16 years agodraw: allow drivers to query pipeline state more easily
Keith Whitwell [Tue, 22 Apr 2008 19:50:20 +0000 (20:50 +0100)]
draw: allow drivers to query pipeline state more easily

Also, provide a separate flag to say whether the driver can handle
clipping/rhw tasks, in addition to the API flag which indicates they
have already been done.

16 years agosoftpipe: squash warning
Keith Whitwell [Tue, 22 Apr 2008 19:32:22 +0000 (20:32 +0100)]
softpipe: squash warning

16 years agocso: fix vs/fs confusion
Keith Whitwell [Tue, 22 Apr 2008 14:26:38 +0000 (15:26 +0100)]
cso: fix vs/fs confusion

16 years agosoftpipe: do something sensible on an error path, squash warning
Keith Whitwell [Tue, 22 Apr 2008 14:15:21 +0000 (15:15 +0100)]
softpipe: do something sensible on an error path, squash warning

16 years agogallium: How about restoring shaders instead of saving them again...
Michel Dänzer [Tue, 22 Apr 2008 13:22:11 +0000 (14:22 +0100)]
gallium: How about restoring shaders instead of saving them again...

16 years agogallium: Don't link x86sse.c into libmesa.a.
Michel Dänzer [Tue, 22 Apr 2008 11:18:31 +0000 (12:18 +0100)]
gallium: Don't link x86sse.c into libmesa.a.

Otherwise we get a symbol clash with the copy in src/gallium/util .

16 years agopipebuffer: Temporarily allow simultaneous CPU writes.
José Fonseca [Tue, 22 Apr 2008 10:47:02 +0000 (19:47 +0900)]
pipebuffer: Temporarily allow simultaneous CPU writes.

Also, fast path for re-fencing the same buffer multiple times with the same fence.

16 years agodraw: disable broken edgeflag code - didn't work & was killing performance
Keith Whitwell [Tue, 22 Apr 2008 10:26:07 +0000 (11:26 +0100)]
draw: disable broken edgeflag code - didn't work & was killing performance

16 years agoxlib: shortcircuit no-op makecurrent
Keith Whitwell [Tue, 22 Apr 2008 10:15:51 +0000 (11:15 +0100)]
xlib: shortcircuit no-op makecurrent

16 years agoxlib: implement SP_NO_RAST env var
Keith Whitwell [Tue, 22 Apr 2008 10:01:56 +0000 (11:01 +0100)]
xlib: implement SP_NO_RAST env var

16 years agosoftpipe: implement SP_NO_RAST env var
Keith Whitwell [Tue, 22 Apr 2008 10:01:41 +0000 (11:01 +0100)]
softpipe: implement SP_NO_RAST env var

16 years agosoftpipe: make NUM_ENTRIES 32 so that div/mods are easier
Keith Whitwell [Tue, 22 Apr 2008 09:57:06 +0000 (10:57 +0100)]
softpipe: make NUM_ENTRIES 32 so that div/mods are easier

16 years agocso: Fix build on Win32.
Michal Krol [Tue, 22 Apr 2008 09:26:26 +0000 (11:26 +0200)]
cso: Fix build on Win32.

16 years agomake the api consistent (all set functions return pipe_error status)
Zack Rusin [Mon, 21 Apr 2008 20:40:27 +0000 (16:40 -0400)]
make the api consistent (all set functions return pipe_error status)

16 years agohandle some of the possible allocation failures within the hash itself
Zack Rusin [Mon, 21 Apr 2008 20:04:27 +0000 (16:04 -0400)]
handle some of the possible allocation failures within the hash itself

16 years agoinitial stab at error handling in cso
Zack Rusin [Mon, 21 Apr 2008 19:44:51 +0000 (15:44 -0400)]
initial stab at error handling in cso

16 years agocso: disable not-really-working cso_set_*_shader() funcs
Keith Whitwell [Mon, 21 Apr 2008 20:05:11 +0000 (21:05 +0100)]
cso: disable not-really-working cso_set_*_shader() funcs

16 years agodraw: squash a couple of memory leaks
Keith Whitwell [Mon, 21 Apr 2008 20:01:38 +0000 (21:01 +0100)]
draw: squash a couple of memory leaks

16 years agouse cso fs/vs handle functions
Keith Whitwell [Mon, 21 Apr 2008 19:26:19 +0000 (20:26 +0100)]
use cso fs/vs handle functions

16 years agocso: provide functions to bind fs/vs handles directly
Keith Whitwell [Mon, 21 Apr 2008 19:25:47 +0000 (20:25 +0100)]
cso: provide functions to bind fs/vs handles directly

16 years agomesa: remove st_cache.c
Keith Whitwell [Mon, 21 Apr 2008 19:25:06 +0000 (20:25 +0100)]
mesa: remove st_cache.c

16 years agoUse llvm 2.3 (2.2 won't work because of a lot of problems, e.g.
Zack Rusin [Mon, 21 Apr 2008 19:15:31 +0000 (15:15 -0400)]
Use llvm 2.3 (2.2 won't work because of a lot of problems, e.g.
lack of constant vectors handling in execution engine)

16 years agortasm: debug some missing funcs
Keith Whitwell [Mon, 21 Apr 2008 18:48:21 +0000 (19:48 +0100)]
rtasm: debug some missing funcs

16 years agortasm: quieten sse_enabled debug
Keith Whitwell [Mon, 21 Apr 2008 18:48:08 +0000 (19:48 +0100)]
rtasm: quieten sse_enabled debug

16 years agortasm: clean up debug dumping a little
Keith Whitwell [Mon, 21 Apr 2008 18:43:53 +0000 (19:43 +0100)]
rtasm: clean up debug dumping a little

16 years agocso: propogate one easy error - many more
Keith Whitwell [Mon, 21 Apr 2008 18:11:58 +0000 (19:11 +0100)]
cso: propogate one easy error - many more

16 years agotranslate: fail on x86 rtasm fail
Keith Whitwell [Mon, 21 Apr 2008 18:09:54 +0000 (19:09 +0100)]
translate: fail on x86 rtasm fail

16 years agortasm: propogate errors in x86 emit
Keith Whitwell [Mon, 21 Apr 2008 18:09:38 +0000 (19:09 +0100)]
rtasm: propogate errors in x86 emit

16 years agogallium: Use CSO cache for shaders.
Michel Dänzer [Mon, 21 Apr 2008 16:51:39 +0000 (17:51 +0100)]
gallium: Use CSO cache for shaders.

16 years agoactually write the results
Zack Rusin [Mon, 21 Apr 2008 16:42:37 +0000 (12:42 -0400)]
actually write the results