mesa.git
13 years agowinsys/wayland: Fix warning
Benjamin Franzke [Tue, 21 Jun 2011 07:26:49 +0000 (09:26 +0200)]
winsys/wayland: Fix warning

13 years agost/mesa: Invalidate drawables on context switch
Benjamin Franzke [Tue, 21 Jun 2011 11:25:56 +0000 (13:25 +0200)]
st/mesa: Invalidate drawables on context switch

13 years agor600g: use maths instead of a loop to work out mask.
Dave Airlie [Tue, 21 Jun 2011 05:18:44 +0000 (15:18 +1000)]
r600g: use maths instead of a loop to work out mask.

This is equivalent results with less looping.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: optimise draw vbo function a bit more.
Dave Airlie [Tue, 21 Jun 2011 04:20:49 +0000 (14:20 +1000)]
r600g: optimise draw vbo function a bit more.

this drop a bunch of unnecessary checks (i.e. should be trapped
at gallium level), and also removes the switch statement in favour
of some calculated values for the vgt values.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: reorder LIT instructions to support src == dst
Pierre-Eric Pelloux-Prayer [Mon, 20 Jun 2011 09:42:23 +0000 (11:42 +0200)]
r600g: reorder LIT instructions to support src == dst

the attached patch should be an improvement over Vadim Girlin's patch
fixing LIT instruction for r600g (commit
2fe39b46e73aea37152777fe11d489e0b1bc3f92).

Instructions used in tgsi_lit have been reordered to always write to a
dst channel after the same channel in src has been read (so if src ==
dst, input values are not overwritten before being used).

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agonvfx: nasty hack to make glFinish() actually finish..
Ben Skeggs [Tue, 21 Jun 2011 02:55:01 +0000 (12:55 +1000)]
nvfx: nasty hack to make glFinish() actually finish..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoglx: Fix compile.
Stéphane Marchesin [Tue, 21 Jun 2011 00:18:32 +0000 (17:18 -0700)]
glx: Fix compile.

13 years agost/mesa: Remove unneeded texture format terminators.
Stéphane Marchesin [Mon, 20 Jun 2011 23:31:03 +0000 (16:31 -0700)]
st/mesa: Remove unneeded texture format terminators.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: put const qualifer on format_map table
Brian Paul [Tue, 21 Jun 2011 00:07:28 +0000 (18:07 -0600)]
st/mesa: put const qualifer on format_map table

13 years agoglx: Bind to our context before __glXSetCurrentContext
Jeremy Huddleston [Fri, 17 Jun 2011 19:24:55 +0000 (12:24 -0700)]
glx: Bind to our context before __glXSetCurrentContext

We want to bind to our context before calling __glXSetCurrentContext or
messing with the gc rect in order to properly handle error conditions.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglx: Destroy the old context only after the new one has been bound
Jeremy Huddleston [Fri, 17 Jun 2011 19:28:05 +0000 (12:28 -0700)]
glx: Destroy the old context only after the new one has been bound

This fixes a regression introduced by 49d7e48b33264d94e30af6129c281b6acafa9427

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglx: Allow a context-specific fallback for glXGetProcAddress
Jeremy Huddleston [Wed, 15 Jun 2011 07:27:55 +0000 (00:27 -0700)]
glx: Allow a context-specific fallback for glXGetProcAddress

In applegl, GLX advertises the same extensions provided by OpenGL.framework
even if such extensions are not provided by glapi.  This allows a client
to get access to such API.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoglapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of Frame...
Jeremy Huddleston [Thu, 16 Jun 2011 00:30:56 +0000 (17:30 -0700)]
glapi: Update specs to correctly list FramebufferTextureLayerARB as an alias of FramebufferTextureLayerEXT

FramebufferTextureLayer is an alias of FramebufferTextureLayerEXT, so
FramebufferTextureLayerARB needs to be listed as an alias of
FramebufferTextureLayerEXT rather than FramebufferTextureLayer.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agolinker: Reject shaders that use too many varyings
Ian Romanick [Thu, 9 Jun 2011 20:31:32 +0000 (13:31 -0700)]
linker: Reject shaders that use too many varyings

Previously it was up to the driver or later code generator to reject
these shaders.  It turns out that nobody did this.

This will need changes to support geometry shaders.

