mesa.git
14 years agost/mesa: remove st_texture_object::pipe field
Brian Paul [Sun, 18 Apr 2010 23:55:23 +0000 (17:55 -0600)]
st/mesa: remove st_texture_object::pipe field

Just pass the pipe context to st_get_texture_sampler_view()
as is done for st_get_renderbuffer_sampler_view().

14 years agost/mesa: s/st_renderbuffer_get_sampler_view/st_get_renderbuffer_sampler_view/
Brian Paul [Sun, 18 Apr 2010 23:44:25 +0000 (17:44 -0600)]
st/mesa: s/st_renderbuffer_get_sampler_view/st_get_renderbuffer_sampler_view/

14 years agost/mesa: s/st_sampler_view_from_texture/st_create_texture_sampler_view/
Brian Paul [Sun, 18 Apr 2010 23:38:49 +0000 (17:38 -0600)]
st/mesa: s/st_sampler_view_from_texture/st_create_texture_sampler_view/

14 years agost/mesa: s/st_get_stobj_sampler_view/st_get_texture_sampler_view/
Brian Paul [Sun, 18 Apr 2010 23:12:39 +0000 (17:12 -0600)]
st/mesa: s/st_get_stobj_sampler_view/st_get_texture_sampler_view/

14 years agor300g: implement TRUNC as floor
Marek Olšák [Sun, 18 Apr 2010 22:26:49 +0000 (00:26 +0200)]
r300g: implement TRUNC as floor

14 years agor300/compiler: lower CEIL
Marek Olšák [Sun, 18 Apr 2010 21:40:01 +0000 (23:40 +0200)]
r300/compiler: lower CEIL

14 years agor300/compiler: enable branch emulation for vertex shaders
Marek Olšák [Sun, 18 Apr 2010 17:45:51 +0000 (19:45 +0200)]
r300/compiler: enable branch emulation for vertex shaders

14 years agor300/compiler: optimize CMP for vertex shaders a bit
Marek Olšák [Sun, 18 Apr 2010 18:49:50 +0000 (20:49 +0200)]
r300/compiler: optimize CMP for vertex shaders a bit

14 years agor300/compiler: Use memory_pool_array_reserve in deadcode elimination
Nicolai Hähnle [Sun, 11 Oct 2009 12:24:52 +0000 (14:24 +0200)]
r300/compiler: Use memory_pool_array_reserve in deadcode elimination

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
14 years agor300/compiler: Use memory_pool_array_reserve in r500-fragprog_emit
Nicolai Hähnle [Sun, 11 Oct 2009 12:22:16 +0000 (14:22 +0200)]
r300/compiler: Use memory_pool_array_reserve in r500-fragprog_emit

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
14 years agor300/compiler: enable branch emulation for R500 fragment programs
Marek Olšák [Sun, 11 Oct 2009 12:18:11 +0000 (14:18 +0200)]
r300/compiler: enable branch emulation for R500 fragment programs

14 years agor300/compiler: Implement branch emulation for R300 fragment programs
Nicolai Hähnle [Sun, 11 Oct 2009 12:18:11 +0000 (14:18 +0200)]
r300/compiler: Implement branch emulation for R300 fragment programs

Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
14 years agou_inlines: split pipe_surface_init in pipe_surface_reset and *_init
Luca Barbieri [Sun, 18 Apr 2010 20:37:32 +0000 (22:37 +0200)]
u_inlines: split pipe_surface_init in pipe_surface_reset and *_init

14 years agotgsi: add comment about potential code removal
Brian Paul [Sun, 18 Apr 2010 16:01:53 +0000 (10:01 -0600)]
tgsi: add comment about potential code removal

14 years agosoftpipe: new comment and assertion for face value
Brian Paul [Sun, 18 Apr 2010 16:01:04 +0000 (10:01 -0600)]
softpipe: new comment and assertion for face value

14 years agotgsi: replace 0xf with TGSI_WRITEMASK_XYZW
Brian Paul [Sun, 18 Apr 2010 15:56:52 +0000 (09:56 -0600)]
tgsi: replace 0xf with TGSI_WRITEMASK_XYZW

