mesa.git
13 years agor600g: more integer support
Dave Airlie [Wed, 12 Oct 2011 09:01:57 +0000 (10:01 +0100)]
r600g: more integer support

just some more trivial integer changes for r600/r700.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoradeon: fix some regressions in texturing code.
Dave Airlie [Wed, 2 Nov 2011 14:06:44 +0000 (14:06 +0000)]
radeon: fix some regressions in texturing code.

On a piglit run vs 7.11 this fixes 23 tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoscons: Use -static-libstdc++ on 32bits builds w/ Mingw-w64 too.
José Fonseca [Thu, 3 Nov 2011 09:58:52 +0000 (09:58 +0000)]
scons: Use -static-libstdc++ on 32bits builds w/ Mingw-w64 too.

13 years agolibgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics.
José Fonseca [Thu, 3 Nov 2011 09:38:43 +0000 (09:38 +0000)]
libgl-gdi: Mingw-w64 in 32bit mode matches the Mingw32's .DEF semantics.

13 years agodocs: list GL_OES_EGL_image_external in 7.12 release notes
Chia-I Wu [Tue, 1 Nov 2011 04:06:28 +0000 (12:06 +0800)]
docs: list GL_OES_EGL_image_external in 7.12 release notes

13 years agost/mesa: add support for GL_OES_EGL_image_external
Chia-I Wu [Sat, 22 Oct 2011 16:53:21 +0000 (00:53 +0800)]
st/mesa: add support for GL_OES_EGL_image_external

To pipe drivers, external textures are just 2D textures.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agomesa: add support for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:52:38 +0000 (18:52 +0800)]
mesa: add support for GL_OES_EGL_image_external

This is an OpenGL ES specific extension.  External textures are textures that
may be sampled from, but not be updated (no glTexSubImage* and etc.).  The
image data are taken from an EGLImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agomesa: clean up validate_texture_wrap_mode
Chia-I Wu [Sat, 22 Oct 2011 11:56:54 +0000 (19:56 +0800)]
mesa: clean up validate_texture_wrap_mode

GL_TEXTURE_RECTANGLE_NV (and soon GL_TEXTURE_EXTERNAL_OES) is special.  Handle
it in its own if-block.  There should be no functional change.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agomesa: fix a logic error in glFramebufferTexture2D
Chia-I Wu [Sat, 22 Oct 2011 14:17:31 +0000 (22:17 +0800)]
mesa: fix a logic error in glFramebufferTexture2D

Unrecognized texture target should give an error.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoglsl: add support for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:51:06 +0000 (18:51 +0800)]
glsl: add support for GL_OES_EGL_image_external

This extension introduces a new sampler type: samplerExternalOES.
texture2D (and texture2DProj) can be used to do a texture look up in an
external texture.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
13 years agomesa: add GL_OES_EGL_image_external to the extension list
Chia-I Wu [Sun, 23 Oct 2011 10:51:13 +0000 (18:51 +0800)]
mesa: add GL_OES_EGL_image_external to the extension list

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agomesa: add missing defines for GL_OES_EGL_image_external
Chia-I Wu [Sun, 23 Oct 2011 10:36:04 +0000 (18:36 +0800)]
mesa: add missing defines for GL_OES_EGL_image_external

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agomesa, i965: prepare for more than 8 texture targets
Chia-I Wu [Sun, 23 Oct 2011 10:29:17 +0000 (18:29 +0800)]
mesa, i965: prepare for more than 8 texture targets

3-bit fields are used store texture target in several places.  That will fail
when TEXTURE_EXTERNAL_INDEX, which happends to be the 9th texture target, is
added.  Make them 4-bit fields.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoglapi: regenerate files
Chia-I Wu [Sat, 22 Oct 2011 12:47:37 +0000 (20:47 +0800)]
glapi: regenerate files

