mesa.git
16 years agoclean-up swizzle fields in fog code, fix NegateBase
Brian Paul [Wed, 14 May 2008 19:01:13 +0000 (13:01 -0600)]
clean-up swizzle fields in fog code, fix NegateBase

cherry-picked from gallium-0.1

16 years agosync up with gallium-0.1 changes
Brian Paul [Wed, 14 May 2008 19:00:27 +0000 (13:00 -0600)]
sync up with gallium-0.1 changes

New _mesa_num_inst_dst_regs(), _mesa_is_tex_instruction() functions

16 years agoadded _mesa_combine_parameter_lists()
Brian Paul [Wed, 14 May 2008 18:53:03 +0000 (12:53 -0600)]
added _mesa_combine_parameter_lists()

cherry-picked from gallium-0.1

16 years agomesa: added _mesa_insert_instructions()
Brian Paul [Wed, 14 May 2008 18:39:41 +0000 (12:39 -0600)]
mesa: added _mesa_insert_instructions()

Also, use new _mesa_free_instructions() in a few places.

cherry-picked from gallium-0.1

16 years agomesa: added _mesa_free_instructions()
Brian Paul [Wed, 14 May 2008 18:37:07 +0000 (12:37 -0600)]
mesa: added _mesa_free_instructions()

cherry-picked from gallium-0.1

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

16 years ago_generic_read_RGBA_span_BGRA8888_REV_SSE2: It should adjust the source
Xiang, Haihao [Wed, 14 May 2008 01:52:46 +0000 (09:52 +0800)]
_generic_read_RGBA_span_BGRA8888_REV_SSE2: It should adjust the source
and target pointers after do the first 2 pixels. fix bug #15850

16 years agoDon't link demos directly to X libraries
Dan Nicholson [Fri, 9 May 2008 23:19:03 +0000 (16:19 -0700)]
Don't link demos directly to X libraries

Since the linker will just pull in the libraries needed from libGL, we
don't need to link the demos directly to the X libraries. Fixes #15886.

16 years agoautoconf: Allow XCB to be used for GLX
Dan Nicholson [Tue, 6 May 2008 17:51:49 +0000 (10:51 -0700)]
autoconf: Allow XCB to be used for GLX

Adds an --enable-xcb switch to use XCB in GLX. This only has an effect
when the driver is DRI.

16 years agoDefault DRI driver directory to match X.Org xserver
Dan Nicholson [Tue, 6 May 2008 13:21:41 +0000 (06:21 -0700)]
Default DRI driver directory to match X.Org xserver

Since the only valid consumer of the DRI drivers is the X.Org xserver,
this changes the default DRI driver directory to match xorg-server:
${libdir}/dri. The old default of /usr/X11R6/modules/dri was wrong for
nearly all current systems.

16 years agoautoconf: Attempt to figure out the PIC flags for the platform
Dan Nicholson [Tue, 6 May 2008 01:24:21 +0000 (18:24 -0700)]
autoconf: Attempt to figure out the PIC flags for the platform

This commit adds an autoconf macro, MESA_PIC_FLAGS, which sets the
PIC flags according to platform and static/shared setting. The platform
specifics are taken straight from libtool.m4 and stripped down to just
the flags and platforms we cover in Mesa. This should hopefully make it
possible to use autoconf on non-GCC platforms.

The macro is added external to configure.ac in acinclude.m4 since it's
pretty bloated.

Note to BSDers: Previously, x86 defaulted to non-PIC on FreeBSD. I
didn't carry that preference into this macro. Instead, you can just use
--disable-pic where desired.

16 years agointel: use new mipmap generation hooks in driver.
Dave Airlie [Fri, 9 May 2008 03:51:37 +0000 (13:51 +1000)]
intel: use new mipmap generation hooks in driver.

16 years agoswrast/dri: switch over users of generate_mipmap to new interface
Dave Airlie [Fri, 9 May 2008 03:41:02 +0000 (13:41 +1000)]
swrast/dri: switch over users of generate_mipmap to new interface