14 years agosoftpipe: fix computation of fragment[FACE] attribute
Brian Paul [Sun, 18 Apr 2010 15:46:25 +0000 (09:46 -0600)]
softpipe: fix computation of fragment[FACE] attribute

In TGSI, front facing is +1 and back-facing is -1.  We were computing
this attribute as +1 and 0 before.  However, the value isn't actually
used anywhere because we machine->Face attribute overrides it in
tgsi_exec.c.  That could be changed, removing some special-case code...

14 years agosoftpipe: clean-up and comments
Brian Paul [Sun, 18 Apr 2010 15:00:17 +0000 (09:00 -0600)]
softpipe: clean-up and comments

14 years agosoftpipe: document MAX_QUADS
Brian Paul [Sun, 18 Apr 2010 14:51:16 +0000 (08:51 -0600)]
softpipe: document MAX_QUADS

14 years agor300g: more solid is_buffer_referenced implementation
Marek Olšák [Sun, 18 Apr 2010 15:19:45 +0000 (17:19 +0200)]
r300g: more solid is_buffer_referenced implementation

This fixes crash from 7a1b5c937fa32968a04a11649e456a1ef8c5b442,
and also removes the unused "map" pointer.

14 years agou_surfaces: silence warning
Luca Barbieri [Sun, 18 Apr 2010 15:35:17 +0000 (17:35 +0200)]
u_surfaces: silence warning

14 years agoRevert "r300g: save vertex buffers around u_blitter calls"
Marek Olšák [Sun, 18 Apr 2010 14:59:35 +0000 (16:59 +0200)]
Revert "r300g: save vertex buffers around u_blitter calls"

Not sure why it crashes.

14 years agonvfx: move declarations before code
Brian Paul [Sun, 18 Apr 2010 14:43:42 +0000 (08:43 -0600)]
nvfx: move declarations before code

14 years agonvfx: fix void * arithmetic warning
Brian Paul [Sun, 18 Apr 2010 14:41:51 +0000 (08:41 -0600)]
nvfx: fix void * arithmetic warning

14 years agonvfx: move declarations before code
Brian Paul [Sun, 18 Apr 2010 14:41:25 +0000 (08:41 -0600)]
nvfx: move declarations before code

14 years agollvmpipe: update comment
Brian Paul [Sun, 18 Apr 2010 14:38:19 +0000 (08:38 -0600)]
llvmpipe: update comment

14 years agonvfx: move declarations before code to silence warnings
Brian Paul [Sun, 18 Apr 2010 14:38:03 +0000 (08:38 -0600)]
nvfx: move declarations before code to silence warnings

14 years agoauxiliary: add util_dirty_surfaces to track dirty render temporaries
Luca Barbieri [Sun, 18 Apr 2010 12:55:03 +0000 (14:55 +0200)]
auxiliary: add util_dirty_surfaces to track dirty render temporaries

14 years agoauxiliary: add util_surfaces to track a resource's pipe_surface structs
Luca Barbieri [Sun, 18 Apr 2010 12:54:16 +0000 (14:54 +0200)]
auxiliary: add util_surfaces to track a resource's pipe_surface structs

14 years agou_inlines: add function to initialize pipe_surface
Luca Barbieri [Sun, 18 Apr 2010 12:53:25 +0000 (14:53 +0200)]
u_inlines: add function to initialize pipe_surface

14 years agonvfx: fix fragment program constant updates
Luca Barbieri [Sun, 18 Apr 2010 12:44:26 +0000 (14:44 +0200)]
nvfx: fix fragment program constant updates

14 years agor300g: do not tell st that a buffer is referenced by hw
Marek Olšák [Sun, 18 Apr 2010 04:32:10 +0000 (06:32 +0200)]
r300g: do not tell st that a buffer is referenced by hw

It saves a few libdrm calls and unnecessary flushes.

14 years agor300g: save vertex buffers around u_blitter calls
Luca Barbieri [Sun, 18 Apr 2010 12:51:38 +0000 (14:51 +0200)]
r300g: save vertex buffers around u_blitter calls

Not strictly needed by the Mesa state tracker, but needed in general.

Only compile tested.

14 years agou_blitter: add support for saving vertex buffers
Luca Barbieri [Sun, 18 Apr 2010 12:50:14 +0000 (14:50 +0200)]
u_blitter: add support for saving vertex buffers