13 years agoglapi: add entry points for OES_EGL_image_external
Chia-I Wu [Sat, 22 Oct 2011 12:46:32 +0000 (20:46 +0800)]
glapi: add entry points for OES_EGL_image_external

Only enums actually.

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoGLES: upgrade glext.h to revision 13240
Chia-I Wu [Sat, 22 Oct 2011 14:02:07 +0000 (22:02 +0800)]
GLES: upgrade glext.h to revision 13240

Reviewed-by: Brian Paul <brianp@vmware.com>
Acked-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoswrast: simplify the condition test for _swrast_choose_texture_sample_func
Yuanhan Liu [Wed, 2 Nov 2011 06:46:06 +0000 (14:46 +0800)]
swrast: simplify the condition test for _swrast_choose_texture_sample_func

remove another long if condition test. I don't feel a strong need of
this patch. But for it make the code a little simpler(I do think so),
I send it out.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix the low limit of width and height for glRenderbufferStorage
Yuanhan Liu [Tue, 25 Oct 2011 07:36:59 +0000 (15:36 +0800)]
mesa: fix the low limit of width and height for glRenderbufferStorage

glRenderbufferStorage man page says:

  GL_INVALID_VALUE is generated if either of width or height is negative,
  or greater than the value of GL_MAX_RENDERBUFFER_SIZE.

NOTE: this is a candidate for the 7.11 branch

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix inital value for new renderbuffer
Yuanhan Liu [Tue, 25 Oct 2011 07:28:50 +0000 (15:28 +0800)]
mesa: fix inital value for new renderbuffer

EXT_framebuffer_object bspec says:

    Get Value                          Type    Get Command  Initial Value
    -------------------------------    ------  -----------       -----------
    RENDERBUFFER_INTERNAL_FORMAT_EXT   Z+     GetRenderbufferParameterivEXT  RGBA

NOTE: this is a candidate for the 7.11 branch

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: complete the GL_TEXTURE_SWIZZLE* setup
Yuanhan Liu [Fri, 21 Oct 2011 03:27:25 +0000 (11:27 +0800)]
mesa: complete the GL_TEXTURE_SWIZZLE* setup

The ARB_texture_swizzle spec says:
    The error INVALID_OPERATION is generated if TexParameteri,
    TexParameterf, TexParameteriv, or TexParameterfv, parameter <pname>
    is TEXTURE_SWIZZLE_R, TEXTURE_SWIZZLE_G,  TEXTURE_SWIZZLE_B,
    or TEXTURE_SWIZZLE_A, and <param> is not RED, GREEN, BLUE, ALPHA,
    ZERO, or ONE.

    The error INVALID_OPERATION is generated if TexParameteriv, or
    TexParameterfv, parameter <pname> TEXTURE_SWIZZLE_RGBA, and the four
    consecutive values pointed to by <param> are not all RED, GREEN, BLUE,
    ALPHA, ZERO, or ONE.

So, the GL_TEXTURE_SWIZZLE* pname is legal for glTexParameterf(v)

NOTE: this is a candidate for the 7.11 branch

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: remove the redundant check
Yuanhan Liu [Fri, 21 Oct 2011 03:24:18 +0000 (11:24 +0800)]
mesa: remove the redundant check

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agodriconf: updated german translation
Carl-Philip Haensch [Tue, 30 Aug 2011 09:46:01 +0000 (11:46 +0200)]
driconf: updated german translation

13 years agodriconf: updated de.po
Carl-Philip Haensch [Tue, 30 Aug 2011 09:46:00 +0000 (11:46 +0200)]
driconf: updated de.po

13 years agowglSetPixelFormat should ignore the ppfd parameter.
Morgan Armand [Wed, 2 Nov 2011 19:12:39 +0000 (20:12 +0100)]
wglSetPixelFormat should ignore the ppfd parameter.