16 years agoRevert "mesa/intel: map/unmap texture objects around mipmap generation function."
Dave Airlie [Fri, 9 May 2008 03:33:56 +0000 (13:33 +1000)]
Revert "mesa/intel: map/unmap texture objects around mipmap generation function."

This reverts commit c50ffc4cb89b67ae59208eb72cdb664c846ba987.

I'll fix this using the mipmap hooks I just picked from gallium-0.1

16 years agoRemove unused texunit parameter to ctx->Driver.GenerateMipmap()
Brian [Fri, 8 Feb 2008 21:45:58 +0000 (14:45 -0700)]
Remove unused texunit parameter to ctx->Driver.GenerateMipmap()
(cherry picked from commit c3395f4473c8fdf75d04c0dd72e687bc8d8127a7)

16 years agoAdded ctx->Driver.GenerateMipmap() driver hook
Dave Airlie [Fri, 9 May 2008 03:33:06 +0000 (13:33 +1000)]
Added ctx->Driver.GenerateMipmap() driver hook
(cherry picked from commit 4c2f3dbca940f289e67248682b84a3516d5a3031)

Conflicts:

src/mesa/drivers/common/driverfuncs.c

16 years agomesa/intel: map/unmap texture objects around mipmap generation function.
Dave Airlie [Fri, 9 May 2008 03:02:41 +0000 (13:02 +1000)]
mesa/intel: map/unmap texture objects around mipmap generation function.

This at least stops the compiz brain explosion we were seeing, I do wonder
though if we should somehow be calling intel_generate_mipmap somehow.

16 years agoAdd RS690M PCI ID.
Kristian Høgsberg [Thu, 8 May 2008 23:48:32 +0000 (19:48 -0400)]
Add RS690M PCI ID.

16 years agodisable debug printfs
Brian Paul [Thu, 8 May 2008 16:59:31 +0000 (10:59 -0600)]
disable debug printfs

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

16 years agocall glutDestroyWindow()
Brian Paul [Thu, 8 May 2008 14:36:49 +0000 (08:36 -0600)]
call glutDestroyWindow()

16 years agomesa: Call RENDER_FINISH on the zero pixel case.
Xiang, Haihao [Thu, 8 May 2008 03:52:57 +0000 (11:52 +0800)]
mesa: Call RENDER_FINISH on the zero pixel case.

16 years agofix refcounting bugs in tnl/tex program caches
Brian Paul [Thu, 8 May 2008 00:51:44 +0000 (18:51 -0600)]
fix refcounting bugs in tnl/tex program caches

16 years agoupdated options/help
Brian Paul [Wed, 7 May 2008 15:14:10 +0000 (09:14 -0600)]
updated options/help

16 years agoNever fail `make clean'
Dan Nicholson [Wed, 7 May 2008 18:35:23 +0000 (11:35 -0700)]
Never fail `make clean'

Mostly some pedantic changes such that `make clean' always ignores
errors. Also changed the top clean target to do the `touch
configs/current' dance instead of realclean.

16 years agoRun `make clean' in drivers/xorg, too
Dan Nicholson [Wed, 7 May 2008 17:21:01 +0000 (10:21 -0700)]
Run `make clean' in drivers/xorg, too

16 years agoRefactor installation targets
Dan Nicholson [Wed, 7 May 2008 14:48:29 +0000 (07:48 -0700)]
Refactor installation targets

Currently, there is a single path in src/mesa/Makefile to install that
has a few conditionals in it. This commit changes install to act like
default where we loop over $(DRIVER_DIRS), deciding what to do.

A new target, install-headers, has been broken out to accomodate
installing a standalone OSMesa where neither libGL or gl.pc are wanted.

16 years agoEnsure recursive makes always propagate errors
Dan Nicholson [Wed, 7 May 2008 14:11:49 +0000 (07:11 -0700)]
Ensure recursive makes always propagate errors

There were a couple spots left where a recursive make could fail in a
chain of commands without stopping.

16 years agoimplement full reference counting for vertex/fragment programs
Brian [Wed, 7 May 2008 05:08:51 +0000 (23:08 -0600)]
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.

