platform/upstream/mesa.git
16 years agofix program delete/refcount bug
Brian Paul [Sun, 18 May 2008 22:37:35 +0000 (16:37 -0600)]
fix program delete/refcount bug

16 years agoMerge branch 'gallium-0.1' into gallium-tex-surfaces
Brian Paul [Sun, 18 May 2008 22:17:50 +0000 (16:17 -0600)]
Merge branch 'gallium-0.1' into gallium-tex-surfaces

16 years agoprint vertex.attrib[n] (from master)
Brian Paul [Sun, 18 May 2008 21:46:58 +0000 (15:46 -0600)]
print vertex.attrib[n] (from master)

16 years agoFix some bugs in material, depth range state
Brian Paul [Sun, 18 May 2008 21:32:58 +0000 (15:32 -0600)]
Fix some bugs in material, depth range state

picked from master

16 years agoRegenerated API dispatch files
Brian Paul [Sun, 18 May 2008 21:23:03 +0000 (15:23 -0600)]
Regenerated API dispatch files

Follow on to cherry-pick from master

16 years agoalias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935)
Brian Paul [Sun, 18 May 2008 21:21:28 +0000 (15:21 -0600)]
alias ProgramEnvParameter4xyARB and ProgramParameter4xyNV (bug #12935)

these should be the same functions (as per spec).

cherry-picked from master (86a4810b09097714942bf2b889e6c62357bba931)

16 years agocosmetic changes
Zack Rusin [Fri, 16 May 2008 21:56:38 +0000 (17:56 -0400)]
cosmetic changes

16 years agofix rsq
Zack Rusin [Fri, 16 May 2008 21:35:47 +0000 (17:35 -0400)]
fix rsq

16 years agofix abs and start on rsq
Zack Rusin [Fri, 16 May 2008 21:10:52 +0000 (17:10 -0400)]
fix abs and start on rsq

16 years agodo the lit (some artifacts present)
Zack Rusin [Fri, 16 May 2008 20:06:59 +0000 (16:06 -0400)]
do the lit (some artifacts present)

16 years agoimplement min/max and abstract ops on vectors
Zack Rusin [Fri, 16 May 2008 18:54:40 +0000 (14:54 -0400)]
implement min/max and abstract ops on vectors

16 years agollvm: implement sub and abs
Zack Rusin [Thu, 15 May 2008 21:46:20 +0000 (17:46 -0400)]
llvm: implement sub and abs

16 years agofix injections of functions from builtins into shaders
Zack Rusin [Thu, 15 May 2008 18:11:19 +0000 (14:11 -0400)]
fix injections of functions from builtins into shaders

16 years agomove the swizzling code to gallivm in preperation for code-generating it
Zack Rusin [Thu, 15 May 2008 16:17:46 +0000 (12:17 -0400)]
move the swizzling code to gallivm in preperation for code-generating it
also some minor cleanups

16 years agogallium: in drivers, make copy of tokens passed to pipe->create_vs/fs_state()
Brian Paul [Sat, 17 May 2008 16:30:21 +0000 (10:30 -0600)]
gallium: in drivers, make copy of tokens passed to pipe->create_vs/fs_state()

The caller can then free the token array immediately.

16 years agogallium: remove deprecated format names
Brian Paul [Sat, 17 May 2008 14:47:56 +0000 (08:47 -0600)]
gallium: remove deprecated format names

16 years agos/PIPE_FORMAT_U_S8/PIPE_FORMAT_S8_UNORM/
Brian Paul [Sat, 17 May 2008 14:46:43 +0000 (08:46 -0600)]
s/PIPE_FORMAT_U_S8/PIPE_FORMAT_S8_UNORM/

16 years agogallium: fix glBitmap surface memleak in context tear-down
Brian Paul [Fri, 16 May 2008 22:11:00 +0000 (16:11 -0600)]
gallium: fix glBitmap surface memleak in context tear-down

16 years agogallium: release textures during context tear-down (fix mem leak)
Brian Paul [Fri, 16 May 2008 22:04:30 +0000 (16:04 -0600)]
gallium: release textures during context tear-down (fix mem leak)

16 years agogallium: ref counting clean-ups
Brian Paul [Fri, 16 May 2008 22:04:04 +0000 (16:04 -0600)]
gallium: ref counting clean-ups

16 years agomesa: call glutDestroyWindow() on exit to help find mem leaks
Brian Paul [Fri, 16 May 2008 22:02:52 +0000 (16:02 -0600)]
mesa: call glutDestroyWindow() on exit to help find mem leaks

16 years agobring in fixes/changes from master
Brian Paul [Fri, 16 May 2008 21:48:11 +0000 (15:48 -0600)]
bring in fixes/changes from master

16 years agoFix a program refcounting error, don't share program parameter lists.
Brian Paul [Fri, 16 May 2008 15:56:59 +0000 (09:56 -0600)]
Fix a program refcounting error, don't share program parameter lists.

The refcounting bug was causing a memleak (unfreed programs).
The old parameter list sharing is not needed since the change in how
uniforms are handled.

16 years agofix an attr/src mix-up when setting-up/binding vertex arrays
Brian Paul [Fri, 16 May 2008 21:34:22 +0000 (15:34 -0600)]
fix an attr/src mix-up when setting-up/binding vertex arrays

This fixes problems with incorrect material coefficients when glMaterial
is called per-vertex.

16 years agofix parsing of state.texenv.color (bug 14931)
Brian Paul [Thu, 15 May 2008 01:19:53 +0000 (19:19 -0600)]
fix parsing of state.texenv.color (bug 14931)

cherry-picked from master

16 years agoConsolidate texture fetch code and use partial derivatives when possible.
Brian Paul [Thu, 15 May 2008 01:14:41 +0000 (19:14 -0600)]
Consolidate texture fetch code and use partial derivatives when possible.

picked from master

16 years agomesa: fix InfoLog memleak, misc sync with master
Brian Paul [Wed, 14 May 2008 22:44:08 +0000 (16:44 -0600)]
mesa: fix InfoLog memleak, misc sync with master

16 years agoBug #13492: Only call ProgramStringNotify if program parsing succeeded.
Eric Anholt [Tue, 15 Jan 2008 23:08:34 +0000 (15:08 -0800)]
Bug #13492: Only call ProgramStringNotify if program parsing succeeded.

Wine intentionally tries some out-of-spec programs to test strictness, and
calling ProgramStringNotify on the results of a failed program parse resulted
in crashes in the 965 driver.

16 years agofix swizzle error test (bug 11881)
Brian [Tue, 7 Aug 2007 20:42:34 +0000 (21:42 +0100)]
fix swizzle error test (bug 11881)

16 years agofix-up inlined/non-inlined function inconsistencies
Brian Paul [Wed, 14 May 2008 22:32:18 +0000 (16:32 -0600)]
fix-up inlined/non-inlined function inconsistencies

cherry-picked from master

16 years agomesa: rm unneeded file
Brian Paul [Wed, 14 May 2008 22:30:15 +0000 (16:30 -0600)]
mesa: rm unneeded file

16 years agomesa: prefix rm command with -
Brian Paul [Wed, 14 May 2008 22:27:34 +0000 (16:27 -0600)]
mesa: prefix rm command with -

16 years agorewrite some of the mat*mat, mat*vec intrinsics
Brian Paul [Wed, 14 May 2008 22:20:28 +0000 (16:20 -0600)]
rewrite some of the mat*mat, mat*vec intrinsics

Also, remove obsolete matrix codegen code.

cherry-picked from master

16 years agomesa: regenerate slang built-in data (asin(vec4) fix)
Brian Paul [Wed, 14 May 2008 22:07:18 +0000 (16:07 -0600)]
mesa: regenerate slang built-in data (asin(vec4) fix)

16 years agomesa: fix missing w assignment in asin(vec4)
Brian Paul [Wed, 14 May 2008 22:06:10 +0000 (16:06 -0600)]
mesa: fix missing w assignment in asin(vec4)

16 years agomesa: use CALLOC_STRUCT()
Brian Paul [Wed, 14 May 2008 22:05:48 +0000 (16:05 -0600)]
mesa: use CALLOC_STRUCT()

16 years agomesa: sync up swrast/s_fragprog.c with master
Brian Paul [Wed, 14 May 2008 22:05:25 +0000 (16:05 -0600)]
mesa: sync up swrast/s_fragprog.c with master

16 years agomesa: updated comment
Brian Paul [Wed, 14 May 2008 22:04:51 +0000 (16:04 -0600)]
mesa: updated comment

16 years agomesa: minor bug fixes from master
Brian Paul [Wed, 14 May 2008 22:04:29 +0000 (16:04 -0600)]
mesa: minor bug fixes from master

16 years agomesa: dead code removal
Brian Paul [Wed, 14 May 2008 22:04:00 +0000 (16:04 -0600)]
mesa: dead code removal

16 years agomesa: minor bug fixes, null ptr checks, dead code removal
Brian Paul [Wed, 14 May 2008 22:03:38 +0000 (16:03 -0600)]
mesa: minor bug fixes, null ptr checks, dead code removal

16 years agomesa: fix errors in LightModelProduct state, other misc error cases
Brian Paul [Wed, 14 May 2008 22:02:20 +0000 (16:02 -0600)]
mesa: fix errors in LightModelProduct state, other misc error cases

16 years agomesa: glUniform(location==-1) is not an error
Brian Paul [Wed, 14 May 2008 22:01:31 +0000 (16:01 -0600)]
mesa: glUniform(location==-1) is not an error

16 years agofix some additional program refcounting bugs
Brian Paul [Wed, 14 May 2008 18:19:22 +0000 (12:19 -0600)]
fix some additional program refcounting bugs

cherry-picked from master

16 years agofix some additional program refcounting bugs
Brian Paul [Wed, 14 May 2008 18:19:22 +0000 (12:19 -0600)]
fix some additional program refcounting bugs

cherry-picked from master

16 years agoadjust llvm code to the changes in 2.3
Zack Rusin [Mon, 12 May 2008 21:17:18 +0000 (17:17 -0400)]
adjust llvm code to the changes in 2.3

16 years agogallium: optimize the flush_spans() function
Brian [Sat, 10 May 2008 18:46:00 +0000 (12:46 -0600)]
gallium: optimize the flush_spans() function

16 years agogallium: remove unused code
Brian [Sat, 10 May 2008 18:16:19 +0000 (12:16 -0600)]
gallium: remove unused code

16 years agoMerge branch 'gallium-0.1' into gallium-tex-surfaces
Michel Dänzer [Fri, 9 May 2008 17:16:02 +0000 (18:16 +0100)]
Merge branch 'gallium-0.1' into gallium-tex-surfaces

16 years agodraw: Fix number of vertices allocated in draw_pt_emit().
Michel Dänzer [Fri, 9 May 2008 17:04:16 +0000 (18:04 +0100)]
draw: Fix number of vertices allocated in draw_pt_emit().

16 years agogallium: depth textures have usage depth_stencil instead of render_target
Roland Scheidegger [Fri, 9 May 2008 13:04:33 +0000 (15:04 +0200)]
gallium: depth textures have usage depth_stencil instead of render_target

16 years agodraw: fix translate double-free, minor cleanups
Keith Whitwell [Fri, 9 May 2008 14:02:59 +0000 (15:02 +0100)]
draw: fix translate double-free, minor cleanups

16 years agoMerge commit 'origin/gallium-0.1' into gallium-tex-surfaces
Keith Whitwell [Fri, 9 May 2008 12:11:48 +0000 (13:11 +0100)]
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces

16 years agodraw: mimize cost of translate key compares, use cache universally
Keith Whitwell [Fri, 9 May 2008 12:10:15 +0000 (13:10 +0100)]
draw: mimize cost of translate key compares, use cache universally

16 years agotranslate: helper functions for mimizing cost of key compares
Keith Whitwell [Fri, 9 May 2008 12:09:58 +0000 (13:09 +0100)]
translate: helper functions for mimizing cost of key compares

16 years agogallium: Define util_vsprintf.
José Fonseca [Fri, 9 May 2008 09:47:44 +0000 (18:47 +0900)]
gallium: Define util_vsprintf.

16 years agoMerge branch 'gallium-0.1' into gallium-tex-surfaces
Keith Whitwell [Fri, 9 May 2008 07:56:01 +0000 (08:56 +0100)]
Merge branch 'gallium-0.1' into gallium-tex-surfaces

16 years agogallium: Disable debug_get_option for release builds on Windows.
José Fonseca [Fri, 9 May 2008 05:34:51 +0000 (14:34 +0900)]
gallium: Disable debug_get_option for release builds on Windows.

It always creates the C:\gallium.cfg , even if it does not exists, which
might be confusing.

16 years agogallium: Don't serialize GPU writes.
José Fonseca [Fri, 9 May 2008 02:02:10 +0000 (11:02 +0900)]
gallium: Don't serialize GPU writes.

Only make sure the GPU is finished with a buffer before mapping.

The opposite -- waiting for the CPU to be finished before handing
to the CPU -- must be done before fencing.

16 years agogallium: don't free shader.tokens in get_passthrough_fs()
Brian Paul [Fri, 9 May 2008 01:32:49 +0000 (19:32 -0600)]
gallium: don't free shader.tokens in get_passthrough_fs()

16 years agogallium: fix out of tex memory crashes
Brian Paul [Fri, 9 May 2008 01:19:52 +0000 (19:19 -0600)]
gallium: fix out of tex memory crashes

16 years agogallium: handle null ptrs
Brian Paul [Fri, 9 May 2008 00:38:02 +0000 (18:38 -0600)]
gallium: handle null ptrs

16 years agogallium: re-enable call to init_renderbuffer_bits(), remove dead code
Brian Paul [Thu, 8 May 2008 23:45:59 +0000 (17:45 -0600)]
gallium: re-enable call to init_renderbuffer_bits(), remove dead code

16 years agogallium: fix render to depth texture
Brian Paul [Thu, 8 May 2008 23:42:18 +0000 (17:42 -0600)]
gallium: fix render to depth texture

16 years agogallium: replace pipe_buffer_destroy() call with pipe_buffer_reference(NULL)
Brian Paul [Thu, 8 May 2008 23:13:01 +0000 (17:13 -0600)]
gallium: replace pipe_buffer_destroy() call with pipe_buffer_reference(NULL)

16 years agogallium: remove dead code
Brian Paul [Thu, 8 May 2008 23:11:55 +0000 (17:11 -0600)]
gallium: remove dead code

16 years agogallium: no-op st_Bitmap() if width or height is zero
Brian Paul [Thu, 8 May 2008 23:11:05 +0000 (17:11 -0600)]
gallium: no-op st_Bitmap() if width or height is zero

16 years agogallium: clean-up, minor fix
Brian Paul [Thu, 8 May 2008 22:02:19 +0000 (16:02 -0600)]
gallium: clean-up, minor fix

16 years agodraw: only fill in / compare the part of the translate key we're using.
Keith Whitwell [Thu, 8 May 2008 21:13:21 +0000 (22:13 +0100)]
draw: only fill in / compare the part of the translate key we're using.

It's quite a big struct & we examine it a lot (too much).  Reduce
the impact of this by just looking at the active part where possible.

16 years agoxlib: more SP_NO_RAST support
Keith Whitwell [Thu, 8 May 2008 21:10:15 +0000 (22:10 +0100)]
xlib: more SP_NO_RAST support

For some resaon normal (non-display-buffer) buffers are being allocated
through Xshm...  Bypass at least for SP_NO_RAST

16 years agosoftpipe: don't calc det if NO_RAST set
Keith Whitwell [Thu, 8 May 2008 21:07:52 +0000 (22:07 +0100)]
softpipe: don't calc det if NO_RAST set

16 years agogallium: plug in dummy stage->destroy func
Brian Paul [Thu, 8 May 2008 20:20:32 +0000 (14:20 -0600)]
gallium: plug in dummy stage->destroy func

16 years agoMerge branch 'gallium-0.1' into gallium-tex-surfaces
Michel Dänzer [Thu, 8 May 2008 18:01:34 +0000 (19:01 +0100)]
Merge branch 'gallium-0.1' into gallium-tex-surfaces

16 years agocso_cache: Fix test for currently bound blend state.
Michel Dänzer [Thu, 8 May 2008 18:00:11 +0000 (19:00 +0100)]
cso_cache: Fix test for currently bound blend state.

16 years agopipebuffer: Temporarily reimplement validation as growable array.
José Fonseca [Thu, 8 May 2008 15:08:57 +0000 (00:08 +0900)]
pipebuffer: Temporarily reimplement validation as growable array.

Jose

16 years agodisable GL_DEPTH_TEST before glDrawPixels in case window has unrequested depth buffer
Brian Paul [Thu, 8 May 2008 14:33:44 +0000 (08:33 -0600)]
disable GL_DEPTH_TEST before glDrawPixels in case window has unrequested depth buffer

16 years agogallium: Make sure functions have proper prototypes and remove unused variable.
Michel Dänzer [Thu, 8 May 2008 12:26:23 +0000 (13:26 +0100)]
gallium: Make sure functions have proper prototypes and remove unused variable.

16 years agopipebuffer: Preliminary buffer validation.
José Fonseca [Thu, 8 May 2008 06:28:42 +0000 (15:28 +0900)]
pipebuffer: Preliminary buffer validation.

Use table to store a list of buffers to validate. Unfortunately cso_hash
shrinks/regrows the hash every time, so still has to be addressed.

Multi-thread validation is still WIP.

16 years agogallium: Really free hash entries.
José Fonseca [Thu, 8 May 2008 06:19:07 +0000 (15:19 +0900)]
gallium: Really free hash entries.

Hook up to the new cso_hash_erase function.

16 years agopipebuffer: Don't include standard headers directly.
José Fonseca [Thu, 8 May 2008 05:56:03 +0000 (14:56 +0900)]
pipebuffer: Don't include standard headers directly.

16 years agomesa: minor fixes in _mesa_free_shader_program_data() and _mesa_link_program()
Brian Paul [Thu, 8 May 2008 02:18:49 +0000 (20:18 -0600)]
mesa: minor fixes in _mesa_free_shader_program_data() and _mesa_link_program()

From master:
Set shProg->NumShaders = 0 after freeing program's list of shaders.
Set _NEW_PROGRAM in _mesa_link_program() to fix a state validation bug.

16 years agogallium: fix some render to texture bugs
Brian Paul [Wed, 7 May 2008 22:44:33 +0000 (16:44 -0600)]
gallium: fix some render to texture bugs

Before, we were sometimes rendering into a stale texture because
st_finalize_texture() would discard the old texture and create a new one.

Moved st_update_framebuffer atom after texture validation so that we
can create a new renderbuffer surface if the texture changes.

Also, split texture validation into two parts: finalize_textures and
update_textures.  Do finalize_textures first to avoid getting into the
situtation where we're doing a pipe->surface_copy() mid-way through
state validation.

Some debug code still in place, but disabled...

16 years agomesa: document a/s keys
Brian Paul [Wed, 7 May 2008 17:57:03 +0000 (11:57 -0600)]
mesa: document a/s keys

16 years agomesa: add texturing to thread test
Brian Paul [Wed, 7 May 2008 17:56:24 +0000 (11:56 -0600)]
mesa: add texturing to thread test

Run with -t to enable texture mapping.
Press 't' to update the texture image.  When the texture is changed in one
thread it should also get updated in the other threads since textures are
shared by all contexts.

16 years agoMerge commit 'origin/gallium-0.1' into gallium-tex-surfaces
Keith Whitwell [Wed, 7 May 2008 14:57:36 +0000 (15:57 +0100)]
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces

16 years agomesa: free shader program data before deleting shader objects.
Brian Paul [Wed, 7 May 2008 14:56:08 +0000 (08:56 -0600)]
mesa: free shader program data before deleting shader objects.

Picked from master.
Fixes mem corruption seen when glean/api2 test exits.

16 years agogallium: implement full reference counting for vertex/fragment programs
Brian Paul [Wed, 7 May 2008 14:55:33 +0000 (08:55 -0600)]
gallium: implement full reference counting for vertex/fragment programs

Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...

Picked from gallium-0.1

16 years agomesa: update/add newer GL ES headers
Brian Paul [Wed, 7 May 2008 14:47:55 +0000 (08:47 -0600)]
mesa: update/add newer GL ES headers

16 years agogallium: Implement util_pack_color for A8, L8, and I8 formats.
José Fonseca [Wed, 7 May 2008 13:01:27 +0000 (22:01 +0900)]
gallium: Implement util_pack_color for A8, L8, and I8 formats.

16 years agogallium: Fix release build.
José Fonseca [Wed, 7 May 2008 12:37:32 +0000 (21:37 +0900)]
gallium: Fix release build.

pf_sprint_name might be used there too.

16 years agogallium: Fix compilation errors.
Michal Krol [Wed, 7 May 2008 12:24:14 +0000 (14:24 +0200)]
gallium: Fix compilation errors.

16 years agogallium: Implement pf_sprint_name as a simple static table.
José Fonseca [Wed, 7 May 2008 11:27:42 +0000 (20:27 +0900)]
gallium: Implement pf_sprint_name as a simple static table.

16 years agogallium: Use the u_string.h functions.
José Fonseca [Wed, 7 May 2008 10:39:34 +0000 (19:39 +0900)]
gallium: Use the u_string.h functions.

16 years agoRevert "gallium: move setup of dest_surface in do_copy_texsubimage()"
Michel Dänzer [Wed, 7 May 2008 07:46:28 +0000 (08:46 +0100)]
Revert "gallium: move setup of dest_surface in do_copy_texsubimage()"

This reverts commit f7dbd18371f9cb6686b6a97642b3ca5577e83472.

Looks like an accidental revert of commit
650c57f19398800dfdcf357b6e9ec7b68bfa34f1.

16 years agogallium: Output the total of leaked memory.
José Fonseca [Wed, 7 May 2008 07:29:36 +0000 (16:29 +0900)]
gallium: Output the total of leaked memory.

16 years agogallium: Propagate tex_usage flags down to winsys.
José Fonseca [Wed, 7 May 2008 05:17:59 +0000 (14:17 +0900)]
gallium: Propagate tex_usage flags down to winsys.

16 years agogallium: New PIPE_TEXTURE_USAGE_PRIMARY flag for primary surfaces.
José Fonseca [Wed, 7 May 2008 05:14:48 +0000 (14:14 +0900)]
gallium: New PIPE_TEXTURE_USAGE_PRIMARY flag for primary surfaces.

16 years agomesa: free shader program data before deleting shader objects.
Brian [Wed, 7 May 2008 05:08:02 +0000 (23:08 -0600)]
mesa: free shader program data before deleting shader objects.

Picked from master.
Fixes mem corruption seen when glean/api2 test exits.

16 years agogallium: implement full reference counting for vertex/fragment programs
Brian [Wed, 7 May 2008 04:13:06 +0000 (22:13 -0600)]
gallium: implement full reference counting for vertex/fragment programs

Use _mesa_reference_vert/fragprog() wherever we assign program pointers.
Fixes a memory corruption bug found with glean/api2 test.
Another memory bug involving shaders yet to be fixed...

16 years agomesa: comments, whitespace
Brian [Fri, 2 May 2008 01:29:25 +0000 (19:29 -0600)]
mesa: comments, whitespace