mesa.git
12 years agogallium/drivers: Use automake to generate makefile
Tom Stellard [Sat, 3 Mar 2012 14:07:48 +0000 (09:07 -0500)]
gallium/drivers: Use automake to generate makefile

12 years agodocs: fix html in banner.html
Christopher Yeleighton [Wed, 14 Mar 2012 14:05:44 +0000 (08:05 -0600)]
docs: fix html in banner.html

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

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agoglsl: Avoid extra if statements for logic and/or with no side effects.
Eric Anholt [Wed, 8 Feb 2012 06:59:24 +0000 (22:59 -0800)]
glsl: Avoid extra if statements for logic and/or with no side effects.

This avoids extra if statements in the common case of just comparing
two expressions that don't involve assignments or function calls,
along with simplifying the handling of constant expressions.  Reduces
i965 instructions generated in unigine tropics and sanctuary,
yofrankie, warsow, gstreamer shaders, and the weston compositor.

shader-db results:
Total instructions: 213052 -> 212752
38/1246 programs affected (3.0%)
14309 -> 14009 instructions in affected programs (2.1% reduction)

12 years agomesa: add back glGetnUniform*v() overflow error reporting
Dylan Noblesmith [Thu, 22 Dec 2011 21:05:38 +0000 (21:05 +0000)]
mesa: add back glGetnUniform*v() overflow error reporting

The error was removed in:

commit 719909698c67c287a393d2380278e7b7495ae018
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Tue Oct 18 16:01:49 2011 -0700

    mesa: Rewrite the way uniforms are tracked and handled

The GL_ARB_robustness spec doesn't say the implementation
should truncate the output, so just return after setting
the required error like it did before the above commit.

Also fixup an old comment and add an assert.

NOTE: This is a candidate for the 8.0 branch.

12 years agomesa: Fix the cause of piglit test fbo-array failure
Anuj Phogat [Mon, 12 Mar 2012 17:39:48 +0000 (10:39 -0700)]
mesa: Fix the cause of piglit test fbo-array failure

Handle the special case of glFramebufferTextureLayer() for which we pass
teximage = 0 internally in framebuffer_texture(). This patch makes failing
piglit test fbo-array, fbo-depth-array to pass.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47126

V4: Removed the duplicated code.
Note: This is a candidate for the stable branches.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: fix _mesa_DebugMessageCallbackARB() to silence warnings
Brian Paul [Mon, 12 Mar 2012 18:44:48 +0000 (12:44 -0600)]
mesa: fix _mesa_DebugMessageCallbackARB() to silence warnings

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoradeon: remove use of DD_FLATSHADE
Brian Paul [Mon, 12 Mar 2012 18:45:44 +0000 (12:45 -0600)]
radeon: remove use of DD_FLATSHADE

This got missed earlier <sigh>.

12 years agodocs: fix up html tags in autoconf.html
Christopher Yeleighton [Mon, 12 Mar 2012 18:21:24 +0000 (12:21 -0600)]
docs: fix up html tags in autoconf.html

http://bugs.freedesktop.org/show_bug.cgi?id=47241

Signed-off-by: Brian Paul <brianp@vmware.com>
12 years agomesa: add more comments about textarget in framebuffer_texture()
Brian Paul [Mon, 12 Mar 2012 17:03:59 +0000 (11:03 -0600)]
mesa: add more comments about textarget in framebuffer_texture()

12 years agomesa: renumber remaining DD_ constants
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: renumber remaining DD_ constants

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: remove unused DD_TRI_CULL_FRONT_BACK
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove unused DD_TRI_CULL_FRONT_BACK

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: remove unused DD_FLATSHADE
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove unused DD_FLATSHADE

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: remove unused DD_TRI_TWOSTENCIL
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove unused DD_TRI_TWOSTENCIL

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: remove _DD_NEW_x flags
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove _DD_NEW_x flags

