mesa.git
15 years agomesa: use gcc __builtin_popcount()
Brian Paul [Tue, 24 Nov 2009 01:09:46 +0000 (18:09 -0700)]
mesa: use gcc __builtin_popcount()

15 years agor300g: use util_bitcount()
Brian Paul [Tue, 24 Nov 2009 01:06:19 +0000 (18:06 -0700)]
r300g: use util_bitcount()

15 years agoegl: use util_bitcount()
Brian Paul [Tue, 24 Nov 2009 01:04:47 +0000 (18:04 -0700)]
egl: use util_bitcount()

15 years agogallium/util: added util_bitcount()
Brian Paul [Tue, 24 Nov 2009 01:04:22 +0000 (18:04 -0700)]
gallium/util: added util_bitcount()

15 years agoMerge commit 'origin/mesa_7_7_branch'
Maciej Cencora [Mon, 23 Nov 2009 21:14:48 +0000 (22:14 +0100)]
Merge commit 'origin/mesa_7_7_branch'

15 years agoradeon: fix errors in miptree related function
Maciej Cencora [Mon, 23 Nov 2009 20:59:08 +0000 (21:59 +0100)]
radeon: fix errors in miptree related function

- typo
- memory leak
- off by one (spotted by airlied)

15 years agoMerge branch 'mesa_7_7_branch' of http://anongit.freedesktop.org/git/mesa/mesa into...
Maciej Cencora [Mon, 23 Nov 2009 20:28:22 +0000 (21:28 +0100)]
Merge branch 'mesa_7_7_branch' of anongit.freedesktop.org/git/mesa/mesa into mesa_7_7_branch

15 years agosvga: Scrub Makefiles a bit
Jakob Bornecrantz [Mon, 23 Nov 2009 18:59:02 +0000 (19:59 +0100)]
svga: Scrub Makefiles a bit

Remove x86 specific hacks. Not that they will ever be used on
none x86 arches, but they are built by default. And the way the
flags where added was a hack.

15 years agoslang: Check return value from emit_instruction().
Michal Krol [Mon, 23 Nov 2009 12:22:04 +0000 (13:22 +0100)]
slang: Check return value from emit_instruction().

15 years agotgsi: Clamp the source argument in micro_exp2() to avoid Inf.
Michal Krol [Mon, 23 Nov 2009 10:32:58 +0000 (11:32 +0100)]
tgsi: Clamp the source argument in micro_exp2() to avoid Inf.

15 years agotgsi: Remove code that actually had no effect.
Michal Krol [Mon, 23 Nov 2009 10:29:29 +0000 (11:29 +0100)]
tgsi: Remove code that actually had no effect.

15 years agosoftpipe: Initialise TGSI machine's Face.
Michal Krol [Mon, 23 Nov 2009 09:51:07 +0000 (10:51 +0100)]
softpipe: Initialise TGSI machine's Face.

15 years agotgsi: Fix POSITION and FACE fragment shader inputs.
Michal Krol [Mon, 23 Nov 2009 09:49:41 +0000 (10:49 +0100)]
tgsi: Fix POSITION and FACE fragment shader inputs.

15 years agotgsi: Bring BGNFOR/ENDFOR implementation up to spec.
Michal Krol [Mon, 23 Nov 2009 09:40:05 +0000 (10:40 +0100)]
tgsi: Bring BGNFOR/ENDFOR implementation up to spec.

15 years agotgsi: Fake TXD implementation in exec.
Michal Krol [Thu, 19 Nov 2009 12:05:58 +0000 (13:05 +0100)]
tgsi: Fake TXD implementation in exec.

15 years agotgsi: Add execution debugging facilities to exec.
Michal Krol [Thu, 19 Nov 2009 12:01:08 +0000 (13:01 +0100)]
tgsi: Add execution debugging facilities to exec.

15 years agoslang: Be more robust with memory in concat_shaders().
Michal Krol [Thu, 19 Nov 2009 11:52:58 +0000 (12:52 +0100)]
slang: Be more robust with memory in concat_shaders().

15 years agomesa: Initialize variable in _mesa_get_texel_fetch_func.
Vinson Lee [Mon, 23 Nov 2009 06:52:59 +0000 (01:52 -0500)]
mesa: Initialize variable in _mesa_get_texel_fetch_func.