Currently r300g does not save vertex buffer on blitter calls.

It gets away with it because the current Mesa state tracker usually
resets vertex buffers on every draw calls.

However, this is wrong.

nvfx won't be lucky because it needs to use the blitter inside draw
calls.

14 years agop_compiler: add likely/unlikely macros
Luca Barbieri [Sun, 18 Apr 2010 13:09:17 +0000 (15:09 +0200)]
p_compiler: add likely/unlikely macros

Defined like the Linux kernel.

A explanatory comment is included.

14 years agor300g: fixup 0 stride buffer properly.
Dave Airlie [Sun, 18 Apr 2010 08:49:27 +0000 (18:49 +1000)]
r300g: fixup 0 stride buffer properly.

Just set the max index to 1, this lets doom3 run and seems correct,
though it would be better to just emit a constant like SVGA does.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agollvmpipe: Emit only the vertex attributes necessary for the FS, and ensure the first...
José Fonseca [Sun, 18 Apr 2010 08:34:01 +0000 (10:34 +0200)]
llvmpipe: Emit only the vertex attributes necessary for the FS, and ensure the first one is always position.

With this we correctly handle vertex shaders whose output position is not
in index zero.

14 years agosoftpipe: Preserve/check the signal of the number of scanlines in an edge.
José Fonseca [Sun, 18 Apr 2010 07:48:55 +0000 (09:48 +0200)]
softpipe: Preserve/check the signal of the number of scanlines in an edge.

It can become negative in some weird triangles.

14 years agodraw: Cosmetic cleanups and comments.
José Fonseca [Sun, 18 Apr 2010 07:45:54 +0000 (09:45 +0200)]
draw: Cosmetic cleanups and comments.

14 years agoretrace: Fix vertex/index/constant buffer dumping.
José Fonseca [Sat, 17 Apr 2010 13:11:58 +0000 (15:11 +0200)]
retrace: Fix vertex/index/constant buffer dumping.

14 years agotrace: Handle transfers with zero strides correctly.
José Fonseca [Sat, 17 Apr 2010 13:00:13 +0000 (15:00 +0200)]
trace: Handle transfers with zero strides correctly.

14 years agost/python: Set the bind flag for the default texture.
José Fonseca [Sat, 17 Apr 2010 12:48:19 +0000 (14:48 +0200)]
st/python: Set the bind flag for the default texture.

14 years agoretrace: Remove deprecated code.
José Fonseca [Sat, 17 Apr 2010 12:35:26 +0000 (14:35 +0200)]
retrace: Remove deprecated code.

14 years agomesa: Restore comment too.
José Fonseca [Sat, 17 Apr 2010 12:25:05 +0000 (14:25 +0200)]
mesa: Restore comment too.

14 years agoglsl: Fix handling of OPCODE_PRINT for no registers case.
Vinson Lee [Sun, 18 Apr 2010 07:11:49 +0000 (00:11 -0700)]
glsl: Fix handling of OPCODE_PRINT for no registers case.

A register file value is unsigned so could never be -1. A
value of 0 also aliased to PROGRAM_TEMPORARY.

If an OPCODE_PRINT has no registers to print, set the register
file value to PROGRAM_UNDEFINED and check for that value when
executing this instruction.

14 years agoi965: Assert that an OPCODE_IF was seen before an OPCODE_ELSE.
Vinson Lee [Sun, 18 Apr 2010 06:48:37 +0000 (23:48 -0700)]
i965: Assert that an OPCODE_IF was seen before an OPCODE_ELSE.

14 years agost/dri: Check for NULL before dereference and assignment.
Vinson Lee [Sun, 18 Apr 2010 06:40:14 +0000 (23:40 -0700)]
st/dri: Check for NULL before dereference and assignment.

14 years agonvfx: Initialize variables.
Vinson Lee [Sun, 18 Apr 2010 06:25:47 +0000 (23:25 -0700)]
nvfx: Initialize variables.

14 years agor300g: Cast rbuf->user_buffer to 'uint8_t *' before arithmetic.
Vinson Lee [Sun, 18 Apr 2010 05:42:03 +0000 (22:42 -0700)]
r300g: Cast rbuf->user_buffer to 'uint8_t *' before arithmetic.