They're no longer used anywhere.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agotnl: stop using _DD_NEW_x flags
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
tnl: stop using _DD_NEW_x flags

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoswrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
swrast: s/_DD_NEW_SEPARATE_SPECULAR/_MESA_NEW_SEPARATE_SPECULAR/

Another step toward removing the _DD_NEW_x flags

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: define _MESA_NEW_SEPARATE_SPECULAR
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: define _MESA_NEW_SEPARATE_SPECULAR

This will replace the soon-to-be-removed _DD_NEW_SEPARATE_SPECULAR flag.
Note: there's a similar composite _MESA_NEW_NEED_EYE_COORDS flag set already.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi915: remove occurances of _DD_NEW_x flags
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
i915: remove occurances of _DD_NEW_x flags

Just use the corresponding _NEW_x flags intead.  The _DD_NEW_x flags
will be removed in a following patch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agomesa: remove ctx->Driver.ClearColor() hook
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove ctx->Driver.ClearColor() hook

The driver Clear() function should just grab the clear color out of the
context.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agomesa/gdi: remove clear_color() function
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa/gdi: remove clear_color() function

Setup the clearing color in the clear() function.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agoxlib: remove clear_color() function
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
xlib: remove clear_color() function

Just setup the clearing color in clear_buffers().

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon/r200: remove ClearColor driver functions
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
radeon/r200: remove ClearColor driver functions

The state.color.clear value was never used anywhere.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: remove ctx->Driver.ClearDepth(), ClearStencil() driver hooks
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
mesa: remove ctx->Driver.ClearDepth(), ClearStencil() driver hooks

Not used by any drivers.  Drivers can easily access the values
from the Mesa context at glClear() time.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon/r200: remove ClearDepth() and ClearStencil() driver hooks
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
radeon/r200: remove ClearDepth() and ClearStencil() driver hooks

The computed stencil.clear and depth.clear values aren't used anywhere.
Those fields have been removed too.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon/r200: remove hyperz/fast clear testing code
Brian Paul [Mon, 12 Mar 2012 00:31:32 +0000 (18:31 -0600)]
radeon/r200: remove hyperz/fast clear testing code

The flags which were computed were never actually used.

Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agodocs: Fix unclosed anchor tag in xlibdriver.html.
Kenneth Graunke [Mon, 12 Mar 2012 06:38:36 +0000 (23:38 -0700)]
docs: Fix unclosed anchor tag in xlibdriver.html.

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

12 years agoegl/drm: Include errno.h
José Fonseca [Sun, 11 Mar 2012 19:51:00 +0000 (19:51 +0000)]
egl/drm: Include errno.h

Fixes scons build.

12 years agoSet close on exec flag FD_CLOEXEC
David Fries [Sat, 10 Dec 2011 17:28:45 +0000 (11:28 -0600)]
Set close on exec flag FD_CLOEXEC

Set the close on exec flag when opening dri character devices, so they
will be closed and free any resouces allocated in exec.

Signed-off-by: David Fries <David@Fries.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomapi/glapi: Fix glDebugMessageCallbackARB arg type to GLDEBUGPROCARB
José Fonseca [Sun, 11 Mar 2012 10:47:23 +0000 (10:47 +0000)]
mapi/glapi: Fix glDebugMessageCallbackARB arg type to GLDEBUGPROCARB

Necessary to prevent type mismatches on MinGW.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoglapi/gen: Add support for pointer types.
José Fonseca [Sun, 11 Mar 2012 10:47:22 +0000 (10:47 +0000)]
glapi/gen: Add support for pointer types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: Prevent collision of ERROR define on Windows.
José Fonseca [Sun, 11 Mar 2012 10:47:21 +0000 (10:47 +0000)]
mesa: Prevent collision of ERROR define on Windows.

This issue might recur on other OSes. If so then it might be better
to remove the C-preprocessor magic, and use fully qualified defines
instead.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoinclude: Fix glDebugMessageCallbackARB's prototype.
José Fonseca [Sun, 11 Mar 2012 10:47:20 +0000 (10:47 +0000)]
include: Fix glDebugMessageCallbackARB's prototype.