15 years agoglx: Prevent potential null pointer deference in driCreateContext.
Vinson Lee [Mon, 23 Nov 2009 06:30:32 +0000 (01:30 -0500)]
glx: Prevent potential null pointer deference in driCreateContext.

15 years agoglu/sgi: Fix memory leak in bitmapBuild2DMipmaps.
Vinson Lee [Mon, 23 Nov 2009 06:09:06 +0000 (01:09 -0500)]
glu/sgi: Fix memory leak in bitmapBuild2DMipmaps.

15 years agoglu/sgi: Fix memory leak in gluScaleImage3D.
Vinson Lee [Mon, 23 Nov 2009 05:57:37 +0000 (00:57 -0500)]
glu/sgi: Fix memory leak in gluScaleImage3D.

15 years agor600 : add support for shader instruction trunc and discard.
Richard Li [Mon, 23 Nov 2009 02:31:46 +0000 (21:31 -0500)]
r600 : add support for shader instruction trunc and discard.

15 years agor600: hopefully fix segfault.
Dave Airlie [Sun, 22 Nov 2009 20:44:29 +0000 (06:44 +1000)]
r600: hopefully fix segfault.

15 years agor600: fix inline issues
Dave Airlie [Sun, 22 Nov 2009 20:31:29 +0000 (06:31 +1000)]
r600: fix inline issues

15 years agor600 : add stack depth calculation, enable CF pop.
Richard Li [Sun, 22 Nov 2009 17:58:28 +0000 (12:58 -0500)]
r600 : add stack depth calculation, enable CF pop.

15 years agor600 : use cf for all pop now, left optimization for future.
Richard Li [Fri, 20 Nov 2009 21:36:55 +0000 (16:36 -0500)]
r600 : use cf for all pop now, left optimization for future.

15 years agor300: fix VP source conflict resolution on 64-bit machines
Maciej Cencora [Sun, 22 Nov 2009 14:08:46 +0000 (15:08 +0100)]
r300: fix VP source conflict resolution on 64-bit machines

On 32bit machines we were lucky because the sizeof(reg) == sizeof(rc_src_register).
On 64bit machines pointers are 8 bytes long, so we were overwriting other data.

15 years agor300: fix SIN/COS/SCS instructions for R300 fp
Maciej Cencora [Sun, 22 Nov 2009 13:13:18 +0000 (14:13 +0100)]
r300: fix SIN/COS/SCS instructions for R300 fp

15 years agoglu/sgi: Fix memory leak in gluScaleImage.
Vinson Lee [Sun, 22 Nov 2009 06:57:35 +0000 (01:57 -0500)]
glu/sgi: Fix memory leak in gluScaleImage.

15 years agoglu: Fix memory leak in __gl_meshMakeEdge.
Vinson Lee [Sun, 22 Nov 2009 06:45:53 +0000 (01:45 -0500)]
glu: Fix memory leak in __gl_meshMakeEdge.

15 years agosvga: Prevent potential null pointer deference in vmw_surface.c.
Vinson Lee [Sun, 22 Nov 2009 06:26:32 +0000 (01:26 -0500)]
svga: Prevent potential null pointer deference in vmw_surface.c.

15 years agosvga: Fix memory leak in vmw_screen_ioctl.c
Vinson Lee [Sun, 22 Nov 2009 06:20:07 +0000 (01:20 -0500)]
svga: Fix memory leak in vmw_screen_ioctl.c

15 years agost/xorg: Prevent potential null pointer deference in xorg_xv.c.
Vinson Lee [Sun, 22 Nov 2009 06:10:38 +0000 (01:10 -0500)]
st/xorg: Prevent potential null pointer deference in xorg_xv.c.

15 years agost/xorg: Reorder cases in switch statement.
Vinson Lee [Sun, 22 Nov 2009 05:55:52 +0000 (00:55 -0500)]
st/xorg: Reorder cases in switch statement.

Silences missing break statement warning.

15 years agor300g: Build fix.
Corbin Simpson [Sun, 22 Nov 2009 03:13:26 +0000 (19:13 -0800)]
r300g: Build fix.

Oops.

15 years agor300g: do not reallocate r300_vertex_info and r300_rs_block all the time
Marek Olšák [Fri, 20 Nov 2009 03:52:49 +0000 (04:52 +0100)]
r300g: do not reallocate r300_vertex_info and r300_rs_block all the time