Signed-off-by: José Fonseca <jfonseca@vmware.com>
13 years agor300g: Fix queries on big endian hosts.
Michel Dänzer [Wed, 2 Nov 2011 15:39:17 +0000 (16:39 +0100)]
r300g: Fix queries on big endian hosts.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
13 years agogallium/util: Add macros for converting from little endian to CPU byte order.
Michel Dänzer [Wed, 2 Nov 2011 17:21:48 +0000 (18:21 +0100)]
gallium/util: Add macros for converting from little endian to CPU byte order.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
13 years agoi965: Add support for integral vertex attributes.
Paul Berry [Tue, 1 Nov 2011 00:31:16 +0000 (17:31 -0700)]
i965: Add support for integral vertex attributes.

When a vertex shader input attribute is declared with an integral type
(e.g. ivec4), we need to ensure that the generated vertex shader code
addresses the vertex attribute register using the proper register
type.  (Previously, we assumed all vertex shader input attributes were
floating-point).

In addition, when uploading vertex data that was specified with
VertexAttribIPointer, we need to instruct the vertex fetch unit to
convert the data to signed or unsigned int, rather than float.  And
when filling in the implied w=1 on a vector with less than 4
components, we need to fill it in with the integer representation of 1
rather than the floating-point representation of 1.

Fixes piglit tests vs-attrib-{ivec4,uvec4}-precision.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Set the "Integer" field of gl_client_array properly.
Paul Berry [Tue, 1 Nov 2011 00:29:17 +0000 (17:29 -0700)]
mesa: Set the "Integer" field of gl_client_array properly.

This patch ensures that gl_client_array::Integer is properly set to
GL_TRUE for vertex attributes specified using glVertexAttribIPointer,
and to GL_FALSE for vertex attributes specified using
glVertexAttribPointer, so that the vertex attributes can be
interpreted properly by driver back-ends.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agoglsl: Fix type mismatch when incrementing or decrementing uint.
Paul Berry [Tue, 1 Nov 2011 01:22:48 +0000 (18:22 -0700)]
glsl: Fix type mismatch when incrementing or decrementing uint.

When converting an expression like "++x" to GLSL IR we were failing to
account for the possibility that x might be an unsigned integral type.
As a result the user would receive a bogus error message "Could not
implicitly convert operands to arithmetic operator".

Fixes piglit tests {vs,fs}-{increment,decrement}-uint.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agogallium/dri: Remove references to vblank.
José Fonseca [Wed, 2 Nov 2011 16:16:50 +0000 (16:16 +0000)]
gallium/dri: Remove references to vblank.

13 years agoFix gallium dri compile and a merge conflict
Kristian Høgsberg [Wed, 2 Nov 2011 16:01:23 +0000 (12:01 -0400)]
Fix gallium dri compile and a merge conflict

13 years agosvga: Tag cursors with the scanout hint
Jakob Bornecrantz [Tue, 1 Nov 2011 04:10:17 +0000 (05:10 +0100)]
svga: Tag cursors with the scanout hint

Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agodri: Remove unused memops.h
Kristian Høgsberg [Fri, 28 Oct 2011 21:47:53 +0000 (17:47 -0400)]
dri: Remove unused memops.h

13 years agodri: Remove a few unused dri helper functions
Kristian Høgsberg [Fri, 28 Oct 2011 21:44:01 +0000 (17:44 -0400)]
dri: Remove a few unused dri helper functions

13 years agodri: Remove unused dri texmem.c
Kristian Høgsberg [Fri, 28 Oct 2011 21:39:40 +0000 (17:39 -0400)]
dri: Remove unused dri texmem.c

13 years agodri: Move _dri_texformat_* to radeon_texture.c
Kristian Høgsberg [Fri, 28 Oct 2011 21:35:16 +0000 (17:35 -0400)]
dri: Move _dri_texformat_* to radeon_texture.c

They are only used by the r200 driver now.

13 years agor200: Don't use driIsTextureResident helper
Kristian Høgsberg [Fri, 28 Oct 2011 21:04:35 +0000 (17:04 -0400)]
r200: Don't use driIsTextureResident helper