Seems to be a bug in Khronos headers, as

http://www.opengl.org/registry/specs/ARB/debug_output.txt states userParam
is not a const pointer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agomesa: expose ARB_debug_output
Marek Olšák [Tue, 14 Feb 2012 13:26:23 +0000 (14:26 +0100)]
mesa: expose ARB_debug_output

12 years agomesa: display list dispatch for ARB_debug_output
Marek Olšák [Wed, 15 Feb 2012 00:18:43 +0000 (01:18 +0100)]
mesa: display list dispatch for ARB_debug_output

12 years agomesa: print GL errors via debug_output
Marek Olšák [Tue, 14 Feb 2012 22:27:17 +0000 (23:27 +0100)]
mesa: print GL errors via debug_output

12 years agomesa: implement the last of GL_ARB_debug_output
nobled [Wed, 4 May 2011 19:42:55 +0000 (19:42 +0000)]
mesa: implement the last of GL_ARB_debug_output

Store client-defined message IDs in a hash table,
and sort them by severity into three linked lists
so they can be selected by severity level later.

12 years agomesa: add struct for managing client debug namespaces
nobled [Wed, 4 May 2011 14:40:35 +0000 (14:40 +0000)]
mesa: add struct for managing client debug namespaces

The final piece of the puzzle for GL_ARB_debug_output.

12 years agomesa: add control for categories of application-provided messages
nobled [Mon, 2 May 2011 20:31:00 +0000 (20:31 +0000)]
mesa: add control for categories of application-provided messages

This state is needed for deciding whether or not to log
application messages with IDs that haven't been specifically
passed to glDebugMessageControlARB yet.

State for each individual ID number ever passed to
glDebugMessageControlARB (per-context) still needs to be added.

12 years agomesa: add yet more context fields for GL_ARB_debug_output
nobled [Mon, 2 May 2011 17:52:28 +0000 (17:52 +0000)]
mesa: add yet more context fields for GL_ARB_debug_output

12 years agomesa: add glDebugMessageControlARB
nobled [Mon, 2 May 2011 17:48:05 +0000 (17:48 +0000)]
mesa: add glDebugMessageControlARB

Controlling the output of client-provided messages
isn't done yet.

12 years agomesa: add message-toggle booleans for GL_ARB_debug_output
nobled [Mon, 2 May 2011 17:43:38 +0000 (17:43 +0000)]
mesa: add message-toggle booleans for GL_ARB_debug_output

12 years agomesa: add some GL_ARB_debug_output functions
nobled [Mon, 2 May 2011 17:20:55 +0000 (17:20 +0000)]
mesa: add some GL_ARB_debug_output functions

12 years agomesa: add infrastructure for GL_ARB_debug_output
nobled [Sun, 1 May 2011 15:46:45 +0000 (15:46 +0000)]
mesa: add infrastructure for GL_ARB_debug_output

Marek v2: don't add the extension to extensions.c yet

12 years agoglapi: regenerate files
Marek Olšák [Sat, 10 Sep 2011 09:33:28 +0000 (11:33 +0200)]
glapi: regenerate files

12 years agoglapi: add ARB_debug_output.xml
nobled [Sun, 1 May 2011 15:46:12 +0000 (15:46 +0000)]
glapi: add ARB_debug_output.xml

Marek v2: replace GLDEBUGPROCARB with void*

12 years agomesa: split error handling into its own file
nobled [Sun, 1 May 2011 12:47:31 +0000 (12:47 +0000)]
mesa: split error handling into its own file

Also add _mesa_vsnprintf.

12 years agodrirc: Add force_glsl_extensions_warn workaround for Unigine Heaven.
Kenneth Graunke [Thu, 8 Mar 2012 19:06:42 +0000 (11:06 -0800)]
drirc: Add force_glsl_extensions_warn workaround for Unigine Heaven.

Unfortunately, Unigine Heaven 3.0 still needs this.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agosvga: Disable bogus assertions concerning min_index/max_index.
José Fonseca [Fri, 2 Mar 2012 12:44:00 +0000 (12:44 +0000)]
svga: Disable bogus assertions concerning min_index/max_index.