Fixes this SCons build error.
"pointer of type 'void *' uses in arithmetic"

14 years agonvfx: Remove unused variables.
Vinson Lee [Sun, 18 Apr 2010 05:23:25 +0000 (22:23 -0700)]
nvfx: Remove unused variables.

14 years agonv50: Initialize variables.
Vinson Lee [Sun, 18 Apr 2010 04:21:31 +0000 (21:21 -0700)]
nv50: Initialize variables.

Silences GCC uninitialized variable warnings.

14 years agonv50: Remove unused variable.
Vinson Lee [Sun, 18 Apr 2010 03:37:53 +0000 (20:37 -0700)]
nv50: Remove unused variable.

14 years agoi915g: Remove broken power of two function
Jakob Bornecrantz [Sat, 17 Apr 2010 22:43:41 +0000 (23:43 +0100)]
i915g: Remove broken power of two function

14 years agoi915g: Add some helper functions
Jakob Bornecrantz [Sat, 17 Apr 2010 22:35:24 +0000 (23:35 +0100)]
i915g: Add some helper functions

Mostly to make the lines not so long.

14 years agoi915g: Fix cubemap layouts
Jakob Bornecrantz [Sat, 17 Apr 2010 13:55:23 +0000 (14:55 +0100)]
i915g: Fix cubemap layouts

14 years agoi915g: Clean and add some debug printing
Jakob Bornecrantz [Sat, 17 Apr 2010 22:28:43 +0000 (23:28 +0100)]
i915g: Clean and add some debug printing

Disabled by default

14 years agogallium/tests: Make trivial apps depend on libs
Jakob Bornecrantz [Sun, 18 Apr 2010 01:43:47 +0000 (02:43 +0100)]
gallium/tests: Make trivial apps depend on libs

14 years agor300g: various other cleanups
Marek Olšák [Sun, 18 Apr 2010 00:43:01 +0000 (02:43 +0200)]
r300g: various other cleanups

It seems to me that the resource management code is the most blurry.

Also some of my notes about fastfill are wrong, removing them too.

14 years agor300g: inline screen_buffer functions
Marek Olšák [Sun, 18 Apr 2010 00:40:12 +0000 (02:40 +0200)]
r300g: inline screen_buffer functions

14 years agor300g: remove unused declarations
Marek Olšák [Sun, 18 Apr 2010 00:37:02 +0000 (02:37 +0200)]
r300g: remove unused declarations

14 years agor300g: add debugging options "notiling" and "noimmd" (for testing)
Marek Olšák [Sun, 18 Apr 2010 00:32:54 +0000 (02:32 +0200)]
r300g: add debugging options "notiling" and "noimmd" (for testing)

notiling = Disable texture tiling
noimmd = Disable immediate mode (this optimization was really worth it!)

14 years agor300g: remove r300_transfer::ctx
Marek Olšák [Sat, 17 Apr 2010 22:11:29 +0000 (00:11 +0200)]
r300g: remove r300_transfer::ctx

14 years agor300g: remove use of c++ keywords
Marek Olšák [Sat, 17 Apr 2010 22:09:19 +0000 (00:09 +0200)]
r300g: remove use of c++ keywords

14 years agor300g: always create microtiled zbuffer regardless of texture dimensions
Marek Olšák [Sat, 17 Apr 2010 15:00:41 +0000 (17:00 +0200)]
r300g: always create microtiled zbuffer regardless of texture dimensions

14 years agoi915g: Remove unnecessary headers.
Vinson Lee [Sat, 17 Apr 2010 22:47:45 +0000 (15:47 -0700)]
i915g: Remove unnecessary headers.

14 years agonvfx: Remove unnecessary headers.
Vinson Lee [Sat, 17 Apr 2010 22:14:47 +0000 (15:14 -0700)]
nvfx: Remove unnecessary headers.

14 years agonv50: Remove redundant assignment.
Vinson Lee [Sat, 17 Apr 2010 21:49:40 +0000 (14:49 -0700)]
nv50: Remove redundant assignment.

