mesa.git
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 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

16 years agogallium: re-enable temporarily disabled code in do_copy_texsubimage()
Brian Paul [Tue, 6 May 2008 21:39:39 +0000 (15:39 -0600)]
gallium: re-enable temporarily disabled code in do_copy_texsubimage()

16 years agogallium: create drawing surfaces as GPU_READ/WRITE only
Brian Paul [Tue, 6 May 2008 19:47:41 +0000 (13:47 -0600)]
gallium: create drawing surfaces as GPU_READ/WRITE only

Create different temporary surfaces for CPU_READ/WRITE when needed (such as
for glReadPixels, glAccum, some glCopy/DrawPixels, glCopyTexSubImage, etc).

16 years agogallium: create renderbuffer surface w/out CPU_READ/WRITE flags
Michal Danzer [Tue, 6 May 2008 18:35:25 +0000 (12:35 -0600)]
gallium: create renderbuffer surface w/out CPU_READ/WRITE flags

16 years agogallium: move setup of dest_surface in do_copy_texsubimage()
Michal Danzer [Tue, 6 May 2008 18:34:34 +0000 (12:34 -0600)]
gallium: move setup of dest_surface in do_copy_texsubimage()

16 years agogallium: Simple facility to dump and view images for debugging.
José Fonseca [Tue, 6 May 2008 17:51:49 +0000 (02:51 +0900)]
gallium: Simple facility to dump and view images for debugging.

16 years agogallium: change calculate_first_last_level() to match gallium-tex-surfaces branch
Brian Paul [Tue, 6 May 2008 14:40:41 +0000 (08:40 -0600)]
gallium: change calculate_first_last_level() to match gallium-tex-surfaces branch

16 years agogallium: sync up texture/sampler changes with master
Brian Paul [Tue, 6 May 2008 14:37:28 +0000 (08:37 -0600)]
gallium: sync up texture/sampler changes with master

16 years agogallium: Make sure to release texture surfaces (at the right time).
Michel Dänzer [Tue, 6 May 2008 11:24:04 +0000 (12:24 +0100)]
gallium: Make sure to release texture surfaces (at the right time).

16 years agogallium: glCopyTexSubImage improvement.
Michel Dänzer [Tue, 6 May 2008 11:23:16 +0000 (12:23 +0100)]
gallium: glCopyTexSubImage improvement.

Only get a texture surface for attempting an accelerated copy, and mark it for
GPU use only.

16 years agogallium: Define util_sprintf for non-WIN32.
Michel Dänzer [Tue, 6 May 2008 08:07:11 +0000 (09:07 +0100)]
gallium: Define util_sprintf for non-WIN32.

16 years agoMerge commit 'origin/gallium-0.1' into gallium-tex-surfaces
Keith Whitwell [Tue, 6 May 2008 06:45:28 +0000 (07:45 +0100)]
Merge commit 'origin/gallium-0.1' into gallium-tex-surfaces

Conflicts:

src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_cb_texture.c

16 years agogallium: New pipe_screen interface to overlay a texture on existing memory.
José Fonseca [Tue, 6 May 2008 05:57:18 +0000 (14:57 +0900)]
gallium: New pipe_screen interface to overlay a texture on existing memory.

16 years agofix _mesa_ffs for alternative compilers
Alan Hourihane [Mon, 5 May 2008 22:09:38 +0000 (23:09 +0100)]
fix _mesa_ffs for alternative compilers

16 years agodeclare atoms as extern
Alan Hourihane [Mon, 5 May 2008 22:08:59 +0000 (23:08 +0100)]
declare atoms as extern

16 years agoutil: Alternative implementation for standard c library string functions.
José Fonseca [Mon, 5 May 2008 14:58:37 +0000 (23:58 +0900)]
util: Alternative implementation for standard c library string functions.

16 years agoscons: A few more compiler flags adjustments to match winddk.
José Fonseca [Mon, 5 May 2008 14:57:51 +0000 (23:57 +0900)]
scons: A few more compiler flags adjustments to match winddk.

16 years agogallium: fix some BaseLevel, lastLevel bugs
Brian Paul [Sat, 3 May 2008 23:01:20 +0000 (17:01 -0600)]
gallium: fix some BaseLevel, lastLevel bugs

16 years agogallium: fix warnings
Brian Paul [Sat, 3 May 2008 15:26:25 +0000 (09:26 -0600)]
gallium: fix warnings

16 years agoPress <space> to reset limit/bias values, clean-up limit/bias printf
Brian Paul [Sat, 3 May 2008 15:08:42 +0000 (09:08 -0600)]
Press <space> to reset limit/bias values, clean-up limit/bias printf

16 years agogallium: fix sampler->max_lod computation
Brian Paul [Sat, 3 May 2008 15:07:11 +0000 (09:07 -0600)]
gallium: fix sampler->max_lod computation