15 years agor300g: clean up vs/fs tabs
Marek Olšák [Sat, 21 Nov 2009 04:51:13 +0000 (05:51 +0100)]
r300g: clean up vs/fs tabs

Instead of vs_tab, we use vs_output_tab and it's local now. fs_tab hasn't
been used anywhere, so I removed it and r300_update_fs_tab too.

15 years agoradeon: fix compressed mipmapped textures
Maciej Cencora [Sat, 21 Nov 2009 14:56:23 +0000 (15:56 +0100)]
radeon: fix compressed mipmapped textures

Tested on r300 only, other cards may require adjusting texture_compressed_row_align.

15 years agoradeon: fix glCompressedTexSubImage
Maciej Cencora [Sat, 21 Nov 2009 14:56:02 +0000 (15:56 +0100)]
radeon: fix glCompressedTexSubImage

15 years agoradeon: fix compressed mipmapped textures
Maciej Cencora [Sat, 21 Nov 2009 14:56:23 +0000 (15:56 +0100)]
radeon: fix compressed mipmapped textures

Tested on r300 only, other cards may require adjusting texture_compressed_row_align.

15 years agoradeon: fix glCompressedTexSubImage
Maciej Cencora [Sat, 21 Nov 2009 14:56:02 +0000 (15:56 +0100)]
radeon: fix glCompressedTexSubImage

15 years agointel: make CopyTex[Sub]Image fallback debug messages more consistent
Roland Scheidegger [Sat, 21 Nov 2009 12:39:30 +0000 (04:39 -0800)]
intel: make CopyTex[Sub]Image fallback debug messages more consistent

15 years agomesa: handle different RowStride in _mesa_get_compressed_teximage
Roland Scheidegger [Sat, 21 Nov 2009 12:22:50 +0000 (04:22 -0800)]
mesa: handle different RowStride in _mesa_get_compressed_teximage

drivers storing compressed textures with non-native stride but relying on
_mesa_get_compressed_teximage for GetCompressedTexImage otherwise won't
work correctly (for instance i965 compressed mipmaps).

15 years agoi965: Fix several memory leaks on exit.
Eric Anholt [Sat, 21 Nov 2009 12:33:21 +0000 (13:33 +0100)]
i965: Fix several memory leaks on exit.

Bug #25194.

15 years agor300g: silence warnings
Marek Olšák [Thu, 19 Nov 2009 21:40:11 +0000 (22:40 +0100)]
r300g: silence warnings

15 years agor300g: fix typo in r300_reg.h to prevent the RS unit from doing random things
Marek Olšák [Thu, 19 Nov 2009 19:41:19 +0000 (20:41 +0100)]
r300g: fix typo in r300_reg.h to prevent the RS unit from doing random things

And reorder fragment shader inputs so that the colors are before texcoords,
as is allocated by the shader compiler. This commit makes VS->FS attribute
routing work on R500.

15 years agor300g: fix updating a vertex format
Marek Olšák [Sun, 15 Nov 2009 15:41:25 +0000 (16:41 +0100)]
r300g: fix updating a vertex format

We must update PSC when we change the vertex format, e.g. vertex colors
from RGBA to BGRA.

15 years agor300g: add texture lod clamping
Marek Olšák [Sat, 14 Nov 2009 22:27:20 +0000 (23:27 +0100)]
r300g: add texture lod clamping

These now work:
piglit/lodclamp
piglit/levelclamp

15 years agor300g: Begin separating HW TCL and SW TCL state and setup.
Corbin Simpson [Sun, 15 Nov 2009 04:25:15 +0000 (05:25 +0100)]
r300g: Begin separating HW TCL and SW TCL state and setup.

This patch removes draw_context entirely from the HW TCL path and cleans up
a few other things along the way. Hopefully, nothing got broken.

Thanks to Marek Olšák for testing, review, and pointing out my bugs. :3

15 years agost/egl: Fix memory leak in egl_tracker.c.
Vinson Lee [Sat, 21 Nov 2009 00:33:25 +0000 (16:33 -0800)]
st/egl: Fix memory leak in egl_tracker.c.