16 years agoUpdate make output for autoconf help
Dan Nicholson [Tue, 6 May 2008 22:46:40 +0000 (15:46 -0700)]
Update make output for autoconf help

16 years agoMerge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa
Dan Nicholson [Tue, 6 May 2008 21:29:59 +0000 (14:29 -0700)]
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa

16 years agoPrevent makedepend from running multiple times
Dan Nicholson [Tue, 6 May 2008 21:27:57 +0000 (14:27 -0700)]
Prevent makedepend from running multiple times

The default target in src/mesa/Makefile calls a recursive $(MAKE). With
parallel jobs, this causes makedepend to run twice. Instead, block on
the first make until depend has been created.

16 years agoAlways cleanup the makedepend backup files
Dan Nicholson [Tue, 6 May 2008 21:00:43 +0000 (14:00 -0700)]
Always cleanup the makedepend backup files

Consistently cleanup the depend.bak files created by makedepend. Also,
realclean has been changed to use a single find command, which speeds it
up considerably.

16 years agoAdd support for ATI_separate_stencil in display lists.
Michal Wajdeczko [Tue, 6 May 2008 20:01:29 +0000 (13:01 -0700)]
Add support for ATI_separate_stencil in display lists.

16 years agoError consistently when running recursive make
Dan Nicholson [Tue, 6 May 2008 19:29:53 +0000 (12:29 -0700)]
Error consistently when running recursive make

When changing directories and running a sub-make, ensure that both the
cd and make commands propagate errors to the parent make.

16 years agoAdd .PHONY targets to top Makefile for non-file targets
Dan Nicholson [Tue, 6 May 2008 18:52:34 +0000 (11:52 -0700)]
Add .PHONY targets to top Makefile for non-file targets