min_index/max_index are merely conservative guesses, so we can't
make buffer overflow detection based on their values.

Tested-by: Jakob Bornecrantz <jakob@vmware.com>
12 years agomesa: fix GL_LUMINANCE handling in glGetTexImage
Brian Paul [Fri, 9 Mar 2012 03:16:00 +0000 (20:16 -0700)]
mesa: fix GL_LUMINANCE handling in glGetTexImage

There are several cases in which we need to explicity "rebase" colors
(ex: set G=B=0) when getting GL_LUMINANCE textures:
1. If the luminance texture is actually stored as rgba
2. If getting a luminance texture, but returning rgba
3. If getting an rgba texture, but returning luminance

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=46679

Also fixes the new piglit getteximage-luminance test.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agosvga: add null vs pointer check in update_need_pipeline()
Brian Paul [Fri, 9 Mar 2012 15:16:26 +0000 (08:16 -0700)]
svga: add null vs pointer check in update_need_pipeline()

Based on a patch submitted by Vic Lee.  The other part of his patch
which checked the fs pointer wasn't needed.

This fixes a crash when clear() is called before any VS or FS is set.
But this can only happen when the driver is used without the Mesa
state tracker.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agonv50: add support for R8G8_R8B8 and G8R8_B8R8 formats
Christoph Bumiller [Fri, 9 Mar 2012 14:17:36 +0000 (15:17 +0100)]
nv50: add support for R8G8_R8B8 and G8R8_B8R8 formats

12 years agonv50,nvc0: share the format table code
Christoph Bumiller [Fri, 9 Mar 2012 14:19:28 +0000 (15:19 +0100)]
nv50,nvc0: share the format table code

12 years agovl: handle DRI2GetBuffers reply with multiple buffers
Christian König [Thu, 8 Mar 2012 13:10:40 +0000 (14:10 +0100)]
vl: handle DRI2GetBuffers reply with multiple buffers

This fixes a crash in XBMC, but we still doesn't see a picture.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agovl/mpeg12: make bitstream decoder more robust
Christian König [Thu, 8 Mar 2012 10:25:14 +0000 (11:25 +0100)]
vl/mpeg12: make bitstream decoder more robust

Just another xine workaround.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: fix two small memory leaks
Christian König [Wed, 7 Mar 2012 13:51:46 +0000 (14:51 +0100)]
st/vdpau: fix two small memory leaks

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: add xine workaround
Christian König [Mon, 5 Mar 2012 15:44:42 +0000 (16:44 +0100)]
st/vdpau: add xine workaround

For reasons I don't understand xine tries to set
the surface format by using a zero pitch.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agovl/video_buffer: add YUYV and UYVY support
Christian König [Sat, 3 Mar 2012 13:05:54 +0000 (14:05 +0100)]
vl/video_buffer: add YUYV and UYVY support

This gets xine working with VDPAU.

v2: some minor bugfixes.
v3: create the resource with the subsampled
    format to avoid tilling problems

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agor600g: add support for subsampled rgb formats
Christian König [Sat, 3 Mar 2012 11:48:30 +0000 (12:48 +0100)]
r600g: add support for subsampled rgb formats

v2: r600 formats are msb first!

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agogallivm: add support for R8G8_R8B8 and G8R8_B8R8 formats
Christian König [Thu, 8 Mar 2012 11:16:40 +0000 (12:16 +0100)]
gallivm: add support for R8G8_R8B8 and G8R8_B8R8 formats

Just to keep lp_test_format happy.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agogallium: add R8G8_R8B8 and G8R8_B8R8 formats
Christian König [Fri, 2 Mar 2012 12:35:47 +0000 (13:35 +0100)]
gallium: add R8G8_R8B8 and G8R8_B8R8 formats