16 years agogallium: fix computation of sampler->min_lod
Brian Paul [Sat, 3 May 2008 14:58:44 +0000 (08:58 -0600)]
gallium: fix computation of sampler->min_lod

The texture BaseLevel is accounted for in texture layout so it doesn't factor
in here.  May also need to adjust max_lod...

16 years agogallium: add pipe surface layout value (Roland Scheidegger)
Keith Whitwell [Sat, 3 May 2008 14:41:05 +0000 (15:41 +0100)]
gallium: add pipe surface layout value (Roland Scheidegger)

16 years agogallium: remove 0.5 vertex biases in set_vertex_data()
Brian Paul [Fri, 2 May 2008 20:00:35 +0000 (14:00 -0600)]
gallium: remove 0.5 vertex biases in set_vertex_data()

These should not be needed and were causing garbage to appear along the
edges of the mipmap images.

16 years agogallium: remove obsolete PIPE_CAP_BITMAP_TEXCOORD_BIAS
Brian Paul [Fri, 2 May 2008 20:00:08 +0000 (14:00 -0600)]
gallium: remove obsolete PIPE_CAP_BITMAP_TEXCOORD_BIAS

16 years agogallium: set template.target = PIPE_TEXTURE_2D
Brian Paul [Fri, 2 May 2008 17:12:15 +0000 (11:12 -0600)]
gallium: set template.target = PIPE_TEXTURE_2D

16 years agogallium: identify depth-stencil textures
Keith Whitwell [Fri, 2 May 2008 16:56:01 +0000 (17:56 +0100)]
gallium: identify depth-stencil textures

And don't use the display-target path to allocate them.

16 years agobrw: remove dead code
Keith Whitwell [Fri, 2 May 2008 16:55:22 +0000 (17:55 +0100)]
brw: remove dead code

16 years agogallium: minor code, comments clean-up
Brian Paul [Fri, 2 May 2008 16:43:29 +0000 (10:43 -0600)]
gallium: minor code, comments clean-up

16 years agogallium: in st_finalize_texture() check texture dimensions
Brian Paul [Fri, 2 May 2008 16:38:39 +0000 (10:38 -0600)]
gallium: in st_finalize_texture() check texture dimensions

Check dimensions in addition to target, format, etc.
Fixes a bug where we failed to detect a change in texture image sizes and
wound up using the old texture data.

16 years agogallium: new debug code (disabled)
Brian Paul [Fri, 2 May 2008 16:37:20 +0000 (10:37 -0600)]
gallium: new debug code (disabled)

16 years agoi915: update to new display target allocation
Keith Whitwell [Fri, 2 May 2008 15:56:06 +0000 (16:56 +0100)]
i915: update to new display target allocation

16 years agogallium: Add texture usage flags, special-case allocation of display targets
Keith Whitwell [Fri, 2 May 2008 15:46:31 +0000 (16:46 +0100)]
gallium: Add texture usage flags, special-case allocation of display targets

For many envirionments it's necessary to allocate display targets
in a window-system friendly manner.  Add facilities so that a driver
can tell if a texture is likely to be used to generate a display surface
and if use special allocation paths if necessary.

Hook up softpipe to call into the winsys->surface_alloc_storage()
routine in this case, though we probably want to change that interface
slightly also.

16 years agogallium: fix typos, comments, whitespace
Brian Paul [Fri, 2 May 2008 15:26:17 +0000 (09:26 -0600)]
gallium: fix typos, comments, whitespace

16 years agogallium: remove ^M (CR) chars
Brian Paul [Fri, 2 May 2008 14:22:25 +0000 (08:22 -0600)]
gallium: remove ^M (CR) chars

16 years agogallium: code movement (XSHM code)
Brian Paul [Fri, 2 May 2008 13:54:11 +0000 (07:54 -0600)]
gallium: code movement (XSHM code)

16 years agoset TextureID = NULL after deleting the array
Brian Paul [Thu, 1 May 2008 22:21:43 +0000 (16:21 -0600)]
set TextureID = NULL after deleting the array

16 years agogallium: comments, clean-ups
Brian Paul [Thu, 1 May 2008 21:29:25 +0000 (15:29 -0600)]
gallium: comments, clean-ups

16 years agogallium: Reallocate pipe_texture in st_TexImage if the texture object was used.
Michel Dänzer [Fri, 2 May 2008 15:22:20 +0000 (16:22 +0100)]
gallium: Reallocate pipe_texture in st_TexImage if the texture object was used.

Fixes problems with interleaved glTexImage and rendering calls.

16 years agosnprintf -> util_snprintf
Alan Hourihane [Fri, 2 May 2008 15:25:37 +0000 (15:25 +0000)]
snprintf -> util_snprintf