15 years agodraw: Initialize variable in draw_pt.c.
Vinson Lee [Sat, 21 Nov 2009 00:03:48 +0000 (16:03 -0800)]
draw: Initialize variable in draw_pt.c.

15 years agoprogs/xdemos: Fix memory leak in pbinfo.c.
Vinson Lee [Fri, 20 Nov 2009 23:52:53 +0000 (15:52 -0800)]
progs/xdemos: Fix memory leak in pbinfo.c.

15 years agoprogs/xdemos: Fix memory leak in pbdemo.c.
Vinson Lee [Fri, 20 Nov 2009 23:48:29 +0000 (15:48 -0800)]
progs/xdemos: Fix memory leak in pbdemo.c.

15 years agoprogs/xdemos: Fix memory leak in glxpbdemo.c.
Vinson Lee [Fri, 20 Nov 2009 23:18:19 +0000 (15:18 -0800)]
progs/xdemos: Fix memory leak in glxpbdemo.c.

15 years agor300g: emit R300_TEX_ENABLE to indicate there are no textures bound
Marek Olšák [Fri, 20 Nov 2009 04:17:00 +0000 (05:17 +0100)]
r300g: emit R300_TEX_ENABLE to indicate there are no textures bound

Previously, this reg wasn't emitted at all if texture_count == 0.

15 years agor300g: remove variant states from emit_state_invariant
Marek Olšák [Thu, 19 Nov 2009 20:07:20 +0000 (21:07 +0100)]
r300g: remove variant states from emit_state_invariant

15 years agoprogs/xdemos: Remove duplicate code in glxinfo.c.
Vinson Lee [Fri, 20 Nov 2009 23:06:56 +0000 (15:06 -0800)]
progs/xdemos: Remove duplicate code in glxinfo.c.

15 years agoprogs/xdemos: Add assert in corender.c.
Vinson Lee [Fri, 20 Nov 2009 23:03:16 +0000 (15:03 -0800)]
progs/xdemos: Add assert in corender.c.

15 years agor300g: Texrect factor cleanup.
Corbin Simpson [Fri, 20 Nov 2009 22:55:22 +0000 (14:55 -0800)]
r300g: Texrect factor cleanup.

(0, 0, 0, 1) is a much saner default value, and texrect factors only need
to be (1/s, 1/t, 0, 1).

15 years agor300g: fix rectangle textures on r3xx
Marek Olšák [Sat, 14 Nov 2009 21:14:42 +0000 (22:14 +0100)]
r300g: fix rectangle textures on r3xx

Adapted from Maciej Cencora's patch.

15 years agoi915g: Add missing break statement in i915_debug.c.
Vinson Lee [Fri, 20 Nov 2009 22:31:42 +0000 (14:31 -0800)]
i915g: Add missing break statement in i915_debug.c.

15 years agogallium/util: Initialize variables in u_pack_color.h.
Vinson Lee [Fri, 20 Nov 2009 22:20:15 +0000 (14:20 -0800)]
gallium/util: Initialize variables in u_pack_color.h.

15 years agor300g: Clean up bitcounting function.
Corbin Simpson [Fri, 20 Nov 2009 22:10:59 +0000 (14:10 -0800)]
r300g: Clean up bitcounting function.

I didn't see this in u_math; surely somebody else has this wheel
reinvented elsewhere.

15 years agor300g: Use MAX3 and MIN3.
Corbin Simpson [Fri, 20 Nov 2009 22:10:45 +0000 (14:10 -0800)]
r300g: Use MAX3 and MIN3.

15 years agoutil: Add MAX3 and MIN3.
Corbin Simpson [Fri, 20 Nov 2009 22:08:58 +0000 (14:08 -0800)]
util: Add MAX3 and MIN3.

15 years agor300g: set better values in the R300_VAP_CNTL register
Marek Olšák [Thu, 19 Nov 2009 00:35:08 +0000 (01:35 +0100)]
r300g: set better values in the R300_VAP_CNTL register

15 years agoFix comment to use /* */ rather than //
Alan Hourihane [Fri, 20 Nov 2009 18:11:30 +0000 (18:11 +0000)]
Fix comment to use /* */ rather than //

15 years agoFix indentation.
Alan Hourihane [Fri, 20 Nov 2009 18:10:54 +0000 (18:10 +0000)]
Fix indentation.