With DRI2, textures are always resident and using the DRI texmem helper
here is broken anyway, since nothing else uses it.

13 years agodri: Drop unused dri renderbuffer helper functions
Kristian Høgsberg [Fri, 28 Oct 2011 20:51:11 +0000 (16:51 -0400)]
dri: Drop unused dri renderbuffer helper functions

13 years agodri: Move driUpdateFramebufferSize to dri_util.c
Kristian Høgsberg [Fri, 28 Oct 2011 20:49:44 +0000 (16:49 -0400)]
dri: Move driUpdateFramebufferSize to dri_util.c

drirenderbuffer.[ch] is going bye-bye.

13 years agodri: Remove unnecessary #defines and #includes
Kristian Høgsberg [Fri, 28 Oct 2011 20:27:12 +0000 (16:27 -0400)]
dri: Remove unnecessary #defines and #includes

13 years agodri: Remove unnecessary timestamp pointer indirection
Kristian Høgsberg [Fri, 28 Oct 2011 20:22:03 +0000 (16:22 -0400)]
dri: Remove unnecessary timestamp pointer indirection

13 years agodri: Remove unused fields from __DriverAPIRec
Kristian Høgsberg [Fri, 28 Oct 2011 20:03:11 +0000 (16:03 -0400)]
dri: Remove unused fields from __DriverAPIRec

13 years agodri: Remove dri2.enabled flag
Kristian Høgsberg [Fri, 28 Oct 2011 19:56:15 +0000 (15:56 -0400)]
dri: Remove dri2.enabled flag

DRI2 is always enabled now.

13 years agodri: Remove DRI1 fields from DRI structs
Kristian Høgsberg [Fri, 28 Oct 2011 19:53:20 +0000 (15:53 -0400)]
dri: Remove DRI1 fields from DRI structs

13 years agodri: Remove remaining DRI1 vblank code
Kristian Høgsberg [Fri, 28 Oct 2011 19:47:41 +0000 (15:47 -0400)]
dri: Remove remaining DRI1 vblank code

13 years agodri: Remove cliprect information from __DRIdrawable
Kristian Høgsberg [Fri, 28 Oct 2011 19:40:01 +0000 (15:40 -0400)]
dri: Remove cliprect information from __DRIdrawable

13 years agodri: Drop unused driCalculateSwapUsage
Kristian Høgsberg [Fri, 28 Oct 2011 19:25:09 +0000 (15:25 -0400)]
dri: Drop unused driCalculateSwapUsage

13 years agodri: Remove unused driIntersectArea
Kristian Høgsberg [Fri, 28 Oct 2011 19:23:39 +0000 (15:23 -0400)]
dri: Remove unused driIntersectArea

13 years agodri: Drop __driUtilUpdateDrawableInfo and helper macros
Kristian Høgsberg [Fri, 28 Oct 2011 19:22:43 +0000 (15:22 -0400)]
dri: Drop __driUtilUpdateDrawableInfo and helper macros

13 years agodri: Remove unused driSwapBuffers
Kristian Høgsberg [Fri, 28 Oct 2011 19:18:22 +0000 (15:18 -0400)]
dri: Remove unused driSwapBuffers

13 years agodri: Drop unused driCreateNewContext
Kristian Høgsberg [Fri, 28 Oct 2011 19:17:20 +0000 (15:17 -0400)]
dri: Drop unused driCreateNewContext

13 years agodri: Fold driCreateNewDrawable into dri2CreateNewDrawable
Kristian Høgsberg [Fri, 28 Oct 2011 19:14:41 +0000 (15:14 -0400)]
dri: Fold driCreateNewDrawable into dri2CreateNewDrawable

13 years agodri: Remove unsused driCreateNewScreen
Kristian Høgsberg [Fri, 28 Oct 2011 19:11:15 +0000 (15:11 -0400)]
dri: Remove unsused driCreateNewScreen