v2: simplify implementation by using correct swizzle
v3: fix mix with successor patch

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agou_format: fix a comment about subsampled formats
Christian König [Thu, 8 Mar 2012 10:01:49 +0000 (11:01 +0100)]
u_format: fix a comment about subsampled formats

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agomesa: use _mesa_rebase_rgba_float/uint() in glGetTexImage code
Brian Paul [Thu, 1 Mar 2012 03:55:50 +0000 (20:55 -0700)]
mesa: use _mesa_rebase_rgba_float/uint() in glGetTexImage code

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agomesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code
Brian Paul [Thu, 1 Mar 2012 03:55:50 +0000 (20:55 -0700)]
mesa: use _mesa_rebase_rgba_float/uint() in glReadPixels code

See the comments for _mesa_rebase_rgba_float() for details.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=46679

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agomesa: add _mesa_rebase_rgba_float/uint() functions
Brian Paul [Thu, 1 Mar 2012 03:55:49 +0000 (20:55 -0700)]
mesa: add _mesa_rebase_rgba_float/uint() functions

These will be used by glReadPixels() and glGetTexImage() to fix issues
with reading GL_LUMINANCE and other formats.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoglsl: Refine the loop instruction counting.
Eric Anholt [Tue, 21 Feb 2012 21:37:49 +0000 (13:37 -0800)]
glsl: Refine the loop instruction counting.

Before, we were only counting top-level instructions.  But if we have
an assignment of a giant expression tree (such as the ones eventually
generated by glsl-fs-unroll), we were counting the same as an
assignment of a variable deref.

glsl-fs-unroll-explosion now fails in a reasonable amount of time on
i965 because the unrolling didn't go ridiculously far.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agor600g: enable ARB_draw_instanced
Marek Olšák [Thu, 8 Mar 2012 11:20:01 +0000 (12:20 +0100)]
r600g: enable ARB_draw_instanced

12 years agovl/video_buffer: add YUVA and VUYA support
Christian König [Sun, 4 Mar 2012 11:06:18 +0000 (12:06 +0100)]
vl/video_buffer: add YUVA and VUYA support

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agogallium: remove format aliases
Christian König [Fri, 2 Mar 2012 12:11:12 +0000 (13:11 +0100)]
gallium: remove format aliases

They are incomplete and don't make to much sense.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: cleanup YCBCR matching functions
Christian König [Fri, 2 Mar 2012 12:07:01 +0000 (13:07 +0100)]
st/vdpau: cleanup YCBCR matching functions

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: fix chroma_format handling in VideoSurfaceQueryGetPutBitsYCbCrCapabilities
Christian König [Mon, 5 Mar 2012 15:43:15 +0000 (16:43 +0100)]
st/vdpau: fix chroma_format handling in VideoSurfaceQueryGetPutBitsYCbCrCapabilities

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agor600g: use SX_MISC to implement rasterizer discard
Marek Olšák [Wed, 7 Mar 2012 16:15:23 +0000 (17:15 +0100)]
r600g: use SX_MISC to implement rasterizer discard

Yeah I am reworking it again. This is way simpler than the other methods.

12 years agoRevert "r600g: fix and improve rasterizer discard for r600-r700"
Marek Olšák [Thu, 8 Mar 2012 10:15:32 +0000 (11:15 +0100)]
Revert "r600g: fix and improve rasterizer discard for r600-r700"

I will use SX_MISC instead.

This reverts commit 597fd6dc8c424a35f8442d5fd9de708013a69830.

12 years agoRevert "r600g: rework rasterizer discard for evergreen"
Marek Olšák [Thu, 8 Mar 2012 10:14:53 +0000 (11:14 +0100)]
Revert "r600g: rework rasterizer discard for evergreen"

I will use SX_MISC instead.

This reverts commit 734792e83fdc526623d8fe0a60479648c936bd53.

Conflicts:

src/gallium/drivers/r600/evergreen_hw_context.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_hw_context.c
src/gallium/drivers/r600/r600_pipe.h

12 years agosvga: fix the rasterizer state resets
Zack Rusin [Sat, 3 Mar 2012 01:13:38 +0000 (20:13 -0500)]
svga: fix the rasterizer state resets