16 years agotgsi: Enable fast high precision rsqrt.
Michal Krol [Fri, 2 May 2008 14:12:55 +0000 (16:12 +0200)]
tgsi: Enable fast high precision rsqrt.

16 years agotgsi: Implement fast rsqrtf. Not tested, inactive.
Keith Whitwell [Fri, 2 May 2008 14:02:18 +0000 (16:02 +0200)]
tgsi: Implement fast rsqrtf. Not tested, inactive.

16 years agogallium: remove usage of winsys->surface_alloc_storage from state tracker
Keith Whitwell [Fri, 2 May 2008 13:27:10 +0000 (14:27 +0100)]
gallium: remove usage of winsys->surface_alloc_storage from state tracker

Allocate a texture containing storage instead.

Also clean up ACCUM buffer allocation slightly -- drivers will need
some changes to texture allocation logic to accomodate the concept of
a texture that will only as image storage by the CPU, but it's cleaner
than it was.

16 years agogallium: fix build after merge
Keith Whitwell [Fri, 2 May 2008 11:17:11 +0000 (12:17 +0100)]
gallium: fix build after merge

16 years agoMerge branch 'gallium-0.1' into gallium-tex-surfaces
Keith Whitwell [Fri, 2 May 2008 11:00:13 +0000 (12:00 +0100)]
Merge branch 'gallium-0.1' into gallium-tex-surfaces

16 years agorevert mode change back to 644
Alan Hourihane [Fri, 2 May 2008 10:34:58 +0000 (10:34 +0000)]
revert mode change back to 644

16 years agoinline -> INLINE
Alan Hourihane [Fri, 2 May 2008 10:31:46 +0000 (10:31 +0000)]
inline -> INLINE

16 years agoSome changed for non-C99 compilers
Alan Hourihane [Fri, 2 May 2008 10:08:03 +0000 (10:08 +0000)]
Some changed for non-C99 compilers

16 years agore-add pipe_surface map/unmap inlines
Keith Whitwell [Thu, 1 May 2008 17:13:46 +0000 (18:13 +0100)]
re-add pipe_surface map/unmap inlines

16 years agocso: can memcmp-compare pipe_framebuffer_state now it includes fb dimensions
Keith Whitwell [Thu, 1 May 2008 16:55:52 +0000 (17:55 +0100)]
cso: can memcmp-compare pipe_framebuffer_state now it includes fb dimensions

16 years agotgsi: Do not assume IN and OUT registers are declared sequentially.
Michal Krol [Fri, 2 May 2008 09:13:58 +0000 (11:13 +0200)]
tgsi: Do not assume IN and OUT registers are declared sequentially.

16 years agotgsi: Fix build on Win32.
Michal Krol [Fri, 2 May 2008 08:20:53 +0000 (10:20 +0200)]
tgsi: Fix build on Win32.

16 years agotgsi: Dump destination register modulate modifier.
Michal Krol [Thu, 1 May 2008 14:39:54 +0000 (16:39 +0200)]
tgsi: Dump destination register modulate modifier.

16 years agogallium: temporarily disable broken SSE2 code for ARL opcode
Brian [Fri, 2 May 2008 00:56:20 +0000 (18:56 -0600)]
gallium: temporarily disable broken SSE2 code for ARL opcode

16 years agogallium: implement TGSI_OPCODE_EXP
Brian [Fri, 2 May 2008 00:49:20 +0000 (18:49 -0600)]
gallium: implement TGSI_OPCODE_EXP

16 years agogallium: implement TGSI_OPCODE_LOG
Brian [Fri, 2 May 2008 00:42:01 +0000 (18:42 -0600)]
gallium: implement TGSI_OPCODE_LOG

16 years agoadded cast for MSVC
Brian Paul [Thu, 1 May 2008 21:21:40 +0000 (15:21 -0600)]
added cast for MSVC

16 years agogallium: remove the unused softpipe_winsys code
Brian Paul [Thu, 1 May 2008 21:19:00 +0000 (15:19 -0600)]
gallium: remove the unused softpipe_winsys code

The struct is still there though until all winsys layers are updated

16 years agogallium: use screen->tex_surface_release()
Brian Paul [Thu, 1 May 2008 21:08:05 +0000 (15:08 -0600)]
gallium: use screen->tex_surface_release()

16 years agotgsi: remove some bogus win vs. linux crud
Keith Whitwell [Thu, 1 May 2008 19:45:15 +0000 (20:45 +0100)]
tgsi: remove some bogus win vs. linux crud

Pass arguments properly in linux now.  Still need to change this to use
a single calling convention on both platforms.

16 years agortasm: learn another version of push
Keith Whitwell [Thu, 1 May 2008 19:44:41 +0000 (20:44 +0100)]
rtasm: learn another version of push