13 years agodri: Remove unused __DRIswapInfoRec
Kristian Høgsberg [Fri, 28 Oct 2011 19:08:24 +0000 (15:08 -0400)]
dri: Remove unused __DRIswapInfoRec

13 years agodri: Remove driMediaStreamCounterExtension
Kristian Høgsberg [Fri, 28 Oct 2011 19:02:42 +0000 (15:02 -0400)]
dri: Remove driMediaStreamCounterExtension

Also DRI1-only.

13 years agodri: Remove driSwapControlExtension
Kristian Høgsberg [Fri, 28 Oct 2011 19:01:20 +0000 (15:01 -0400)]
dri: Remove driSwapControlExtension

DRI1-only as well.

13 years agodri: Drop driCopySubBufferExtension
Kristian Høgsberg [Fri, 28 Oct 2011 18:57:34 +0000 (14:57 -0400)]
dri: Drop driCopySubBufferExtension

Another DRI1-only extension.

13 years agodri: Drop driReadDrawableExtension
Kristian Høgsberg [Fri, 28 Oct 2011 18:55:25 +0000 (14:55 -0400)]
dri: Drop driReadDrawableExtension

All DRI2 drivers support setting a separate read drawable.

13 years agodri: Drop driLegacyExtension
Kristian Høgsberg [Fri, 28 Oct 2011 18:52:28 +0000 (14:52 -0400)]
dri: Drop driLegacyExtension

There are no DRI1 drivers left.

13 years agost/dri/sw: add get_image inline helper similar to put_image
George Sapountzis [Wed, 2 Nov 2011 13:02:10 +0000 (15:02 +0200)]
st/dri/sw: add get_image inline helper similar to put_image

TODO: check if GetImage works with passing the pitch as width, similar to PutImage,
which avoids the extra copy, ala dri_sw_displaytarget_display() in src/gallium/winsys/sw/dri/dri_sw_winsys.c

13 years agost/dri/sw: Fix incorrect cast
Benjamin Franzke [Wed, 2 Nov 2011 14:56:23 +0000 (15:56 +0100)]
st/dri/sw: Fix incorrect cast

Missed one casting error due to rebase for commit
98aa2a8f725e44aec8bd998fe436a134e94f13bb.

13 years agost/dri/sw: Implement texture_from_pixmap
Benjamin Franzke [Fri, 9 Sep 2011 08:12:23 +0000 (10:12 +0200)]
st/dri/sw: Implement texture_from_pixmap

This is a cleanup of commit 02f1b50987c0d24da3dcc36dbb44821c20d0660c.

Update tex buffer using a dri_drawable hook from implemented in sw/drisw.c.
This saves us the duplication of dri_drawable.c.

CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
13 years agoRevert "Duplicate state_tracker/dri/sw/dri_drawable.c"
Benjamin Franzke [Fri, 9 Sep 2011 07:34:59 +0000 (09:34 +0200)]
Revert "Duplicate state_tracker/dri/sw/dri_drawable.c"

This reverts commit 569bde1fa7d03fb7688d0d391b32e61e857ad44e.

CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
13 years agoRevert "state_trackers/dri/sw: Implement texture_from_pixmap."
Benjamin Franzke [Fri, 9 Sep 2011 07:34:50 +0000 (09:34 +0200)]
Revert "state_trackers/dri/sw: Implement texture_from_pixmap."

This reverts commit 02f1b50987c0d24da3dcc36dbb44821c20d0660c.

CC: Stuart Abercrombie <sabercrombie@chromium.org>
CC: Stéphane Marchesin <marcheu@chromium.org>
13 years agor600g: add comment about special shader exports
Alex Deucher [Wed, 2 Nov 2011 13:38:46 +0000 (09:38 -0400)]
r600g: add comment about special shader exports

Certain exports (position, point size, etc.) are treated
specially by the shader and not counted as generic exports.