NOTE: This is a candidate for the stable branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37743
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglw: Mark all extern symbols GLAPI to regain default visibility (#31294)
Dan Nicholson [Thu, 16 Jun 2011 23:32:42 +0000 (16:32 -0700)]
glw: Mark all extern symbols GLAPI to regain default visibility (#31294)

Since switching to hidden visibility on gcc, GLw apps were failing to
link. Use the GLAPI definition to use default visibility where necessary.

$ nm lib/libGLw.so | grep DrawingArea
0000000000004020 T GLwCreateMDrawingArea
0000000000003430 T GLwDrawingAreaMakeCurrent
0000000000003410 T GLwDrawingAreaSwapBuffers
0000000000204c60 D glwDrawingAreaClassRec
0000000000204d48 D glwDrawingAreaWidgetClass
00000000002053c0 D glwMDrawingAreaClassRec
00000000002054e0 D glwMDrawingAreaWidgetClass

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Tested-by: justin <jlec@gentoo.org>
13 years agoi965/gen6: Apply documented workaround for nonpipelined state packets.
Eric Anholt [Sat, 18 Jun 2011 01:44:26 +0000 (18:44 -0700)]
i965/gen6: Apply documented workaround for nonpipelined state packets.

Fixes a 100% reproducible GPU hang in topogun-1.06-orc-84k.trace.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965/gen6: Limit the workaround flush to once per primitive.
Eric Anholt [Sat, 18 Jun 2011 01:24:56 +0000 (18:24 -0700)]
i965/gen6: Limit the workaround flush to once per primitive.

We're about to call this function in a bunch of state emits, so let's
not spam the hardware with flushes too hard.

13 years agoi965/gen6: Use an BO instead of writing to address 0 for PIPE_CONTROL W/A.
Eric Anholt [Sat, 18 Jun 2011 01:20:36 +0000 (18:20 -0700)]
i965/gen6: Use an BO instead of writing to address 0 for PIPE_CONTROL W/A.

This was spectacularly unsafe.  On my system, address 0 happens to be
the hardware status page for the render ring, and the first quadword
of that happens to contain nothing we ever look at, but I sure didn't
look forward to having to debug some day when, for example, the kernel
happened to bind the ringbuffer before binding the hwsp.

13 years agoi965/gen6: Factor the PIPE_CONTROL workaround to a separate function.
Eric Anholt [Sat, 18 Jun 2011 01:13:02 +0000 (18:13 -0700)]
i965/gen6: Factor the PIPE_CONTROL workaround to a separate function.

We're need this workaorund a lot more than we're currently doing, so
let's reuse it.

13 years agoi965/gen6: Remove state flagging on BRW_NEW_CURBE_OFFSETS.
Eric Anholt [Thu, 16 Jun 2011 00:48:56 +0000 (17:48 -0700)]
i965/gen6: Remove state flagging on BRW_NEW_CURBE_OFFSETS.

That flag was leftover from gen4, where brw_curbe.c is choosing ranges
of the CURBE space for constants to live in, and the unit state tells
where to load them from.  That's not the case on gen6 -- we don't set
this flag (since constants aren't in the URB), nor do we have any
state like that to upload.

13 years agoi965/gen4: Remove old VS unit state key structure.
Eric Anholt [Thu, 16 Jun 2011 00:47:54 +0000 (17:47 -0700)]
i965/gen4: Remove old VS unit state key structure.

We're streaming VS state out now, not caching it.

13 years agoi965/gen6: Add missing state flag for VS push constants.
Eric Anholt [Thu, 16 Jun 2011 00:38:54 +0000 (17:38 -0700)]
i965/gen6: Add missing state flag for VS push constants.

It was already annotated up above and everything.

13 years agoi965/gen6+: Correct gratuitous dependency on NEW_POLYGONSTIPPLE.
Eric Anholt [Thu, 16 Jun 2011 00:35:49 +0000 (17:35 -0700)]
i965/gen6+: Correct gratuitous dependency on NEW_POLYGONSTIPPLE.

That flag is for the contents of the stipple, not the enable flag.

13 years agoi965/gen6+: Add a missing state flag for WM constants.
Eric Anholt [Thu, 16 Jun 2011 00:32:07 +0000 (17:32 -0700)]
i965/gen6+: Add a missing state flag for WM constants.

13 years agowayland: Pass use_invalidate extension to driver
Kristian Høgsberg [Mon, 20 Jun 2011 15:05:26 +0000 (11:05 -0400)]
wayland: Pass use_invalidate extension to driver

13 years agoegl_dri2/x11: Check availability of the dri2 extension
Benjamin Franzke [Sun, 19 Jun 2011 21:48:39 +0000 (23:48 +0200)]
egl_dri2/x11: Check availability of the dri2 extension

Do this before query versions, or xcb will shutdown
and the connection can not be used for swrast.

13 years agodocs: update EGL for changed configure options
Chia-I Wu [Mon, 20 Jun 2011 02:14:56 +0000 (11:14 +0900)]
docs: update EGL for changed configure options

13 years agoconfigure.ac: remove deprecated EGL options
Chia-I Wu [Sun, 19 Jun 2011 23:05:04 +0000 (08:05 +0900)]
configure.ac: remove deprecated EGL options

13 years agoxorg/nouveau: rename to nouveau2
Marcin Slusarz [Mon, 16 May 2011 19:50:29 +0000 (21:50 +0200)]
xorg/nouveau: rename to nouveau2

Signed-off-by: Marek Olšák <maraeo@gmail.com>
13 years agost/xorg: initialize drm_mode.type
Marcin Slusarz [Sun, 5 Jun 2011 19:05:24 +0000 (21:05 +0200)]
st/xorg: initialize drm_mode.type

it's uninitialized, but used by kernel (drm_mode_setcrtc -> drm_mode_set_crtcinfo)

Signed-off-by: Marek Olšák <maraeo@gmail.com>
13 years agost/xorg: add GALLIUM_AUXILIARIES to target dependencies
Marcin Slusarz [Sun, 5 Jun 2011 19:04:49 +0000 (21:04 +0200)]
st/xorg: add GALLIUM_AUXILIARIES to target dependencies

Without it changes to GALLIUM_AUXILIARIES don't induce target rebuild

Signed-off-by: Marek Olšák <maraeo@gmail.com>
13 years agogallium/nouveau: remove unused nouveau_screen_bo_user
Marcin Slusarz [Sun, 8 May 2011 22:35:10 +0000 (00:35 +0200)]
gallium/nouveau: remove unused nouveau_screen_bo_user

13 years agost/xorg: fix crash triggered by rendercheck -t composite -f a8r8g8b8 -o Src, Saturate
Marcin Slusarz [Mon, 16 May 2011 19:52:47 +0000 (21:52 +0200)]
st/xorg: fix crash triggered by rendercheck -t composite -f a8r8g8b8 -o Src, Saturate

samplers[0] may remain uninititialized if src picture/pixmap is null

13 years agost/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear
Marcin Slusarz [Mon, 16 May 2011 19:52:05 +0000 (21:52 +0200)]
st/xorg: fix crash triggered by rendercheck -t blend -f a8r8g8b8 -o Clear

13 years agor600g: implement seamless_cube_map on r600-r700
Marek Olšák [Sun, 19 Jun 2011 21:41:02 +0000 (23:41 +0200)]
r600g: implement seamless_cube_map on r600-r700

st/mesa guarantees that all bound sampler states have the same value
in seamless_cube_map.

13 years agor600g: remove some magic numbers
Marek Olšák [Sun, 19 Jun 2011 21:28:33 +0000 (23:28 +0200)]
r600g: remove some magic numbers

13 years agoconfigure.ac: add back --enable-gallium-egl
Marek Olšák [Sat, 18 Jun 2011 18:33:55 +0000 (20:33 +0200)]
configure.ac: add back --enable-gallium-egl

13 years agoconfigure.ac: Avoid running llvm-config when it hadn't been checked for.
Cyril Brulebois [Wed, 15 Jun 2011 13:50:02 +0000 (15:50 +0200)]
configure.ac: Avoid running llvm-config when it hadn't been checked for.

If --disable-gallium is passed, llvm-config isn't checked for, so mark
it explicitly as absent, through LLVM_CONFIG=no.

Passing --disable-gallium would result in:
| ../configure: line 9739: --version: command not found
| ../configure: line 9740: --cppflags: command not found
| ../configure: line 9741: --libs: command not found
| ../configure: line 9743: --ldflags: command not found

With this commit, one gets that instead:
| configure: error: LLVM is required to build Gallium R300 on x86 and x86_64

Signed-off-by: Cyril Brulebois <kibi@debian.org>
13 years agoconfigure.ac: build r600g by default
Marek Olšák [Tue, 14 Jun 2011 06:31:11 +0000 (08:31 +0200)]
configure.ac: build r600g by default

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoconfigure.ac: add option --with-gallium-drivers=DIRS
Marek Olšák [Tue, 14 Jun 2011 05:46:59 +0000 (07:46 +0200)]
configure.ac: add option --with-gallium-drivers=DIRS

This removes all the --enable-gallium-$driver options and --disable-gallium.

Gallium can be disabled by --with-gallium-drivers= (without parameters).

Default is:
--with-gallium-drivers=r300,swrast

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoconfigure.ac: remove --with-state-trackers
Marek Olšák [Tue, 14 Jun 2011 03:38:58 +0000 (05:38 +0200)]
configure.ac: remove --with-state-trackers

There is an obvious redundancy:

--with-driver=dri VS --with-state-trackers=dri
--with-driver=xlib VS --with-state-trackers=glx
--enable-openvg VS --with-state-trackers=vega
--enable-egl VS --with-state-trackers=egl

This patch adds two new options for the remaining state trackers:
--enable-xorg
--enable-d3d1x

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
13 years agoconfigure.ac: remove redundant option --enable-gallium-egl
Marek Olšák [Tue, 14 Jun 2011 03:14:27 +0000 (05:14 +0200)]
configure.ac: remove redundant option --enable-gallium-egl

We already have --enable-gallium, --enable-egl, and --with-state-trackers=egl.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
13 years agou_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask
Marek Olšák [Sun, 19 Jun 2011 19:02:42 +0000 (21:02 +0200)]
u_vbuf_mgr: make u_vbuf_mgr_draw_begin return flags in a bitmask

13 years agor600g: fix warning: assignment discards qualifiers from pointer target type
Marek Olšák [Sun, 19 Jun 2011 17:42:22 +0000 (19:42 +0200)]
r600g: fix warning: assignment discards qualifiers from pointer target type

13 years agou_vbuf_mgr: fix uploading if format size is greater than stride
Marek Olšák [Sun, 19 Jun 2011 17:38:48 +0000 (19:38 +0200)]
u_vbuf_mgr: fix uploading if format size is greater than stride

13 years agoi965: Enable extension GL_ARB_shader_texture_lod.
Kenneth Graunke [Fri, 10 Jun 2011 22:17:37 +0000 (15:17 -0700)]
i965: Enable extension GL_ARB_shader_texture_lod.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36987

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for TXD with shadow comparisons.
Kenneth Graunke [Fri, 10 Jun 2011 21:48:46 +0000 (14:48 -0700)]
i965/fs: Add support for TXD with shadow comparisons.

Our hardware doesn't have a sample_d_c message, so we have to do a
regular sample_d and emit instructions to manually perform the
comparison.

This requires a state dependent recompile whenever the sampler's compare
mode or function change.  This adds the per-sampler comparison functions
to brw_wm_prog_key, but only sets them when the sampler's compare mode
is GL_COMPARE_R_TO_TEXTURE (i.e. only for shadow sampling).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Refactor texture result swizzling into a helper function.
Kenneth Graunke [Fri, 10 Jun 2011 21:45:24 +0000 (14:45 -0700)]
i965/fs: Refactor texture result swizzling into a helper function.

The next patch will add a few additional uses.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Move sampler fetch to the top of the ir_texture visit function.
Kenneth Graunke [Fri, 10 Jun 2011 21:49:36 +0000 (14:49 -0700)]
i965/fs: Move sampler fetch to the top of the ir_texture visit function.

This makes it available earlier, which will soon be necessary.
(Separating code motion from actual changes.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on gen4.
Kenneth Graunke [Wed, 8 Jun 2011 23:05:34 +0000 (16:05 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on gen4.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on gen5/6.
Kenneth Graunke [Wed, 8 Jun 2011 23:06:49 +0000 (16:06 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on gen5/6.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Add support for non-shadow textureGrad (TXD) on Ivybridge.
Kenneth Graunke [Wed, 8 Jun 2011 23:08:07 +0000 (16:08 -0700)]
i965/fs: Add support for non-shadow textureGrad (TXD) on Ivybridge.

This is somewhat ugly, but I couldn't think of a nicer way to handle the
interleaved coordinate/derivative parameter loading.

Ironlake and Sandybridge will still hit an assertion in visit().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965/fs: Check for compilation failure and bail before optimizing.
Kenneth Graunke [Fri, 10 Jun 2011 23:00:03 +0000 (16:00 -0700)]
i965/fs: Check for compilation failure and bail before optimizing.

Prior to this patch, it would attempt to optimize and allocate registers
for the program even if it failed to compile.  This seems wasteful.

More importantly, the "message length > 11" failure seems to choke the
instruction scheduler, making it somehow use an undefined value and
segmentation fault.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoi965: Use state streaming on programs, and state base address on gen5+.
Eric Anholt [Wed, 27 Apr 2011 20:33:10 +0000 (13:33 -0700)]
i965: Use state streaming on programs, and state base address on gen5+.

There will be a little bit of thrashing of the program cache BO as the
cache warms up, but once the application is in steady state, this
reduces relocations on gen5 and later.

On my T420 laptop, cairogl firefox-talos-gfx performance improves 2.6%
+/- 1.3% (n=6).  No statistically significant performance difference
on nexuiz (n=5).

13 years agoi965: Only flag the new-batch related state as dirty at new batch time.
Eric Anholt [Tue, 14 Jun 2011 22:48:24 +0000 (15:48 -0700)]
i965: Only flag the new-batch related state as dirty at new batch time.

This was debug code from the initial import of the driver.  No
statistically significant performance difference on cairo-gl or
nexuiz (n=6).

13 years agomesa: Fix render-to-texture regression.
Eric Anholt [Sat, 18 Jun 2011 22:59:00 +0000 (15:59 -0700)]
mesa: Fix render-to-texture regression.

Accidentally introduced in fc8c4a3a7b92a1134cd3a9312063abba9e14b0fe.
Fixes fbo-drawbuffers-maxtargets and friends.

13 years agomesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.
Eric Anholt [Wed, 25 May 2011 23:37:09 +0000 (16:37 -0700)]
mesa: Flag _NEW_BUFFERS when unbinding an attachment on glDeleteTextures.

The _ColorDrawBuffers[] wouldn't get updated despite us having updated
what it depends on (Attachments[]->Renderbuffer).  Other callers of
_mesa_remove_attachment are already flagging _NEW_BUFFERS for other
reasons.  The specific bug report that led to this fix (and
the fbo-finish-deleted testcase) was fixed by
23b6f9606dc247488835745668b3686218612536, though.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoi965: Don't try to continue space before the start of a VBO.
Eric Anholt [Sat, 11 Jun 2011 03:19:01 +0000 (20:19 -0700)]
i965: Don't try to continue space before the start of a VBO.

This loop is trying to see if all the buffers to be uploaded happen to
be the same increment from the start of the 3DSTATE_VERTEX_BUFFERS
currently loaded in the hardware.  However, we might be at a smaller
offset than the previous set of VERTEX_BUFFERS, so we can't reuse
because that packet made the first entry be its starting offset (you
can't access outside the given bounds).

Fixes piglit ARB_vertex_buffer_object/elements-negative-offset.

13 years agoi965: Add missing state flag for vertex elements on current VS program.
Eric Anholt [Fri, 10 Jun 2011 22:07:59 +0000 (15:07 -0700)]
i965: Add missing state flag for vertex elements on current VS program.

Fixes a missing 3DSTATE_VERTEX_ELEMENTS on topogun.trace.

13 years agor300g: rename AOS -> VARRAYS
Marek Olšák [Sat, 18 Jun 2011 16:58:57 +0000 (18:58 +0200)]
r300g: rename AOS -> VARRAYS

13 years agor300g: fix handling PREP_* options
Marek Olšák [Fri, 17 Jun 2011 17:21:59 +0000 (19:21 +0200)]
r300g: fix handling PREP_* options

This should fix rendering >65532 vertices using draw_arrays on r300-r400.

NOTE: This is a candidate for the 7.10 branch.

13 years agor600g: fix LIT to handle src==dst properly
Vadim Girlin [Fri, 17 Jun 2011 19:02:01 +0000 (23:02 +0400)]
r600g: fix LIT to handle src==dst properly

Current LIT implementation uses dst components for storing temp
results, possibly overwriting still needed values (depends on the
swizzles).
This patch uses temp reg for one of such cases (found in etqw) and
fixes "LIT R.z, R.xyzz".

Tested on evergreen. Fixes some etqw-demo rendering glitches when
"Lighting" is set to "High" in the settings.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix RSQ to use abs value of operand on evergreen
Vadim Girlin [Fri, 17 Jun 2011 19:02:00 +0000 (23:02 +0400)]
r600g: fix RSQ to use abs value of operand on evergreen

fixes https://bugs.freedesktop.org/show_bug.cgi?id=36917

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fix source box in r600_resource_copy_region
Vadim Girlin [Fri, 17 Jun 2011 19:01:59 +0000 (23:01 +0400)]
r600g: fix source box in r600_resource_copy_region

Source box needs to be adjusted for blitting from compressed formats.

fixes https://bugs.freedesktop.org/show_bug.cgi?id=35434

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: allow depth texture arrays
Brian Paul [Fri, 17 Jun 2011 19:43:06 +0000 (13:43 -0600)]
mesa: allow depth texture arrays

The GL_EXT_texture_array spec allows this (Section 3.8.1).
Fixes failing piglit fbo-depth-array test.

NOTE: This is a candidate for the 7.10 branch.

13 years agost/mesa: remove unneeded test for GL_TRUE
Brian Paul [Fri, 17 Jun 2011 19:28:38 +0000 (13:28 -0600)]
st/mesa: remove unneeded test for GL_TRUE

13 years agost/mesa: remove redundant _mesa_is_depth_format() call
Brian Paul [Fri, 17 Jun 2011 19:25:31 +0000 (13:25 -0600)]
st/mesa: remove redundant _mesa_is_depth_format() call

The _mesa_is_depth_or_stencil_format() call covers all depth
format cases too.

13 years agost/mesa: remove trailing whitespace in st_format.c
Brian Paul [Fri, 17 Jun 2011 19:23:16 +0000 (13:23 -0600)]
st/mesa: remove trailing whitespace in st_format.c

13 years agost/mesa: move comment for ChooseTextureFormat() to right place
Brian Paul [Fri, 17 Jun 2011 19:22:43 +0000 (13:22 -0600)]
st/mesa: move comment for ChooseTextureFormat() to right place

13 years agoapple: Use apple_cgl_get_dl_handle() rather than opening a new handle
Jeremy Huddleston [Wed, 15 Jun 2011 07:22:00 +0000 (00:22 -0700)]
apple: Use apple_cgl_get_dl_handle() rather than opening a new handle

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoscons: List all targets.
José Fonseca [Fri, 17 Jun 2011 19:11:50 +0000 (20:11 +0100)]
scons: List all targets.

13 years agoscons: Remember the options set on the command line.
José Fonseca [Fri, 17 Jun 2011 19:11:35 +0000 (20:11 +0100)]
scons: Remember the options set on the command line.

Save them in config.py

13 years agoscons: Don't list MSVS_VERSION option outside windows platforms.
José Fonseca [Fri, 17 Jun 2011 19:07:12 +0000 (20:07 +0100)]
scons: Don't list MSVS_VERSION option outside windows platforms.

13 years agoscons: Correct glapi USE_xxx_ASM flags.
José Fonseca [Fri, 17 Jun 2011 18:23:06 +0000 (19:23 +0100)]
scons: Correct glapi USE_xxx_ASM flags.

13 years agoscons: Accept verbose=yes instead of quiet=no.
José Fonseca [Fri, 17 Jun 2011 17:42:39 +0000 (18:42 +0100)]
scons: Accept verbose=yes instead of quiet=no.

'verbose' is affirmative, and much more common name for this sort of option.

13 years agoglx: implement drawable refcounting.
Stéphane Marchesin [Wed, 15 Jun 2011 22:09:12 +0000 (15:09 -0700)]
glx: implement drawable refcounting.

The current dri context unbind logic will leak drawables until the process
dies (they will then get released by the GEM code). There are two ways to fix
this: either always call driReleaseDrawables every time we unbind a context
(but that costs us round trips to the X server at getbuffers() time) or
implement proper drawable refcounting. This patch implements the latter.

Signed-off-by: Antoine Labour <piman@chromium.org>
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
13 years agoscons: Move all env setup to scons/gallium.py
José Fonseca [Fri, 17 Jun 2011 15:28:27 +0000 (16:28 +0100)]
scons: Move all env setup to scons/gallium.py

13 years agoscons: make embedding orthogonal to the platform
José Fonseca [Fri, 17 Jun 2011 13:48:28 +0000 (14:48 +0100)]
scons: make embedding orthogonal to the platform

To enable embedding in platforms other than linux.

13 years agomesa: use helper functions to distinguish between user/winsys FBOs
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: use helper functions to distinguish between user/winsys FBOs

And replace IS_CUBE_FACE() macro w/ inline function.

13 years agomesa: refactor, create _mesa_update_draw_buffers() helper
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: refactor, create _mesa_update_draw_buffers() helper

Move this code out of _mesa_make_current() and put it into a
helper function.

13 years agomesa: updated comments in _make_current()
Brian Paul [Thu, 16 Jun 2011 13:31:58 +0000 (07:31 -0600)]
mesa: updated comments in _make_current()

13 years agor600: fix SPI inputs setup on r600/r700
Vadim Girlin [Tue, 14 Jun 2011 17:11:04 +0000 (21:11 +0400)]
r600: fix SPI inputs setup on r600/r700

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agointel: Fix typo in intel_offset_S8 comments
Chad Versace [Tue, 14 Jun 2011 19:56:49 +0000 (12:56 -0700)]
intel: Fix typo in intel_offset_S8 comments

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agoi965/gen5,6: Fix hang when emitting hiz buffer without stencil buffer
Chad Versace [Thu, 9 Jun 2011 04:51:10 +0000 (21:51 -0700)]
i965/gen5,6: Fix hang when emitting hiz buffer without stencil buffer

When emitting either a hiz or stencil buffer, the 'separate stencil
enable' and 'hiz enable' bits are set in 3DSTATE_DEPTH_BUFFER. Therefore
we must emit both 3DSTATE_HIER_DEPTH_BUFFER and 3DSTATE_STENCIL_BUFFER.

Even if there is no stencil buffer, 3DSTATE_STENCIL_BUFFER must be
emitted; failure to do so causes a hang on gen5 and a stall on gen6.

This also fixes a silly, obvious segfault that occured when a hiz buffer
xor separate stencil buffer existed.

Fixes the piglit tests below on Gen5 when hiz and separate stencil are
manually enabled:
    fbo-alphatest-nocolor
    fbo-depth-sample-compare
    fbo
    hiz-depth-read-fbo-d24-s0
    hiz-depth-stencil-test-fbo-d24-s0
    hiz-depth-test-fbo-d24-s0
    hiz-stencil-read-fbo-d0-s8
    hiz-stencil-test-fbo-d0-s8
    fbo-missing-attachment-clear
    fbo-clear-formats
    fbo-depth-*

Changes piglit test result from crash to fail:
    hiz-depth-stencil-test-fbo-d0-s8

Signed-off-by: Chad Versace <chad@chad-versace.us>
13 years agor600g: disable render condition for some blitter operations
Marek Olšák [Wed, 15 Jun 2011 12:26:41 +0000 (14:26 +0200)]
r600g: disable render condition for some blitter operations

13 years agor600g: fix TXD src regs needing fetching.
Mike Kaplinskiy [Wed, 15 Jun 2011 06:56:10 +0000 (16:56 +1000)]
r600g: fix TXD src regs needing fetching.

[airlied: final chunk of Mike's patch from bug 37476
this uses a loop to emit the GRADIENTS and does a check to
see if we need to fetch to a temporary register. It also
increases the context src gpr to 4 which is needed here.]

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: use inlines for some common tex instr setup code.
Mike Kaplinskiy [Wed, 15 Jun 2011 06:26:17 +0000 (16:26 +1000)]
r600g: use inlines for some common tex instr setup code.

[airlied: taken from Mike's patch in bug 37476]

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoglsl/builtins: Actually implement int/ivec variants of abs().
Kenneth Graunke [Wed, 15 Jun 2011 04:36:43 +0000 (21:36 -0700)]
glsl/builtins: Actually implement int/ivec variants of abs().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
NOTE: This is a candidate for stable release branches (and don't forget
      to re-run "make builtins" after cherry-picking.)

13 years agor600g: fix TXD when shadowing is enabled.
Mike Kaplinskiy [Wed, 15 Jun 2011 05:54:21 +0000 (15:54 +1000)]
r600g: fix TXD when shadowing is enabled.

Mike had actually done a lot of the TXD support in a patch in bug
37476 which I see now, I'll add the bits of his work that I didn't think
to add to my work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add TXD support.
Dave Airlie [Wed, 15 Jun 2011 05:15:41 +0000 (15:15 +1000)]
r600g: add TXD support.

This at least passes the piglit arb_shader_texture_lod-texgrad test,
the AMD shader analyzer seems to multiply the V component by an unspecified
constant value no idea why.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoi915g: add const qualifier to silence warning
Brian Paul [Wed, 15 Jun 2011 02:47:47 +0000 (20:47 -0600)]
i915g: add const qualifier to silence warning

13 years agor600g: also set TILE_MODE of the base level
Marek Olšák [Wed, 15 Jun 2011 02:16:05 +0000 (04:16 +0200)]
r600g: also set TILE_MODE of the base level

13 years agor600g: force OpenGL's BASE_LEVEL behavior on r600-r700
Marek Olšák [Wed, 15 Jun 2011 00:24:03 +0000 (02:24 +0200)]
r600g: force OpenGL's BASE_LEVEL behavior on r600-r700

This sets the base level as the zero level, which fixes
piglit/texturing/tex-miplevel-selection*.

The r600 hardware ignores the BASE_LEVEL field in some cases, so we can't
use it.

Evergreen might need this too.

13 years agoglsl/generate_builtins.py: Remove regexp to kill pointer addresses.
Kenneth Graunke [Tue, 14 Jun 2011 00:43:32 +0000 (17:43 -0700)]
glsl/generate_builtins.py: Remove regexp to kill pointer addresses.

Commit 56ef62d9885f805bbfb2243dc860ff425d5b4d3b
"glsl: Generate readable unique names at print time."
changed ir_print_visitor to not generate @0x1234567 suffixes except
where necessary.  So there's no need to manually remove them.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather than...
Jeremy Huddleston [Tue, 14 Jun 2011 19:34:49 +0000 (12:34 -0700)]
glapi: _glapi_create_table_from_handle: Set missing pointers to NoOp rather than NULL

This change to _glapi_create_table_from_handle causes it to fill the dispatch
table with NoOps for unimplemented functionality.  This matches what is done
in indirect_init.c and also allows us to enable logging (when built with
-DDEBUG and the MESA_DEBUG or LIBGL_DEBUG environment variables are set) to
catch cases where clients are trying to use these unimplemented extentions.

Additionally, this fixes some gcc -pedantic warnings.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agost/mesa: fix indentation, whitespace
Brian Paul [Tue, 14 Jun 2011 15:24:50 +0000 (09:24 -0600)]
st/mesa: fix indentation, whitespace

13 years agost/mesa: replace st->ctx with ctx
Brian Paul [Tue, 14 Jun 2011 15:15:36 +0000 (09:15 -0600)]
st/mesa: replace st->ctx with ctx

13 years agost/mesa: fix comments, whitespace
Brian Paul [Tue, 14 Jun 2011 14:40:43 +0000 (08:40 -0600)]
st/mesa: fix comments, whitespace

13 years agodocs: 7.10.3 updates
Brian Paul [Tue, 14 Jun 2011 00:32:39 +0000 (18:32 -0600)]
docs: 7.10.3 updates

13 years agost/mesa: improved is_interleaved_arrays() checking
Brian Paul [Mon, 13 Jun 2011 23:34:20 +0000 (17:34 -0600)]
st/mesa: improved is_interleaved_arrays() checking

Check that the difference in array pointers/offsets from the 0th
array are less than the stride, for both VBOs and user-space arrays.
Previously, we were only doing this for the later.

This tightens up the interleaved array test and fixes a problem with
the llvmpipe driver where we were creating way too many vertex fetch
variants only because the pipe_vertex_element::src_offset values were
changing frequently.  This change results in a 5x speed-up for one of
the viewperf tests.

Also, clean up the function to make it easier to understand.