14 years agoi965g: Remove redundant assert.
Vinson Lee [Sat, 17 Apr 2010 21:45:49 +0000 (14:45 -0700)]
i965g: Remove redundant assert.

14 years agoos: Implement pipe_barrier for POSIX platforms without pthread_barrier_t.
Vinson Lee [Sat, 17 Apr 2010 21:24:23 +0000 (14:24 -0700)]
os: Implement pipe_barrier for POSIX platforms without pthread_barrier_t.

This patch was tested on Mac OS X.

14 years agoi915g: Add a software only debuging winsys
Jakob Bornecrantz [Sat, 17 Apr 2010 14:17:33 +0000 (15:17 +0100)]
i915g: Add a software only debuging winsys

14 years agogallium/tests: Fix trivial examples
Jakob Bornecrantz [Sat, 17 Apr 2010 19:40:36 +0000 (20:40 +0100)]
gallium/tests: Fix trivial examples

14 years agogallium/util: Ignores
Jakob Bornecrantz [Sat, 17 Apr 2010 19:49:57 +0000 (20:49 +0100)]
gallium/util: Ignores

14 years agoprogs/tests: Ignores
Jakob Bornecrantz [Sat, 17 Apr 2010 19:49:10 +0000 (20:49 +0100)]
progs/tests: Ignores

14 years agor300/compiler: Remove unnecessary header.
Vinson Lee [Sat, 17 Apr 2010 19:13:19 +0000 (12:13 -0700)]
r300/compiler: Remove unnecessary header.

14 years agodraw llvm: Remove unnecessary header.
Vinson Lee [Sat, 17 Apr 2010 06:25:25 +0000 (23:25 -0700)]
draw llvm: Remove unnecessary header.

14 years agollvmpipe: Remove unnecessary header.
Vinson Lee [Sat, 17 Apr 2010 06:08:52 +0000 (23:08 -0700)]
llvmpipe: Remove unnecessary header.

14 years agor300/compiler: Add radeon_program_tex.c to SCons build.
Vinson Lee [Sat, 17 Apr 2010 05:58:49 +0000 (22:58 -0700)]
r300/compiler: Add radeon_program_tex.c to SCons build.

This was missed in commit f8a14186809356871ae74159c774e9e3959a22e5.

14 years agor300/compiler: add emulation of all mirrored-clamp wrap modes for NPOT textures
Marek Olšák [Sat, 17 Apr 2010 00:43:47 +0000 (02:43 +0200)]
r300/compiler: add emulation of all mirrored-clamp wrap modes for NPOT textures

14 years agor300/compiler: replace mirrored-repeat emulation with a faster version
Marek Olšák [Sat, 17 Apr 2010 00:05:26 +0000 (02:05 +0200)]
r300/compiler: replace mirrored-repeat emulation with a faster version

Also, the Negate bitfield was 1 instead of RC_MASK_XYZ in the previous
version, causing incorrect rendering.

14 years agor300/compiler: add handy definitions for XYZ0 and smeared half swizzling
Marek Olšák [Fri, 16 Apr 2010 23:31:25 +0000 (01:31 +0200)]
r300/compiler: add handy definitions for XYZ0 and smeared half swizzling

14 years agor300/compiler: make ARB_shadow_ambient optional
Marek Olšák [Fri, 16 Apr 2010 20:29:19 +0000 (22:29 +0200)]
r300/compiler: make ARB_shadow_ambient optional

This saves constant register space for r300g, which doesn't need
this feature.

14 years agollvmpipe: fix color masking
Brian Paul [Fri, 16 Apr 2010 20:08:15 +0000 (14:08 -0600)]
llvmpipe: fix color masking

14 years agor300/compiler: restore r500-specific bits of TEX transformations
Marek Olšák [Fri, 16 Apr 2010 18:59:35 +0000 (20:59 +0200)]
r300/compiler: restore r500-specific bits of TEX transformations

14 years agollvmpipe: fix linking for lp_test_blend
Brian Paul [Fri, 16 Apr 2010 19:33:35 +0000 (13:33 -0600)]
llvmpipe: fix linking for lp_test_blend