When a make target doesn't result in a file of the same name, adding it
to a .PHONY target means make won't look for such a file, speeding the
build up a bit. This allows `make doxygen' to work since otherwise make
will consider the doxygen directory as up to date.

16 years agoautoconf: Replace the configs/current symlink from config.status
Dan Nicholson [Tue, 6 May 2008 18:28:43 +0000 (11:28 -0700)]
autoconf: Replace the configs/current symlink from config.status

Minor tweak so that running config.status will entirely recreate the
configure settings by replacing the configs/current symlink.

16 years agoi965: fix googleearth in classic mode.
Dave Airlie [Tue, 6 May 2008 08:52:47 +0000 (18:52 +1000)]
i965: fix googleearth in classic mode.

In classic mode googleearth triggered a case where vbos weren't getting accounted properly.

16 years agoautoconf: Sanitize asm build for cross-compiling and --enable-*-bit
Dan Nicholson [Mon, 5 May 2008 23:53:35 +0000 (16:53 -0700)]
autoconf: Sanitize asm build for cross-compiling and --enable-*-bit

Two fixes to the asm configuration:
 - Disable when the user is cross-compiling for x86 or x86_64 since it
   requires running an executable compiled for the target host.
 - If the user has specified --enable-32-bit on x86_64 or --enable-64-bit
   on x86, respect that and choose the correct asm architecture.

16 years agor300: fragment.position input needs no blanking out, it's correctly handled in insert...
Markus Amsler [Mon, 5 May 2008 23:32:40 +0000 (01:32 +0200)]
r300: fragment.position input needs no blanking out, it's correctly handled in insert_wpos.

fixes bug 15447

16 years agoautoconf: Error for incompatible version of libdrm
Dan Nicholson [Mon, 5 May 2008 21:38:22 +0000 (14:38 -0700)]
autoconf: Error for incompatible version of libdrm

The DRI modules can only be built against libdrm master (currently
version 2.3.1), so this should be enforced to save people from trying to
build against older versions.

Added a section at the top of the script to consolidate all required
versions.

16 years agoautoconf: More quoting, just to be safe
Dan Nicholson [Mon, 5 May 2008 22:42:53 +0000 (15:42 -0700)]
autoconf: More quoting, just to be safe

16 years agoIgnore xdemos/sharedtex
Dan Nicholson [Mon, 5 May 2008 22:16:52 +0000 (15:16 -0700)]
Ignore xdemos/sharedtex

16 years agoautoconf: Allow non-pkg-config builds to succeed
Dan Nicholson [Mon, 5 May 2008 22:16:22 +0000 (15:16 -0700)]
autoconf: Allow non-pkg-config builds to succeed

The variable no_x was being set to yes when libX11 was not found through
pkg-config. This causes AC_PATH_XTRA to skip its search for the X11
libraries, which was not the intended effect. Also switched to using the
PKG_CHECK_EXISTS autoconf macro.

16 years agoautoconf: Scrape the version from configs/default
Dan Nicholson [Wed, 30 Apr 2008 22:06:00 +0000 (15:06 -0700)]
autoconf: Scrape the version from configs/default

Added the make script version.mk to print the various version numbers
from configs/default. This is used to substitute the version in autoconf
rather than duplicating it in both places.

16 years agoglcore: Set all external variables in configuration
George Sapountzis [Sat, 26 Apr 2008 09:34:11 +0000 (12:34 +0300)]
glcore: Set all external variables in configuration

based on patch by Dan Nicholson <dbn.lists@gmail.com>

16 years agoi965: Don't cast the result of brw_prepare_vertices to an unsigned value.
Xiang, Haihao [Mon, 5 May 2008 05:15:01 +0000 (13:15 +0800)]
i965: Don't cast the result of brw_prepare_vertices to an unsigned value.
      Negative value means other errors, not aperture overflow. fix bug #15752

16 years agor300: fix swtcl texrect path properly.
Dave Airlie [Mon, 5 May 2008 13:49:50 +0000 (23:49 +1000)]
r300: fix swtcl texrect path properly.

We really need to update the shader state so the texrect parameters work.

This should fix compiz looking crappy on rs480 and rs690
(cherry picked from commit 66a5562ce2906fbf5b96d1cee18f9a31a78c4360)

16 years agor300: add R300_NO_TCL to allow testing of non-tcl on tcl cards
Dave Airlie [Sat, 3 May 2008 11:31:22 +0000 (21:31 +1000)]
r300: add R300_NO_TCL to allow testing of non-tcl on tcl cards
(cherry picked from commit 026ef8111a94f6449dfa5e5cc0ae91fca4e68c0c)

16 years agor300: Set correct VAP_CNTL per vertex program.
Markus Amsler [Fri, 2 May 2008 01:58:18 +0000 (01:58 +0000)]
r300: Set correct VAP_CNTL per vertex program.

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 ago[intel] Warnings fixes.
Eric Anholt [Fri, 2 May 2008 19:25:48 +0000 (12:25 -0700)]
[intel] Warnings fixes.

16 years ago[intel] Merge intel_ioctl.h. Not sure how this slipped by in the .c merge.
Eric Anholt [Fri, 2 May 2008 19:25:12 +0000 (12:25 -0700)]
[intel] Merge intel_ioctl.h.  Not sure how this slipped by in the .c merge.

16 years agofix conversion of GLfloat display list IDs
Brian Paul [Thu, 1 May 2008 20:59:34 +0000 (14:59 -0600)]
fix conversion of GLfloat display list IDs

Use floor() to convert to int (per Mark Kildard and the SI).
Also, change translate_id() to return a signed integer since we may be
offsetting from GL_LIST_BASE.

16 years agoAdd support for GL_REPLACE_EXT texture env mode.
Brian Paul [Wed, 30 Apr 2008 22:05:01 +0000 (16:05 -0600)]
Add support for GL_REPLACE_EXT texture env mode.

GL_REPLACE_EXT comes from the ancient GL_EXT_texture extension.  Found an old demo that
actually uses it.
The values of the GL_REPLACE and GL_REPLACE_EXT tokens is different, unfortunately.

16 years agoautoconf: Fail from autoconf if the pkg-config macros aren't defined
Dan Nicholson [Wed, 30 Apr 2008 20:53:37 +0000 (13:53 -0700)]
autoconf: Fail from autoconf if the pkg-config macros aren't defined

Instead of postponing the error from missing pkg-config macros to when
configure is run, make autoconf exit by using m4 macros.

16 years agoadded xdemos/sharedtex.c test
Brian Paul [Wed, 30 Apr 2008 20:43:28 +0000 (14:43 -0600)]
added xdemos/sharedtex.c test

Test that modifications to a texture object in one rendering context are seen
in a second rendering context.
Press 't' to change the texture's image/colors.

16 years agoautoconf: Don't substitute MESA_MAJOR and friends
Dan Nicholson [Wed, 30 Apr 2008 20:28:03 +0000 (13:28 -0700)]
autoconf: Don't substitute MESA_MAJOR and friends

Since the autoconf config inherits from default, we don't need to
duplicate and substitute the MESA_* version numbers in configure.ac.
The version number is only needed in configure for the help text.

16 years agointel: test cpp to ensure mipmap tree matches texture image.
Xiang, Haihao [Wed, 30 Apr 2008 08:27:52 +0000 (16:27 +0800)]
intel: test cpp to ensure mipmap tree matches texture image.

16 years agodisable GL_TEXTURE_1D at end of frame to fix failed assertion
Brian Paul [Tue, 29 Apr 2008 21:02:46 +0000 (15:02 -0600)]
disable GL_TEXTURE_1D at end of frame to fix failed assertion

16 years agomesa: adjust glBitmap coords by a small epsilon
Brian Paul [Fri, 25 Apr 2008 15:46:43 +0000 (09:46 -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.

Cherry picked from gallium-0.1 branch

16 years agor200: fix state submission issue causing bogus textures (bug 15730)
Ove Kaaven [Tue, 29 Apr 2008 20:14:05 +0000 (22:14 +0200)]
r200: fix state submission issue causing bogus textures (bug 15730)

16 years agoChange default of driconf "allow_large_textures" to announce hardware limits.
Michel Dänzer [Tue, 29 Apr 2008 16:43:28 +0000 (18:43 +0200)]
Change default of driconf "allow_large_textures" to announce hardware limits.

The previous default these days served mostly to cause artifical problems with
GLX compositing managers like compiz (see e.g.
http://bugs.freedesktop.org/show_bug.cgi?id=10501).

16 years agobuild fix for xorg driver
Alan Hourihane [Mon, 28 Apr 2008 21:41:42 +0000 (22:41 +0100)]
build fix for xorg driver

16 years ago[i965] short immediate values must be replicated to both halves of the dword
Keith Packard [Fri, 25 Apr 2008 23:07:12 +0000 (16:07 -0700)]
[i965] short immediate values must be replicated to both halves of the dword

The 32-bit immediate value in the i965 instruction word must contain two
copies of any 16-bit constants. brw_imm_uw and brw_imm_w just needed to
copy the value into both halves of the immediate value instruction field.

16 years agoglcore: Respect DESTDIR
Dan Nicholson [Fri, 25 Apr 2008 18:35:00 +0000 (11:35 -0700)]
glcore: Respect DESTDIR

16 years agofix make tarballs
George Sapountzis [Fri, 25 Apr 2008 08:18:09 +0000 (11:18 +0300)]
fix make tarballs

16 years agosilence warning
Alan Hourihane [Fri, 25 Apr 2008 09:39:52 +0000 (10:39 +0100)]
silence warning

16 years agoenable GL_EXT_multi_draw_arrays (see bug 15670)
Pierre Beyssac [Thu, 24 Apr 2008 22:29:34 +0000 (16:29 -0600)]
enable GL_EXT_multi_draw_arrays (see bug 15670)

16 years agoinclude <X11/Xlib.h>
Alan Hourihane [Wed, 23 Apr 2008 14:59:23 +0000 (15:59 +0100)]
include <X11/Xlib.h>

16 years agodrop stray includes of glapi
George Sapountzis [Wed, 4 Apr 2007 09:31:40 +0000 (12:31 +0300)]
drop stray includes of glapi

16 years agoglx: nitpick renames
George Sapountzis [Fri, 18 Apr 2008 14:28:53 +0000 (17:28 +0300)]
glx: nitpick renames

16 years agoglx: split out current context code
George Sapountzis [Fri, 18 Apr 2008 14:28:34 +0000 (17:28 +0300)]
glx: split out current context code

also clean header inclusion after code movement

16 years agoglcore: drop outdated sources files intented for xorg
George Sapountzis [Fri, 18 Apr 2008 14:35:00 +0000 (17:35 +0300)]
glcore: drop outdated sources files intented for xorg

16 years agoglcore: tree sharing for DRI and XMesa
George Sapountzis [Fri, 18 Apr 2008 14:34:45 +0000 (17:34 +0300)]
glcore: tree sharing for DRI and XMesa

16 years agoglcore: build from mesa
George Sapountzis [Fri, 18 Apr 2008 14:34:24 +0000 (17:34 +0300)]
glcore: build from mesa

16 years agorevert part of the previous cleanup - it only applies
Alan Hourihane [Tue, 22 Apr 2008 22:05:11 +0000 (23:05 +0100)]
revert part of the previous cleanup - it only applies
to the 7.0 branch

16 years agoFix error string
Alan Hourihane [Tue, 22 Apr 2008 19:28:35 +0000 (20:28 +0100)]
Fix error string

16 years agocorrect the return value
Alan Hourihane [Tue, 22 Apr 2008 19:29:00 +0000 (20:29 +0100)]
correct the return value

16 years agosmall cleanups
Alan Hourihane [Tue, 22 Apr 2008 19:29:42 +0000 (20:29 +0100)]
small cleanups

16 years agoi965: fix DEPTH_TEXTURE_MODE (bug #14220)
Xiang, Haihao [Tue, 22 Apr 2008 08:25:23 +0000 (16:25 +0800)]
i965: fix DEPTH_TEXTURE_MODE (bug #14220)

16 years ago [i965] This is to fix random crash in some maps of Ut2004 demo.
Zou Nan hai [Tue, 22 Apr 2008 07:50:40 +0000 (15:50 +0800)]
 [i965] This is to fix random crash in some maps of Ut2004 demo.
e.g. bridge of fate.
  If vs output is big, driver may fall back to use 8 urb entries for vs,
unfortunally, for some unknown reason, if vs is working at 4x2 mode,
8 entries is not enough, may lead to gpu hang.

16 years agoi965: save the offset of target buffer after last execution, not relocatee buffer.
Xiang, Haihao [Tue, 22 Apr 2008 03:11:42 +0000 (11:11 +0800)]
i965: save the offset of target buffer after last execution, not relocatee buffer.

16 years agointel: fix an assertion failure. fix bug #15575
Xiang, Haihao [Mon, 21 Apr 2008 09:34:00 +0000 (17:34 +0800)]
intel: fix an assertion failure. fix bug #15575

16 years agoi965: clear the PRESUMED_OFFSET flag from bo_req.hint, not bo_req.flags. fix #15574
Xiang, Haihao [Mon, 21 Apr 2008 06:02:50 +0000 (14:02 +0800)]
i965: clear the PRESUMED_OFFSET flag from bo_req.hint, not bo_req.flags. fix #15574

16 years agoautoconf: Default the build to DRI on OS+CPU combos where it's expected.
Eric Anholt [Fri, 18 Apr 2008 22:03:01 +0000 (15:03 -0700)]
autoconf: Default the build to DRI on OS+CPU combos where it's expected.

16 years agoi965: fixup depth buffer check
Dave Airlie [Fri, 18 Apr 2008 05:37:54 +0000 (15:37 +1000)]
i965: fixup depth buffer check

16 years agoi965: fix vb aperture space check
Dave Airlie [Fri, 18 Apr 2008 05:14:48 +0000 (15:14 +1000)]
i965: fix vb aperture space check

16 years ago965: fix vb upload size check
Dave Airlie [Fri, 18 Apr 2008 05:09:11 +0000 (15:09 +1000)]
965: fix vb upload size check

16 years agoi965: fix gs_prog aperture check
Dave Airlie [Fri, 18 Apr 2008 05:05:35 +0000 (15:05 +1000)]
i965: fix gs_prog aperture check

16 years agoi915: check for depth region before accounting its buffer size
Dave Airlie [Fri, 18 Apr 2008 02:12:53 +0000 (12:12 +1000)]
i915: check for depth region before accounting its buffer size

fd.o bz #15573

16 years agoi965: initial attempt at fixing the aperture overflow
Dave Airlie [Thu, 17 Apr 2008 07:17:23 +0000 (17:17 +1000)]
i965: initial attempt at fixing the aperture overflow

Makes state emission into a 2 phase, prepare sets things up and accounts
the size of all referenced buffer objects. The emit stage then actually
does the batchbuffer touching for emitting the objects.

There is an assert in dri_emit_reloc if a reloc occurs for a buffer
that hasn't been accounted yet.

16 years agoRevert "[i965] renable regative rhw test"
Xiang, Haihao [Thu, 17 Apr 2008 08:30:17 +0000 (16:30 +0800)]
Revert "[i965] renable regative rhw test"

This reverts commit 3158e981f5f37768e9b04765704b9eaece8b899b.
rhw issue has gone away on IGD.

16 years agor200: accept PROGRAM_CONSTANT inputs due to mesa changes
Andrew Randrianasulu [Thu, 17 Apr 2008 00:51:02 +0000 (02:51 +0200)]
r200: accept PROGRAM_CONSTANT inputs due to mesa changes

16 years agobufmgr_fake: disable debugging again
Dave Airlie [Wed, 16 Apr 2008 06:49:32 +0000 (16:49 +1000)]
bufmgr_fake: disable debugging again

16 years agointel: fix _mesa_error ctx I introduced at lsat minute
Dave Airlie [Wed, 16 Apr 2008 06:37:13 +0000 (16:37 +1000)]
intel: fix _mesa_error ctx I introduced at lsat minute

16 years agointel/fake_bufmgr: Attempt to restrict references to objects in a batchbuffer > apert...
Dave Airlie [Wed, 16 Apr 2008 06:22:05 +0000 (16:22 +1000)]
intel/fake_bufmgr: Attempt to restrict references to objects in a batchbuffer > aperture size.

So with compiz on Intel hw with fake bufmgr, opening 4 firefox windows at 1680x1050 and hitting alt-tab, could cause the batchbuffer to try and reference more than the 32MB of RAM allocated.

Fix 1:
Fix 1 is to pre-verify the list of buffers against the current batchbuffer and if it can't possibly fit in the aperture to flush the batchbuffer to the hardware
and try again. If the buffers still can't fit well then you are hosed as I'm not sure there is a nice way to tell anyone.

Fix 2:
Next problem was that even with a simple check for total < aperture, we ran
into fragmentation issues, this meant that half way down a set of buffers,
we would fail as no blocks were available. Fix this by nuking the memory
manager from orbit and letting it start again and relayout the blocks in a
manner that fits.

Fix 3:
Finally the initial problem we were seeing was a memcpy to a NULL backing store.
We seem to end up with a texture at some point that never gets mapped but ends up with data in it. compiz al-tab icons have this property. So I created a card dirty bit that memcpy's any buffer that is !static and is written to back to memory. This probably is wrong but it makes compiz work for now.

Caveats:
965 support is still fail.

16 years agofix multi-draw buffer regression
Brian [Tue, 15 Apr 2008 02:54:13 +0000 (20:54 -0600)]
fix multi-draw buffer regression

16 years agoonly use __x86_64__, not __amd64__ (bug 15503)
Brian Paul [Mon, 14 Apr 2008 20:10:32 +0000 (14:10 -0600)]
only use __x86_64__, not __amd64__ (bug 15503)

16 years agofix GL_ARB_texture_rectangle breakage
Brian Paul [Mon, 14 Apr 2008 19:43:24 +0000 (13:43 -0600)]
fix GL_ARB_texture_rectangle breakage