draw module calls back into the driver and sets certain parts
of the state to whatever it needs, unfortunately unless you
get the ordering of calls to draw just right you'll end up
reseting your own driver state. That's what was happening to us
draw module would under certain conditions reset our own driver
state.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoglx: Also put a symlink from libGL.so in lib/ for now.
Johannes Obermayr [Sat, 3 Mar 2012 17:11:22 +0000 (18:11 +0100)]
glx: Also put a symlink from libGL.so in lib/ for now.

This fixes the libGLU.so.* build when a system libGL.so is not present
since it is relying on the lib/ to build against until it gets
converted to automake.

Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agogbm_dri: Fix DRIimage lookup callback
Benjamin Franzke [Wed, 7 Mar 2012 16:21:20 +0000 (17:21 +0100)]
gbm_dri: Fix DRIimage lookup callback

That is by making the dri extension variables static in gbm_dri.c.

The image_lookup_extension is provided by egl_dri2 when using x11 or wayland
platforms, when using the drm platform, gbm_dri has a wrapper for it.
Both use the same variables name image_lookup_extension.

Since -fvisibility=hidden was (probably by mistake) removed when converting to
automake, the "image_lookup_extension" symbol from egl_dri2.c became exported
in libEGL.so, so "image_lookup_extension" from gbm_dri.c was ignored.
This resulted in calling incorrect callbacks.

We cant make the image_lookup_extension static in egl_dri2.c right now,
since its used across multiple files.

Bugzilla: https://bugs.freedesktop.org/attachment.cgi?id=58099
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
12 years agomesa: handle array textures in strip_texture_border()
Brian Paul [Wed, 7 Mar 2012 15:13:38 +0000 (08:13 -0700)]
mesa: handle array textures in strip_texture_border()

If the texture is a 1D array, don't remove the border pixel from the
height.  Similarly for 2D array textures and the depth direction.
Simplify the function by assuming the border is always one pixel.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
12 years agodocs: add more MinGW prerequisite tips
Brian Paul [Mon, 5 Mar 2012 20:02:59 +0000 (13:02 -0700)]
docs: add more MinGW prerequisite tips

Provided by Charles Huber on the mesa-users list.

12 years agor600g: only emit SX_SURFACE_SYNC on r700 if there's CS checker support
Marek Olšák [Wed, 7 Mar 2012 12:48:38 +0000 (13:48 +0100)]
r600g: only emit SX_SURFACE_SYNC on r700 if there's CS checker support

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

12 years agoi965: handle gl_PointCoord for Gen4 and Gen5 platforms
Yuanhan Liu [Mon, 27 Feb 2012 07:46:32 +0000 (15:46 +0800)]
i965: handle gl_PointCoord for Gen4 and Gen5 platforms

This patch add the support of gl_PointCoord gl builtin variable for
platform gen4 and gen5(ILK).

Unlike gen6+, we don't have a hardware support of gl_PointCoord, means
hardware will not calculate the interpolation coefficient for you.
Instead, you should handle it yourself in sf shader stage.

But badly, gl_PointCoord is a FS instead of VS builtin variable, thus
it's not included in c.vue_map generated in VS stage. Thus the current
code doesn't aware of this attribute. And to handle it correctly, we
need add it to c.vue_map manually to let SF shader generate the needed
interpolation coefficient for FS shader. SF stage has it's own copy of
vue_map, thus I think it's safe to do it manually.

Since handling gl_PointCoord for gen4 and gen5 platforms is somehow a
little special, I added a lot of comments and hope I didn't overdo it ;)

v2: add a /* _NEW_BUFFERS */ comment to note the state flag dependency
    and also add the _NEW_BUFFERS dirty mask (Eric).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45975
Piglit: glsl-fs-pointcoord and fbo-gl_pointcoord

NOTE: This is a candidate for stable release branches.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect check
Yuanhan Liu [Tue, 6 Mar 2012 06:40:32 +0000 (14:40 +0800)]
i915: move the FALLBACK_DRAW_OFFSET check outside the drawing rect check