14 years agollvmpipe: work-around an LLVM bug
Brian Paul [Fri, 16 Apr 2010 19:34:28 +0000 (13:34 -0600)]
llvmpipe: work-around an LLVM bug

The blend combinations ZERO,DST_ALPHA and ZERO,INV_DST_ALPHA seem to
generate bad code which leads to a segfault.

14 years agollvmpipe: clean-up lp_surface_copy()
Brian Paul [Fri, 16 Apr 2010 19:07:15 +0000 (13:07 -0600)]
llvmpipe: clean-up lp_surface_copy()

Remove unreachable code, etc from previous revisions.

14 years agollvmpipe: remove unneeded declaration (which caused a warning)
Brian Paul [Fri, 16 Apr 2010 19:01:51 +0000 (13:01 -0600)]
llvmpipe: remove unneeded declaration (which caused a warning)

14 years agollvmpipe: use unsigned type to avoid warnings
Brian Paul [Fri, 16 Apr 2010 19:01:18 +0000 (13:01 -0600)]
llvmpipe: use unsigned type to avoid warnings

14 years agogallium/draw: fix breakage from moving lp_bld_* files
Brian Paul [Fri, 16 Apr 2010 18:58:40 +0000 (12:58 -0600)]
gallium/draw: fix breakage from moving lp_bld_* files

14 years agollvmpipe: remove unneeded break stmt
Brian Paul [Fri, 16 Apr 2010 18:20:27 +0000 (12:20 -0600)]
llvmpipe: remove unneeded break stmt

14 years agollvmpipe: fix compilation, linking of lp_test_blend
Brian Paul [Fri, 16 Apr 2010 17:14:43 +0000 (11:14 -0600)]
llvmpipe: fix compilation, linking of lp_test_blend

14 years agollvmpipe: updated #includes
Brian Paul [Fri, 16 Apr 2010 16:34:29 +0000 (10:34 -0600)]
llvmpipe: updated #includes

14 years agogallivm/llvmpipe: move lp_bld_blend* files to llvmpipe/ directory
Brian Paul [Fri, 16 Apr 2010 16:28:21 +0000 (10:28 -0600)]
gallivm/llvmpipe: move lp_bld_blend* files to llvmpipe/ directory

14 years agogallivm/llvmpipe: move lp_bld_alpha.c to llvmpipe/ directory
Brian Paul [Fri, 16 Apr 2010 16:22:33 +0000 (10:22 -0600)]
gallivm/llvmpipe: move lp_bld_alpha.c to llvmpipe/ directory

14 years agogallivm/llvmpipe: move lp_bld_depth.[ch] to llvmpipe/ directory
Brian Paul [Fri, 16 Apr 2010 16:20:32 +0000 (10:20 -0600)]
gallivm/llvmpipe: move lp_bld_depth.[ch] to llvmpipe/ directory

This is specific to the llvmpipe driver and not re-usable.

14 years agogallivm/llvmpipe: move lp_bld_interp.c to llvmpipe/ directory
Brian Paul [Fri, 16 Apr 2010 16:17:38 +0000 (10:17 -0600)]
gallivm/llvmpipe: move lp_bld_interp.c to llvmpipe/ directory

This file is specific to the llvmpipe driver and not re-usable.

14 years agollvmpipe: rename vars, update comments for texture->resource changes
Brian Paul [Fri, 16 Apr 2010 16:01:32 +0000 (10:01 -0600)]
llvmpipe: rename vars, update comments for texture->resource changes

14 years agogallivm: init some vars to silence warnings
Brian Paul [Fri, 16 Apr 2010 15:56:38 +0000 (09:56 -0600)]
gallivm: init some vars to silence warnings

14 years agollvmpipe: plug in draw's polygon stipple stage
Brian Paul [Fri, 16 Apr 2010 15:49:52 +0000 (09:49 -0600)]
llvmpipe: plug in draw's polygon stipple stage

14 years agollvmpipe: check for dirty context state in lp_setup_update_state()
Brian Paul [Fri, 16 Apr 2010 15:49:33 +0000 (09:49 -0600)]
llvmpipe: check for dirty context state in lp_setup_update_state()

This fixes problems with the draw module's aaline, aapoint and
pstipple stages where we change some driver state after the call
to the draw module's draw_arrays() function.