15 years agoFix vega compilation.
Alan Hourihane [Fri, 20 Nov 2009 18:09:10 +0000 (18:09 +0000)]
Fix vega compilation.

15 years agoFix memory leak.
Alan Hourihane [Fri, 20 Nov 2009 18:08:29 +0000 (18:08 +0000)]
Fix memory leak.

15 years agor600 : eliminate Wondows line ending for test code.
Richard Li [Fri, 20 Nov 2009 15:58:05 +0000 (10:58 -0500)]
r600 : eliminate Wondows line ending for test code.

15 years agoMerge remote branch 'origin/mesa_7_7_branch'
Dave Airlie [Fri, 20 Nov 2009 01:48:10 +0000 (11:48 +1000)]
Merge remote branch 'origin/mesa_7_7_branch'

15 years agor100: fix texture_from_pixmap and compiz.
Dave Airlie [Fri, 20 Nov 2009 01:45:43 +0000 (11:45 +1000)]
r100: fix texture_from_pixmap and compiz.

r100 state emission has separate rect and non-rect states,
if we are doing TFP for a TEXTURE_2D we shouldn't use the rect
states as they won't get emitted properly.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agor600 : Clean up a bit test code mess.
Richard Li [Thu, 19 Nov 2009 22:41:10 +0000 (17:41 -0500)]
r600 : Clean up a bit test code mess.

15 years agost/xorg: Fix infinite loop in copy_packed_data.
Vinson Lee [Thu, 19 Nov 2009 22:38:39 +0000 (14:38 -0800)]
st/xorg: Fix infinite loop in copy_packed_data.

15 years agoprogs/xdemos: Add missing break statement in offset.c.
Vinson Lee [Thu, 19 Nov 2009 22:20:26 +0000 (14:20 -0800)]
progs/xdemos: Add missing break statement in offset.c.

15 years agost/mesa: replace st_flush() with pipe->flush()
Brian Paul [Thu, 19 Nov 2009 22:18:17 +0000 (15:18 -0700)]
st/mesa: replace st_flush() with pipe->flush()

We only need to flush the gallium driver in this case.
Fixes a recursive state validation bug.

15 years agovbo: added recursion check in vbo_exec_FlushVertices()
Brian Paul [Thu, 19 Nov 2009 22:17:56 +0000 (15:17 -0700)]
vbo: added recursion check in vbo_exec_FlushVertices()

15 years agor600 : change shader pop method for now.
Richard Li [Thu, 19 Nov 2009 21:55:16 +0000 (16:55 -0500)]
r600 : change shader pop method for now.

15 years agost/mesa: get rid of compressed_num_bytes() code
Brian Paul [Thu, 19 Nov 2009 21:35:38 +0000 (14:35 -0700)]
st/mesa: get rid of compressed_num_bytes() code

15 years agost/mesa: remove is_compressed_mesa_format()
Brian Paul [Thu, 19 Nov 2009 21:17:09 +0000 (14:17 -0700)]
st/mesa: remove is_compressed_mesa_format()

15 years agost/mesa: remove pointless assertion
Brian Paul [Thu, 19 Nov 2009 21:10:57 +0000 (14:10 -0700)]
st/mesa: remove pointless assertion

15 years agosoftpipe: whitespace/indentation fixes
Brian Paul [Thu, 19 Nov 2009 21:02:06 +0000 (14:02 -0700)]
softpipe: whitespace/indentation fixes

15 years agoMerge branch 'master' of ssh://richardradeon@git.freedesktop.org/git/mesa/mesa
Richard Li [Thu, 19 Nov 2009 21:17:13 +0000 (16:17 -0500)]
Merge branch 'master' of ssh://richardradeon@git.freedesktop.org/git/mesa/mesa

15 years agor600 : check in shader code test enable flag: if flag
Richard Li [Thu, 19 Nov 2009 21:05:43 +0000 (16:05 -0500)]
r600 : check in shader code test enable flag: if flag
R600_ENABLE_GLSL_TEST defined, IL shader code will goto r600 assembler.
The test base is /mesa/progs/glsl/brick, and changes
shader code in CH06-brick.frag/vert to test different logic op
combination. (if,else,while,function,...). The stack depth code is not
in yet, so it is hard coded now. So complex code would not run (such as
things like 8 loops embeded loop in loop).