We have to do fallback when the 'Clipped Drawing Rectangle X/Y Max'
exceed the hardware's limit no matter the drawing rectangle offset
changed or not.

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

NOTE: This is a candidate for stable release branches.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agodri/nouveau: don't use nested functions
nobled [Sun, 4 Mar 2012 20:20:31 +0000 (15:20 -0500)]
dri/nouveau: don't use nested functions

It's a GNU extension that isn't supported by clang right now:
http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Nested-Functions.html
http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc

With this, clang now compiles the nouveau classic driver.

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

(Types changed from e.g. 'unsigned char' to 'GLubyte' so that the types can
be concatenated to form a unique function name without any whitespace
interfering.)

[ Francisco Jerez: give meaningful names to the dispatch functions. ]

12 years agogallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.
Vinson Lee [Tue, 6 Mar 2012 06:00:40 +0000 (22:00 -0800)]
gallivm: Pass in a MCRegisterInfo to MCInstPrinter on llvm-3.1.

llvm-3.1svn r152043 changes createMCInstPrinter to take an additional
MCRegisterInfo argument.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodraw/llvm: add clip distance support
Dave Airlie [Sat, 3 Mar 2012 17:35:43 +0000 (17:35 +0000)]
draw/llvm: add clip distance support

This add clipdistance support like the non-llvm draw paths,
if we have a clip distance we compare with it instead of doing
the dot4.

We also have to put the have_clipvertex bit into the emitted
vertex header.

Fixes vs-clip-distance-all-planes-enabled, vs-clip-distance-const-reject,
vs-clip-distance-enables, vs-clip-distance-implicitly-sized,
vs-clip-distance-in-param, vs-clip-distance-uint-index.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodraw/llvm: fix storing of clipvertex and positions into pre_clip_pos (v2)
Dave Airlie [Sat, 3 Mar 2012 17:07:07 +0000 (17:07 +0000)]
draw/llvm: fix storing of clipvertex and positions into pre_clip_pos (v2)

This fixes the rest of the piglit clipvertex tests.

v2: fixup comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agodraw/llvm: fix clipvertex setting up clipmask. (v2)
Dave Airlie [Sat, 3 Mar 2012 16:58:47 +0000 (16:58 +0000)]
draw/llvm: fix clipvertex setting up clipmask. (v2)

We incorrectly setup clipmask for gl_ClipVertex, this fixes the clipmask
setup.

v2: fix comment

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
fix comment

12 years agogallium: add llvm-related TODOs. (v2)
Dave Airlie [Sun, 4 Mar 2012 13:55:43 +0000 (13:55 +0000)]
gallium: add llvm-related TODOs. (v2)

This is just a simple text file containing a list of goals for gallivm/llvmpipe
and some info on what is required to get there along with some info on who
is looking at things.

v2: add EXT_texture_array.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Fix valid texture target test in _mesa_GetTexLevelParameteriv()
Anuj Phogat [Fri, 2 Mar 2012 20:00:51 +0000 (12:00 -0800)]
mesa: Fix valid texture target test in _mesa_GetTexLevelParameteriv()

_mesa_max_texture_levels() is also used to test valid texture target
in _mesa_GetTexLevelParameteriv(). GL_TEXTURE_CUBE_MAP is not allowed
as texture target in glGetTexLevelParameter(). So, this should throw
GL_INVALID_ENUM error.

Few other functions which use _mesa_max_texture_levels() like
getcompressedteximage_error_check() and getteximage_error_check()
also don't accept GL_TEXTURE_CUBE_MAP.

Above fix makes piglit fbo-cubemap test to fail. This is because of
incorrect texture target passed to _mesa_max_texture_levels() in
framebuffer_texture(). Fixing that as well

Note: This is a candidate for the stable branches

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoegl: Use -no-undefined libtool flag
Jon TURNEY [Sun, 4 Mar 2012 16:17:51 +0000 (16:17 +0000)]
egl: Use -no-undefined libtool flag