Note the exports and any relevant related state bits.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 years agor600g: take into account PSIZE output for spi mapping
Vadim Girlin [Wed, 2 Nov 2011 07:50:59 +0000 (11:50 +0400)]
r600g: take into account PSIZE output for spi mapping

Skip PSIZE and POSITION when counting VS outputs.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42435

Tested without regressions on evergreen.

NOTE: this is a candidate for the 7.11 branch.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
13 years agosvga: Update state prototypes to return pipe_error.
José Fonseca [Wed, 2 Nov 2011 10:32:20 +0000 (10:32 +0000)]
svga: Update state prototypes to return pipe_error.

Fixes a bunch of prototype mismatch warnings..

13 years agoBuild fix for -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
Jeremy Huddleston [Wed, 2 Nov 2011 04:04:34 +0000 (21:04 -0700)]
Build fix for -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agointel: fix potential segfault error
Yuanhan Liu [Tue, 1 Nov 2011 09:41:08 +0000 (17:41 +0800)]
intel: fix potential segfault error

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoswrast: Use MapRenderbuffer for glReadPixels(GL_DEPTH_COMPONENT) fast-paths.
Eric Anholt [Tue, 11 Oct 2011 22:08:15 +0000 (15:08 -0700)]
swrast: Use MapRenderbuffer for glReadPixels(GL_DEPTH_COMPONENT) fast-paths.

This fixes issues with the code playing fast and loose with types of
buffers, and as a bonus avoids the wrappers that were previously used
to pull bits out of packed depth/stencil buffers.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Make unpack_uint_z_row return 32 bits of data.
Eric Anholt [Thu, 13 Oct 2011 16:38:30 +0000 (09:38 -0700)]
mesa: Make unpack_uint_z_row return 32 bits of data.

Some of the return values were u32, some were 24 bits, and z16
returned 16 bits.  The caller would have to do all the work of
interpreting the format all over again.  However, there are no callers
of this function at this point.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agonouveau: Add implementation of MapRenderbuffer.
Eric Anholt [Mon, 17 Oct 2011 17:18:30 +0000 (10:18 -0700)]
nouveau: Add implementation of MapRenderbuffer.

Perhaps the easiest implementation, nouveau can directly map buffers
even if tiled, and uses separate surfaces for its texture
renderbuffers so we don't have to worry about that offset.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoradeon: Add implementation of MapRenderbuffer.
Eric Anholt [Mon, 17 Oct 2011 16:50:52 +0000 (09:50 -0700)]
radeon: Add implementation of MapRenderbuffer.

Unlike intel, we do a blit to/from GTT memory in order to
untile/retile the renderbuffer data, since we don't have fence
registers for accessing it.