15 years agoprogs/trivial: Redraw upon keypress.
Vinson Lee [Thu, 19 Nov 2009 21:03:12 +0000 (13:03 -0800)]
progs/trivial: Redraw upon keypress.

15 years agopb: Make fenced buffers threadsafe.
José Fonseca [Thu, 19 Nov 2009 19:46:21 +0000 (19:46 +0000)]
pb: Make fenced buffers threadsafe.

15 years agosoftpipe: add missing check in softpipe_is_texture_referenced()
Brian Paul [Thu, 19 Nov 2009 18:37:50 +0000 (11:37 -0700)]
softpipe: add missing check in softpipe_is_texture_referenced()

Check if the named texture is referenced by the texture cache.

15 years agost/xorg: Replace compile-time acceleration switch with Option "2DAccel".
Michel Dänzer [Thu, 19 Nov 2009 16:52:55 +0000 (17:52 +0100)]
st/xorg: Replace compile-time acceleration switch with Option "2DAccel".

This option can be used to disable 2D acceleration. DRI2 and XVideo blits will
still be accelerated, at least to some degree even with compositing.

15 years agost/xorg: Miscellaneous XVideo fixes.
Michel Dänzer [Thu, 19 Nov 2009 16:47:21 +0000 (17:47 +0100)]
st/xorg: Miscellaneous XVideo fixes.

* Make sure the destination pixmap has a texture to render into.
* Fix damage reporting so the EXA migration code can do the right thing.
* Fix destination coordinates for redirected windows.

15 years agost/xorg: Try harder to ensure a shared texture has valid contents right away.
Michel Dänzer [Thu, 19 Nov 2009 16:30:32 +0000 (17:30 +0100)]
st/xorg: Try harder to ensure a shared texture has valid contents right away.

15 years agost/xorg: Don't complain about convolution filter being 'unknown'.
Michel Dänzer [Thu, 19 Nov 2009 16:25:05 +0000 (17:25 +0100)]
st/xorg: Don't complain about convolution filter being 'unknown'.

Also add a newline to the complaint so it'll be a little less annoying if we
actually encounter an unknown filter value again.

15 years agointel: Remove non-GEM support.
Eric Anholt [Wed, 18 Nov 2009 17:15:25 +0000 (18:15 +0100)]
intel: Remove non-GEM support.

This really isn't supported at this point.  GEM's been in the kernel for
a year, and the fake bufmgr never really worked.

15 years agointel: Remove dead intel_context members and move some packing around.
Eric Anholt [Wed, 18 Nov 2009 11:43:16 +0000 (03:43 -0800)]
intel: Remove dead intel_context members and move some packing around.

15 years agointel: Remove our special color packing macros and just use colormac.h.
Eric Anholt [Wed, 18 Nov 2009 11:39:20 +0000 (03:39 -0800)]
intel: Remove our special color packing macros and just use colormac.h.

15 years agointel: Pack colors for blit at blit time, rather than at ClearColor.
Eric Anholt [Wed, 18 Nov 2009 11:32:35 +0000 (03:32 -0800)]
intel: Pack colors for blit at blit time, rather than at ClearColor.

15 years agointel: Consistently use no_batch_wrap in intel_context struct.
Eric Anholt [Wed, 18 Nov 2009 11:21:17 +0000 (03:21 -0800)]
intel: Consistently use no_batch_wrap in intel_context struct.

15 years agoi965: Pack brw_wm_fragment_program better.
Eric Anholt [Wed, 18 Nov 2009 11:13:14 +0000 (03:13 -0800)]
i965: Pack brw_wm_fragment_program better.

15 years agomesa: Remove gratuitous padding in prog_dst_register.
Eric Anholt [Wed, 18 Nov 2009 11:05:14 +0000 (03:05 -0800)]
mesa: Remove gratuitous padding in prog_dst_register.

The padding was there to indicate the amount of space left from the
number of expected bytes in the struct minus allocated bits.  But
uint bitfields get packed so that they don't cross uint boundaries, and we
ended up allocating an extra dword to hold the pad field!

15 years agoi965: Pack the brw_wm_prog_key better.
Eric Anholt [Wed, 18 Nov 2009 11:01:42 +0000 (03:01 -0800)]
i965: Pack the brw_wm_prog_key better.