"Use -no-undefined to assure libtool that the library has no
unresolved symbols at link time, so that libtool will build a shared
library on platforms require that all symbols are resolved when the
library is linked."

If I had a dollar for every time I wrote this patch, I'd have about
$10 :-)

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965: fixup W-tile offset computation to take swizzling into account
Daniel Vetter [Fri, 2 Mar 2012 20:38:44 +0000 (21:38 +0100)]
i965: fixup W-tile offset computation to take swizzling into account

There's even a comment in the code containing the right swizzling
computations!

Previously this has not been noticed because we need to manually
enabled swizzling on snb/ivb (kernel 3.4 will do that) and we
don't use the separate stencil on ilk (where the bios enables
swizzling). This fixes

piglit ./bin/fbo-stencil  readpixels GL_DEPTH32F_STENCIL8 -auto

on recent drm-intel-next kernels.

Also remove the comment about ivb, it's stale now.

Swizzling detection is done by allocating a temporary x-tiled
buffer object. Unfortunately kernels before v3.2 lie on snb/ivb
because they claim that swizzling is enable, but it isn't. The
kernel commit that fixes this for backport to pre-v3.2 is

commit acc83eb5a1e0ae7dbbf89ca2a1a943ade224bb84
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Sep 12 20:49:16 2011 +0200

    drm/i915: fix swizzling on gen6+

But if the kernel doesn't lie, this now works on swizzling and
not swizzling machines.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agometa: Fix compilation without FEATURE_EXT_transform_feedback
Benjamin Franzke [Wed, 29 Feb 2012 15:36:22 +0000 (16:36 +0100)]
meta: Fix compilation without FEATURE_EXT_transform_feedback

That is when building with --disable-opengl.
Fix for commit cb045880b113b0042d8dfb7e4cdf76e6cc76c1d1.

CC: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agometa: Fix compilation without FEATURE_feedback
Benjamin Franzke [Wed, 29 Feb 2012 15:36:21 +0000 (16:36 +0100)]
meta: Fix compilation without FEATURE_feedback

That is when building with --disable-opengl.
Fix for commit c5f4024a793f1209b1693aed9a46be9374ba4741.

CC: Chad Versace <chad@chad-versace.us>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
12 years agowayland: Use new wl_display_disconnect
Benjamin Franzke [Mon, 5 Mar 2012 19:28:42 +0000 (20:28 +0100)]
wayland: Use new wl_display_disconnect

This replaces the previously used wl_display_destroy.
wl_display_destroy was povided by wayland-client.so and
wayland-server.so, to resolve that conflict its renamed client-side.

12 years agogallivm: fix floating type in lp_build_mod helper
Roland Scheidegger [Mon, 5 Mar 2012 18:09:56 +0000 (19:09 +0100)]
gallivm: fix floating type in lp_build_mod helper

untested, but cannot have worked before.

12 years agost/vdpau: make the interface thread save
Christian König [Thu, 1 Mar 2012 22:03:09 +0000 (23:03 +0100)]
st/vdpau: make the interface thread save

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: implement support for high-precision output timing
Christian König [Thu, 1 Mar 2012 11:42:20 +0000 (12:42 +0100)]
st/vdpau: implement support for high-precision output timing

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/vdpau: implement support for extra mixer layers
Christian König [Wed, 29 Feb 2012 15:37:37 +0000 (16:37 +0100)]
st/vdpau: implement support for extra mixer layers

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agor600g: replace atom_ prefix with _state and _cmd suffixes
Marek Olšák [Mon, 5 Mar 2012 15:20:05 +0000 (16:20 +0100)]
r600g: replace atom_ prefix with _state and _cmd suffixes

12 years agor600g: cleanup includes
Marek Olšák [Mon, 5 Mar 2012 14:17:00 +0000 (15:17 +0100)]
r600g: cleanup includes

12 years agowinsys/radeon: cleanup includes
Marek Olšák [Mon, 5 Mar 2012 14:30:39 +0000 (15:30 +0100)]
winsys/radeon: cleanup includes