(There is software tiling code in radeon_tile.c, but it's unused and
doesn't support macro tiling)

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Use MapRenderbuffer in spans setup.
Eric Anholt [Tue, 11 Oct 2011 21:46:31 +0000 (14:46 -0700)]
intel: Use MapRenderbuffer in spans setup.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agointel: Add an implementation of MapRenderbuffer.
Eric Anholt [Tue, 11 Oct 2011 21:22:45 +0000 (14:22 -0700)]
intel: Add an implementation of MapRenderbuffer.

v2: Add separate stencil S8 W-tile swizzling/deswizzling.  Tested for
    the swizzling case with env INTEL_SEPARATE_STENCIL=1 INTEL_HIZ=1
    ./bin/hiz-depth-stencil-test-fbo-d24-s8
v3: Apply Chad's fix for S8 window system buffers.

Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agointel: Improve the debug info for renderbuffer allocation.
Eric Anholt [Tue, 1 Nov 2011 00:07:34 +0000 (17:07 -0700)]
intel: Improve the debug info for renderbuffer allocation.

13 years agoAdd MapRenderbuffer implementations for software drivers.
Eric Anholt [Thu, 13 Oct 2011 19:02:43 +0000 (12:02 -0700)]
Add MapRenderbuffer implementations for software drivers.

Mesa core's is generic for things like osmesa.

For swrast_dri.so, we have to do Y flipping.  The front-buffer path
isn't actually tested, though, because both before and after it fails
with a BadMatch in XGetImage.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add a driver hook for mapping renderbuffers.
Eric Anholt [Tue, 11 Oct 2011 21:12:50 +0000 (14:12 -0700)]
mesa: Add a driver hook for mapping renderbuffers.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoRevert "intel: Drop the immediate validation of the texture object in TFP."
Eric Anholt [Tue, 1 Nov 2011 16:24:47 +0000 (09:24 -0700)]
Revert "intel: Drop the immediate validation of the texture object in TFP."

This reverts commit abaebcee787eeb8a89bf7a82ed4d1532fcde5e39.

The assertion I made was that "the zero-copy code in validation" would
zero copy.  Of course, I deleted that check back in January because
the two sites that would trigger it (glTexImage() and this one) both
immediately bound their mt to the object, making the other check
pointless.

Removes two extra blits in glx-tfp.  Also fixed the Android home
screen, which wasn't rendering because the extra copy broke the
relationship between the texture and the eglimage.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42152
Tested-by: Chad Versace <chad@chad-versace.us>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
13 years agomesa: make save_EndConditionalRender param list (void) to silence warning
Brian Paul [Tue, 1 Nov 2011 19:34:52 +0000 (13:34 -0600)]
mesa: make save_EndConditionalRender param list (void) to silence warning

13 years agopostprocess: remove const qualifiers on unsigned int parameters
Brian Paul [Tue, 1 Nov 2011 17:34:51 +0000 (11:34 -0600)]
postprocess: remove const qualifiers on unsigned int parameters

to match the prototype in postprocess.h

13 years agoscons: include src/glsl/Makefile.sources
Chia-I Wu [Sun, 30 Oct 2011 11:32:25 +0000 (19:32 +0800)]
scons: include src/glsl/Makefile.sources

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agoandroid: include src/glsl/Makefile.sources
Chia-I Wu [Sun, 30 Oct 2011 11:32:41 +0000 (19:32 +0800)]
android: include src/glsl/Makefile.sources

This also fixes the build error due to missing link_uniforms.cpp in the source
lists.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
[olv: the missing link_uniforms.cpp was added before this patch is committed]

13 years agoglsl: Refactor source lists to Makefile.sources
Chia-I Wu [Sun, 30 Oct 2011 11:28:35 +0000 (19:28 +0800)]
glsl: Refactor source lists to Makefile.sources

With the hope that Android.mk and SConscript can share the file to reduce
future breakage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chad Versace <chad@chad-versace.us>
13 years agomesa: Fix memory leak in out-of-memory path.
Vinson Lee [Thu, 27 Oct 2011 21:51:08 +0000 (14:51 -0700)]
mesa: Fix memory leak in out-of-memory path.

Fixes Coverity resource leak defect.

13 years agodrisw: Enable SGI_make_current_read for direct contexts
Adam Jackson [Tue, 1 Nov 2011 17:52:48 +0000 (13:52 -0400)]
drisw: Enable SGI_make_current_read for direct contexts

Equivalent to glXMakeContextCurrent, which had better already work since
we advertise GLX 1.3.

Signed-off-by: Adam Jackson <ajax@redhat.com>
13 years agost/xa: Add a scanout flag for surfaces
Thomas Hellstrom [Tue, 1 Nov 2011 16:42:21 +0000 (17:42 +0100)]
st/xa: Add a scanout flag for surfaces

Bump minor to signal availability.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
13 years agoBuild link_uniforms for android
Eugeni Dodonov [Tue, 1 Nov 2011 17:04:01 +0000 (15:04 -0200)]
Build link_uniforms for android

Otherwise android-x86 build fails.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
13 years agollvmpipe: Re-advertise support for stencil formats...
José Fonseca [Tue, 1 Nov 2011 12:28:47 +0000 (12:28 +0000)]
llvmpipe: Re-advertise support for stencil formats...

"no fetch_rgba_float for uint formats" => "llvmpipe does not support uint formats"

"stencil == uint" => "llvmpipe does not support stencil"

13 years agollvmpipe: Use -1 instead of ~0 for "no slot".
José Fonseca [Mon, 31 Oct 2011 19:35:55 +0000 (19:35 +0000)]
llvmpipe: Use -1 instead of ~0 for "no slot".

As the value of unsigned ~0 depends on the bit-width.

Fixes fdo 42411.

13 years agodocs: update relnotes-7.12
Marek Olšák [Sat, 29 Oct 2011 12:33:08 +0000 (14:33 +0200)]
docs: update relnotes-7.12

13 years agodri/nouveau: Enable NV_fog_distance on NV10 and NV20 hardware
Nicholas Miell [Tue, 20 Sep 2011 13:20:39 +0000 (15:20 +0200)]
dri/nouveau: Enable NV_fog_distance on NV10 and NV20 hardware

Add support for NV_fog_distance to the NV10 and NV20 drivers.

[ Francisco Jerez: Fix fog coord. signedness for
  GL_EYE_RADIAL_NV/GL_EYE_PLANE on nv20 ]

13 years agost/mesa: Enable NV_fog_distance for Gallium drivers
Nicholas Miell [Tue, 20 Sep 2011 06:17:01 +0000 (23:17 -0700)]
st/mesa: Enable NV_fog_distance for Gallium drivers

The fixed-function generated vertex program is all that's needed for
Gallium drivers.

13 years agomesa: Add NV_fog_distance to the fixed-function vertex program generator
Nicholas Miell [Tue, 20 Sep 2011 06:17:00 +0000 (23:17 -0700)]
mesa: Add NV_fog_distance to the fixed-function vertex program generator

This is all that is needed to implement NV_fog_distance on programmable
hardware.

13 years agomesa: Add the basics for the NV_fog_distance extension
Nicholas Miell [Tue, 20 Sep 2011 06:16:59 +0000 (23:16 -0700)]
mesa: Add the basics for the NV_fog_distance extension

No driver implements it yet.

13 years agoralloc: Use _vscprintf on MinGW.
José Fonseca [Tue, 1 Nov 2011 06:58:29 +0000 (06:58 +0000)]
ralloc: Use _vscprintf on MinGW.

MinGW uses MSVC's runtime DLLs for most of C runtime's functions, and
there has same semantics for vsnprintf.

Not sure how this worked until now -- maybe one of the internal
vsnprintf implementations was taking precedence.

13 years agosvga: Fix potential buffer overflow in rs draw state.
José Fonseca [Mon, 31 Oct 2011 19:26:53 +0000 (19:26 +0000)]
svga: Fix potential buffer overflow in rs draw state.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agollvmpipe: Remove unsed variables.
José Fonseca [Mon, 31 Oct 2011 19:36:07 +0000 (19:36 +0000)]
llvmpipe: Remove unsed variables.

13 years agoutil: Add missing initializer.
José Fonseca [Mon, 31 Oct 2011 19:04:08 +0000 (19:04 +0000)]
util: Add missing initializer.

13 years agoi965: Fix flat integral varyings.
Paul Berry [Tue, 25 Oct 2011 00:46:26 +0000 (17:46 -0700)]
i965: Fix flat integral varyings.

Previously, the vertex and fragment shader back-ends assumed that all
varyings were floats.  In GLSL 1.30 this is no longer true--they can
also be of integral types provided that they have an interpolation
qualifier of "flat".

This required two changes in each back-end: assigning the correct type
to the register that holds the varying value during shader execution,
and assigning the correct type to the register that ties the varying
value to the rest of the graphics pipeline (the message register in
the case of VS, and the payload register in the case of FS).

Fixes piglit tests fs-int-interpolation and fs-uint-interpolation.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>