mesa.git
13 years agomesa: Throw an error instead of asserting for condrender with query == 0.
Eric Anholt [Thu, 8 Sep 2011 23:52:44 +0000 (16:52 -0700)]
mesa: Throw an error instead of asserting for condrender with query == 0.

From the NV_conditional_render spec:

    BeginQuery sets the active query object name for the query type given by
    <target> to <id>.  If BeginQuery is called with an <id> of zero, if the
    active query object name for <target> is non-zero, if <id> is the active
    query object name for any query type, or if <id> is the active query
    object for condtional rendering (Section 2.X), the error INVALID OPERATION
    is generated.

Fixes piglit nv_conditional_render-begin-zero.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Add support for Begin/EndConditionalRender in display lists.
Eric Anholt [Thu, 8 Sep 2011 23:42:39 +0000 (16:42 -0700)]
mesa: Add support for Begin/EndConditionalRender in display lists.

Fixes piglit nv_conditional_render-dlist.

Reviewed-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix an autoconf build-system bug related to glsl_to_tgsi
Marek Olšák [Fri, 16 Sep 2011 19:51:58 +0000 (21:51 +0200)]
mesa: fix an autoconf build-system bug related to glsl_to_tgsi

st_glsl_to_tgsi.cpp was completely ignored by makedepend because it was
not included in ALL_SOURCES, which caused that the file was not recompiled
when certain header files were changed (like glsl/ir.h).

The first part of this commit is just a consolidation.
The second part is the fix.

13 years agomesa: fix format/type check in unpack_image() for bitmaps
Brian Paul [Mon, 19 Sep 2011 17:38:02 +0000 (11:38 -0600)]
mesa: fix format/type check in unpack_image() for bitmaps

Passing type == GL_BITMAP returns 0 while error values return -1.
This fixes glPolygonStipple being compiled into display lists.

13 years agoi965 new VS: Fix copy propagation of double negatives.
Paul Berry [Thu, 15 Sep 2011 00:06:35 +0000 (17:06 -0700)]
i965 new VS: Fix copy propagation of double negatives.

When copy propagating a value into an instruction that negates its
argument, we need to invert the sense of the value's "negate" flag, so
that -(+x) becomes -x and -(-x) becomes +x.

Previously, we were always setting the value's "negate" flag to true
in this circumstance, so that both -(+x) and -(-x) turned into -x.

Fixes Piglit test vs-double-negative.shader_test.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agomesa: Advertise GL_OES_compressed_paletted_texture in OpenGL ES1.x
Ian Romanick [Tue, 13 Sep 2011 19:05:27 +0000 (14:05 -0500)]
mesa: Advertise GL_OES_compressed_paletted_texture in OpenGL ES1.x

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Remove redundant compressed paletted texture error checks
Ian Romanick [Mon, 12 Sep 2011 16:49:55 +0000 (11:49 -0500)]
mesa: Remove redundant compressed paletted texture error checks

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Refactor compressed texture error checks to work with paletted textures
Ian Romanick [Mon, 12 Sep 2011 16:46:09 +0000 (11:46 -0500)]
mesa: Refactor compressed texture error checks to work with paletted textures

This code was really broken before.  A lot of the error checks were
done much later (too late), and some of the error checks would fail.
The underlying problem is that Mesa doesn't ever keep compressed paletted
textures in their original format.  The textures are immediately
converted to some RGB or RGBA format.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39991
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Add _mesa_cpal_compressed_format_type
Ian Romanick [Mon, 12 Sep 2011 16:45:43 +0000 (11:45 -0500)]
mesa: Add _mesa_cpal_compressed_format_type

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Refactor expected texture size check in cpal_get_info
Ian Romanick [Mon, 12 Sep 2011 16:38:52 +0000 (11:38 -0500)]
mesa: Refactor expected texture size check in cpal_get_info

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format
Ian Romanick [Mon, 12 Sep 2011 16:37:50 +0000 (11:37 -0500)]
mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_base_tex_format

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agomesa: Add GL_OES_compressed_paletted_texture formats to _mesa_is_compressed_format
Ian Romanick [Mon, 12 Sep 2011 16:36:53 +0000 (11:36 -0500)]
mesa: Add GL_OES_compressed_paletted_texture formats to _mesa_is_compressed_format

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Jin Yang <jin.a.yang@intel.com>
13 years agoUpdate llvmpipe's gitignore
Nicholas Miell [Mon, 19 Sep 2011 09:48:36 +0000 (02:48 -0700)]
Update llvmpipe's gitignore

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for glMapBufferRange
Yuanhan Liu [Mon, 19 Sep 2011 10:25:55 +0000 (18:25 +0800)]
mesa: fix error handling for glMapBufferRange

Accroding the man page, GL_INVALID_VALUE would generated if access has any
bits set other than those valid defined bits.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: generate GL_INVALID_OPERATION in glIsEnabledIndex() between Begin/End
Brian Paul [Mon, 19 Sep 2011 14:13:38 +0000 (08:13 -0600)]
mesa: generate GL_INVALID_OPERATION in glIsEnabledIndex() between Begin/End

13 years agomesa: fix error handling for glSelectBuffer
Yuanhan Liu [Mon, 19 Sep 2011 07:03:04 +0000 (15:03 +0800)]
mesa: fix error handling for glSelectBuffer

According the man page, trigger a GL_INVALID_VALUE if size < 0.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for glPixelZoom
Yuanhan Liu [Mon, 19 Sep 2011 07:03:03 +0000 (15:03 +0800)]
mesa: fix error handling for glPixelZoom

According the man page, GL_INVALID_OPERATION should generated if
glPixelZoom is executed between the execution of glBegin and the
corresponding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for glIsEnabled
Yuanhan Liu [Mon, 19 Sep 2011 07:03:01 +0000 (15:03 +0800)]
mesa: fix error handling for glIsEnabled

According the man page, GL_INVALID_OPERATION should be generated if
glIsEnabled is executed betwwen the execution of glBegin and the
correspoding execution of glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for glTexEnv
Yuanhan Liu [Mon, 19 Sep 2011 07:03:00 +0000 (15:03 +0800)]
mesa: fix error handling for glTexEnv

Fix error handling while calling glTexEnv with invalid texture
environment parameters.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for some glGet* functions
Yuanhan Liu [Mon, 19 Sep 2011 07:02:59 +0000 (15:02 +0800)]
mesa: fix error handling for some glGet* functions

According to the man page, it should trigger a GL_INVALID_OPERATION
while calling some glGet* functions inside glBegin and glEnd.

This patch dose handle the following functions:
 glGetBooleanv
 glGetFloatv
 glGetIntegerv
 glGetInteger64v
 glGetDoublev

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix error handling for glEvalMesh1/2D
Yuanhan Liu [Mon, 19 Sep 2011 07:02:58 +0000 (15:02 +0800)]
mesa: fix error handling for glEvalMesh1/2D

According man page, trigger error when calling glEvalMesh1/2D inside
glBegin/glEnd.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoRemove unused APP_LIB_DEPS variable
Matt Turner [Sun, 18 Sep 2011 21:34:47 +0000 (17:34 -0400)]
Remove unused APP_LIB_DEPS variable

Unused since removal of demos from the repository?

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoegl_glx.c: use unsigned instead of uint
Matt Turner [Sun, 18 Sep 2011 17:26:20 +0000 (13:26 -0400)]
egl_glx.c: use unsigned instead of uint

We've had a hack to fix this in Gentoo on Solaris for a while.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoRemove unneeded xdamages header from dri2_glx.c.
Matt Turner [Sat, 17 Sep 2011 22:59:49 +0000 (18:59 -0400)]
Remove unneeded xdamages header from dri2_glx.c.

It's needed for dri1 but not dri2.

Signed-off-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agograw: fix tests to build on msvc again.
Dave Airlie [Mon, 19 Sep 2011 09:20:10 +0000 (10:20 +0100)]
graw: fix tests to build on msvc again.

Should fix https://bugs.freedesktop.org/show_bug.cgi?id=40997

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor300/compiler: Fix regalloc for values with multiple writers
Tom Stellard [Mon, 19 Sep 2011 00:43:41 +0000 (17:43 -0700)]
r300/compiler: Fix regalloc for values with multiple writers

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

Note: This is a candidate for the 7.11 branch.

13 years agoswrast: fix more store_texel() bugs
Brian Paul [Tue, 13 Sep 2011 19:30:17 +0000 (13:30 -0600)]
swrast: fix more store_texel() bugs

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412 on swrast.

13 years agogallium: move clear paths from rgba to a pointer to a color union (v2)
Dave Airlie [Fri, 16 Sep 2011 08:39:34 +0000 (09:39 +0100)]
gallium: move clear paths from rgba to a pointer to a color union (v2)

This moves the gallium interface for clears from using a pointer to 4 floats to a pointer to a union of float/unsigned/int values.

Notes:
1. the value is opaque.
2. only when the value is used should it be interpretered according to
the surface format it is going to be used with.
3. float clears on integer buffers and vice-versa are undefined.

v2: fixed up vega and graw, dropped hunks that shouldn't have been in
patch.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memory
Brian Paul [Sat, 17 Sep 2011 20:50:49 +0000 (14:50 -0600)]
mesa: use ctx->Driver.AllocTextureImageBuffer() to alloc texture memory

13 years agomesa: plug in swrast texture image alloc/free functions
Brian Paul [Sat, 17 Sep 2011 20:50:49 +0000 (14:50 -0600)]
mesa: plug in swrast texture image alloc/free functions

Use the swrast allocation/free functions instead of core Mesa.

13 years agoswrast: add Alloc/FreeTextureImageBuffer() driver functions
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
swrast: add Alloc/FreeTextureImageBuffer() driver functions

Not called yet.  These will replace the core Mesa functions for allocating
and freeing malloc'd texture memory.

13 years agomesa: add AllocTextureImageBuffer() driver hook
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
mesa: add AllocTextureImageBuffer() driver hook

13 years agomesa: move gl_texture_image::FetchTexel fields to swrast
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
mesa: move gl_texture_image::FetchTexel fields to swrast

This also involves passing swrast_texture_image instead of gl_texture_image
into all the fetch functions.

13 years agoswrast: plug in _swrast_new/delete_texture_image() functions
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
swrast: plug in _swrast_new/delete_texture_image() functions

13 years agoradeon: make radeon_texture_image a subclass of swrast_texture_image
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
radeon: make radeon_texture_image a subclass of swrast_texture_image

13 years agointel: make intel_texture_image a subclass of swrast_texture_image
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
intel: make intel_texture_image a subclass of swrast_texture_image

We need to subclass swrast_texture_image because if we use swrast for
fallback rendering, we'll need to have swrast_texture_image objects.

13 years agoswrast: introduce new swrast_texture_image struct
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
swrast: introduce new swrast_texture_image struct

No subclass fields yet.  Subsequent patches will add the fields related
to software rendering that are currently in gl_texture_image.

13 years agomesa: add new DeleteTextureImage() driver hook
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
mesa: add new DeleteTextureImage() driver hook

Matches the NewTextureImage() hook.  With new subclasses of
gl_texture_image coming we need a new hook to properly delete objects of
those subclasses.

13 years agomesa: move software texel fetch code into swrast
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
mesa: move software texel fetch code into swrast

It's only used by swrast now so move it out of core Mesa.

13 years agomesa: move _mesa_update_fetch_functions() calls into swrast
Brian Paul [Sat, 17 Sep 2011 20:50:48 +0000 (14:50 -0600)]
mesa: move _mesa_update_fetch_functions() calls into swrast

Do it during swrast state validation since the FetchTexel() functions
are only called from swrast now and not core Mesa.
Remove assertions in mipmap.c since they're no longer appropriate.

13 years agomesa: implement unpack_SIGNED_GR1616 in format_unpack.c
Brian Paul [Sat, 17 Sep 2011 19:33:04 +0000 (13:33 -0600)]
mesa: implement unpack_SIGNED_GR1616 in format_unpack.c

13 years agometa: fix/add checks for GL_EXT_framebuffer_sRGB
Brian Paul [Sat, 17 Sep 2011 17:13:31 +0000 (11:13 -0600)]
meta: fix/add checks for GL_EXT_framebuffer_sRGB

This fixes spurious GL errors when the GL_EXT_framebuffer_sRGB extension
is not supported.

Note: This is a candidate for the 7.11 branch

13 years agomesa: s/short/ushort/ in unpack_SIGNED_RGBA_16()
Brian Paul [Sat, 17 Sep 2011 16:50:07 +0000 (10:50 -0600)]
mesa: s/short/ushort/ in unpack_SIGNED_RGBA_16()

13 years agod3d1x: fix parsing of SM4 relative addressing register op
Christoph Bumiller [Sat, 17 Sep 2011 10:11:44 +0000 (12:11 +0200)]
d3d1x: fix parsing of SM4 relative addressing register op

13 years agod3d1x: set flatshade_first in rasterizer state
Christoph Bumiller [Sat, 17 Sep 2011 09:58:05 +0000 (11:58 +0200)]
d3d1x: set flatshade_first in rasterizer state

D3D10 specifies the first vertex as the leading/provoking one.

13 years agod3d1x: initialize point size and line width to 1
Christoph Bumiller [Sat, 17 Sep 2011 10:07:42 +0000 (12:07 +0200)]
d3d1x: initialize point size and line width to 1

Otherwise lines would never be visible since the width cannot be
specified in D3D10.
Wireframe mode is also affected by line width.

13 years agor300/compiler: Add support for the output modifier (OMOD)
Tom Stellard [Wed, 15 Jun 2011 15:00:53 +0000 (08:00 -0700)]
r300/compiler: Add support for the output modifier (OMOD)

13 years agor300/compiler: Move some helper functions to radeon_compiler_util.c
Tom Stellard [Wed, 15 Jun 2011 15:00:13 +0000 (08:00 -0700)]
r300/compiler: Move some helper functions to radeon_compiler_util.c

13 years agor300/compiler: Don't unroll loops that conditionally increment the counter
Tom Stellard [Fri, 16 Sep 2011 01:24:55 +0000 (18:24 -0700)]
r300/compiler: Don't unroll loops that conditionally increment the counter

13 years agonouveau: Fix typos of ParseSourceList in SConscript files.
Vinson Lee [Mon, 12 Sep 2011 16:21:31 +0000 (09:21 -0700)]
nouveau: Fix typos of ParseSourceList in SConscript files.

Reviewed-by: Chia-I Wu <olv@lunarg.com>
13 years agoscons: fix incorrect test for embedded build
Brian Paul [Fri, 16 Sep 2011 16:11:52 +0000 (10:11 -0600)]
scons: fix incorrect test for embedded build

This was missed back in commit 41750107496858a047afa8d81d20fe903f285a78.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 years agowinsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM
Marek Olšák [Tue, 13 Sep 2011 13:01:45 +0000 (15:01 +0200)]
winsys/radeon: use the cache bufmgr for buffers with PIPE_BIND_CUSTOM

so that we don't abuse PIPE_BIND_VERTEX_BUFFER all the time.

13 years agosoftpipe: use pipe_get_tile_rgba_format()
Brian Paul [Thu, 15 Sep 2011 22:21:12 +0000 (16:21 -0600)]
softpipe: use pipe_get_tile_rgba_format()

Pass an explicit surface format as we do with pipe_put_tile_rgba_format().
This fixes the piglit fbo-srgb-blit test.  With GL_EXT_framebuffer_sRGB we
override the resource's format with an explicit format (linear vs. sRGB).
We need to do so both when getting and putting tiles.

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

Reviewed-by: Dave Airlie <airlied@redhat.com>
13 years agosoftpipe: use util_format_is_depth_or_stencil()
Brian Paul [Thu, 15 Sep 2011 22:20:01 +0000 (16:20 -0600)]
softpipe: use util_format_is_depth_or_stencil()

Reviewed-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: fixup missing scaled r600 types.
Dave Airlie [Fri, 16 Sep 2011 13:08:30 +0000 (14:08 +0100)]
r600g: fixup missing scaled r600 types.

I was still missing a couple of types on r600/r700 codepaths.

Fixes these up.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: interpret integer texture types as ints.
Dave Airlie [Thu, 15 Sep 2011 11:41:00 +0000 (12:41 +0100)]
r600g: interpret integer texture types as ints.

For signed/unsigned with no normalisation or srgb, assume its an INT
type texture.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: take constantly interpolated values into a/c
Dave Airlie [Thu, 15 Sep 2011 11:39:26 +0000 (12:39 +0100)]
r600g: take constantly interpolated values into a/c

We could constant interpolated values now and set have_perspective
if nothing else is set to avoid a GPU hang.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add flat non-interpolation support.
Dave Airlie [Thu, 15 Sep 2011 11:38:10 +0000 (12:38 +0100)]
r600g: add flat non-interpolation support.

TGSI CONSTANT interpolation is just flat, and we just read the values
direct from the LDS into the GPR without doing any interpolation on them.

This is needed to pass integer types into the fragment shader.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: set number type correctly for color buffers.
Dave Airlie [Thu, 15 Sep 2011 11:34:43 +0000 (12:34 +0100)]
r600g: set number type correctly for color buffers.

If we get a scaled type assume its a real integer type (as textures are).

Also fixup the blend bypass and blend clamp flags on evergreen as per the
docs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: add missing formats to color buffer setup.
Dave Airlie [Sat, 10 Sep 2011 16:53:34 +0000 (17:53 +0100)]
r600g: add missing formats to color buffer setup.

just playing with EXT_texture_integer, and this was first bug.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agosoftpipe: use consistent indentation in sp_quad_blend.c
Brian Paul [Wed, 14 Sep 2011 14:30:52 +0000 (08:30 -0600)]
softpipe: use consistent indentation in sp_quad_blend.c

13 years agogallivm: fix build with LLVM 3.0svn
Tobias Droste [Thu, 15 Sep 2011 00:39:26 +0000 (02:39 +0200)]
gallivm: fix build with LLVM 3.0svn

LLVM 3.0svn added SubtargetInfo as additional parameter to
createMCDisassembler() and createMCInstPrinter().
See revision 139237 of LLVM.

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoChange strerror(ret) to strerror(-ret).
Eugeni Dodonov [Thu, 15 Sep 2011 18:12:02 +0000 (15:12 -0300)]
Change strerror(ret) to strerror(-ret).

13 years agosoftpipe: fix blending for luminance/intensity surfaces
Brian Paul [Thu, 15 Sep 2011 17:31:55 +0000 (11:31 -0600)]
softpipe: fix blending for luminance/intensity surfaces

If we're drawing to a luminance, luminance/alpha or intensity surface
we have to adjust (rebase) the fragment/quad colors before writing them
to the tile cache.  The tile cache always stores RGBA colors but if
we're caching a L/A surface (for example) we need to be sure that R=G=B
so that subsequent reads from the surface cache appear to return L/A

We previously had a special case for RGB (no alpha) surfaces.  This
change generalizes that for the other base formats.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40408, but sRGB
formats are still failing.  That'll be addressed in a later patch.

13 years agoutil: add util_format_is_luminance/intensity/rgb(), etc
Brian Paul [Thu, 15 Sep 2011 17:31:55 +0000 (11:31 -0600)]
util: add util_format_is_luminance/intensity/rgb(), etc

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 years agowayland: Flush before blocking in swapbuffers.
Jørgen Lind [Thu, 15 Sep 2011 15:36:46 +0000 (17:36 +0200)]
wayland: Flush before blocking in swapbuffers.

Make sure that we've sent the frame request that we're going to block on.

13 years agomesa: fix error handling for dlist image unpacking
Brian Paul [Thu, 15 Sep 2011 15:06:19 +0000 (09:06 -0600)]
mesa: fix error handling for dlist image unpacking

When compiling glDrawPixels, glTexImage(), etc. and we're copying
the user's image we need to be careful about GL error checking.
Previously, we were incorrectly generating GL_OUT_OF_MEMORY in
unpack_image() if width <= 0 or height <= 0 or for invalid format/type
values.  We now check those arguments in unpack_image() and return NULL
if there's a bad value.  The command will get compiled with the
arguments as-is and image=NULL.  Later, when the command is executed the
correct errors will be generated.

This issue was reported by Yuanhan Liu <yuanhan.liu@linux.intel.com>

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
13 years agost/mesa: rewrap a long line
Brian Paul [Thu, 15 Sep 2011 14:58:31 +0000 (08:58 -0600)]
st/mesa: rewrap a long line

13 years agomesa: add missing ')' in error message
Brian Paul [Thu, 15 Sep 2011 14:02:52 +0000 (08:02 -0600)]
mesa: add missing ')' in error message

13 years agouniforms: accept all int/unsigned int sampler types in uniform checks.
Dave Airlie [Wed, 14 Sep 2011 11:07:47 +0000 (12:07 +0100)]
uniforms: accept all int/unsigned int sampler types in uniform checks.

I'm not 100% sure about this, it may need a version check or it might
be completely wrong.

added multisample ones as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglsl: Remove field array_lvalue from ir_variable.
Paul Berry [Sat, 10 Sep 2011 14:48:46 +0000 (07:48 -0700)]
glsl: Remove field array_lvalue from ir_variable.

The array_lvalue field was attempting to enforce the restriction that
whole arrays can't be used on the left-hand side of an assignment in
GLSL 1.10 or GLSL ES, and can't be used as out or inout parameters in
GLSL 1.10.

However, it was buggy (it didn't work properly for built-in arrays),
and it was clumsy (it unnecessarily kept track on a
variable-by-variable basis, and it didn't cover the GLSL ES case).

This patch removes the array_lvalue field completely in favor of
explicit checks in ast_parameter_declarator::hir() (this check is
added) and in do_assignment (this check was already present).

This causes a benign behavioral change: when the user attempts to pass
an array as an out or inout parameter of a function in GLSL 1.10, the
error is now flagged at the time the function definition is
encountered, rather than at the time of invocation.  Previously we
allowed such functions to be defined, and only flagged the error if
they were invoked.

Fixes Piglit tests
spec/glsl-1.10/compiler/qualifiers/fn-{out,inout}-array-prohibited*
and
spec/glsl-1.20/compiler/assignment-operators/assign-builtin-array-allowed.vert.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agor600g: Initialize multi VGT related register on Cayman.
Michel Dänzer [Wed, 14 Sep 2011 16:37:48 +0000 (18:37 +0200)]
r600g: Initialize multi VGT related register on Cayman.

Prevents lockups with piglit tests draw-elements and draw-vertices using large
numbers of vertices.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alex.deucher@amd.com>
13 years agoglx/dri2: Don't call X server for SwapBuffers when there's no back buffer.
Michel Dänzer [Wed, 14 Sep 2011 16:37:48 +0000 (18:37 +0200)]
glx/dri2: Don't call X server for SwapBuffers when there's no back buffer.

As already done in dri2CopySubBuffer().

Should fix:

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

Might fix:

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

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
13 years agoDRI: Log something if we don't support legacy DRI
Andrew Deason [Wed, 14 Sep 2011 16:37:48 +0000 (18:37 +0200)]
DRI: Log something if we don't support legacy DRI

If we are called via the legacy DRI interface, and we don't support
legacy DRI (InitScreen is NULL), print a debug message, so it is easy
to see why the driver fails to initialize.

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

13 years agoGLX: Say something if we cannot connect via DRI2
Andrew Deason [Wed, 14 Sep 2011 16:37:48 +0000 (18:37 +0200)]
GLX: Say something if we cannot connect via DRI2

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

13 years agonvc0: implement resource_resolve
Christoph Bumiller [Wed, 14 Sep 2011 16:30:37 +0000 (18:30 +0200)]
nvc0: implement resource_resolve

13 years agollvmpipe: Remove dead lp_tile_shuffle_mask.py script.
José Fonseca [Wed, 14 Sep 2011 15:48:17 +0000 (16:48 +0100)]
llvmpipe: Remove dead lp_tile_shuffle_mask.py script.

Broken, and we now shuffle tiles with pack/unpack instructions, instead
of shuffle masks.

13 years agoscons: Remove dead MSVC SDK/DDK/WINCE tools.
José Fonseca [Wed, 14 Sep 2011 15:36:35 +0000 (16:36 +0100)]
scons: Remove dead MSVC SDK/DDK/WINCE tools.

Not really used anymore.

13 years agonv50/ir: add missing license headers
Christoph Bumiller [Wed, 14 Sep 2011 14:47:44 +0000 (16:47 +0200)]
nv50/ir: add missing license headers

13 years agost/mesa: fix/update comment on st_translate_color()
Brian Paul [Wed, 14 Sep 2011 14:31:47 +0000 (08:31 -0600)]
st/mesa: fix/update comment on st_translate_color()

13 years agonvc0: emit tessellation mode and patch size in TCP/TEP validation
Christoph Bumiller [Thu, 25 Aug 2011 11:02:18 +0000 (13:02 +0200)]
nvc0: emit tessellation mode and patch size in TCP/TEP validation

13 years agonv50,nvc0: handle PIPE_CAP_MIN/MAX_TEXEL_OFFSET
Christoph Bumiller [Mon, 5 Sep 2011 13:31:28 +0000 (15:31 +0200)]
nv50,nvc0: handle PIPE_CAP_MIN/MAX_TEXEL_OFFSET

13 years agonvc0: remove old shader backend files
Christoph Bumiller [Tue, 13 Sep 2011 21:12:23 +0000 (23:12 +0200)]
nvc0: remove old shader backend files

13 years agonvc0: hook up to new shader code generator
Christoph Bumiller [Tue, 13 Sep 2011 21:10:35 +0000 (23:10 +0200)]
nvc0: hook up to new shader code generator

Also includes loading of shared shader library code (used for f64
and integer division) and setting up the immediate array buffer
which is appended to the code.

13 years agonv50/ir: import new shader backend code
Christoph Bumiller [Wed, 14 Sep 2011 14:18:23 +0000 (16:18 +0200)]
nv50/ir: import new shader backend code

13 years agonvc0: prevent interruption of m2mf push
Christoph Bumiller [Tue, 13 Sep 2011 21:02:23 +0000 (23:02 +0200)]
nvc0: prevent interruption of m2mf push

M2MF will trap if the data stream is interrupted by a QUERY fence
and report too much or not enough data.

13 years agonouveau: make data argument of nouveau_context::push_data const
Christoph Bumiller [Fri, 26 Aug 2011 20:59:19 +0000 (22:59 +0200)]
nouveau: make data argument of nouveau_context::push_data const

13 years agosoftpipe: implement blend color clamping
Brian Paul [Wed, 14 Sep 2011 14:15:14 +0000 (08:15 -0600)]
softpipe: implement blend color clamping

Per the GL spec, clamp incoming colors prior to blending depending on
whether the destination buffer stores normalized (non-float) values.
Note that the constant blend color needs to be clamped too (we always
get the unclamped color from Mesa).

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

13 years agomesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()
Brian Paul [Wed, 14 Sep 2011 14:09:05 +0000 (08:09 -0600)]
mesa: minor clean-up on _mesa_unclamped_float_rgba_to_ubyte()

Add a comment and reformat to be under 80 columns.

13 years agomesa: white space, comment fixes in mtypes.h
Brian Paul [Wed, 14 Sep 2011 14:06:38 +0000 (08:06 -0600)]
mesa: white space, comment fixes in mtypes.h

"vale" was a typo.  Fix that and do some other minor clean-ups.

13 years agost/vdpau: Preliminary support for timestamped output surface into the presentation...
Emeric Grange [Mon, 12 Sep 2011 21:39:33 +0000 (23:39 +0200)]
st/vdpau: Preliminary support for timestamped output surface into the presentation queue

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Signed-off-by: Christian König <deathsimple@vodafone.de>
13 years agost/vdpau: Output surfaces that are too large to fit into the display target will...
Emeric Grange [Mon, 12 Sep 2011 21:39:32 +0000 (23:39 +0200)]
st/vdpau: Output surfaces that are too large to fit into the display target will be clipped

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
13 years agost/vdpau: Add get_clear_color capability
Emeric Grange [Mon, 12 Sep 2011 21:39:31 +0000 (23:39 +0200)]
st/vdpau: Add get_clear_color capability

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
13 years agost/vdpau: Add documentation from the VDPAU API and update some traces
Emeric Grange [Mon, 12 Sep 2011 21:39:30 +0000 (23:39 +0200)]
st/vdpau: Add documentation from the VDPAU API and update some traces

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
13 years agost/vdpau: Various whitespace cleanups found while reading some code
Emeric Grange [Mon, 12 Sep 2011 21:39:29 +0000 (23:39 +0200)]
st/vdpau: Various whitespace cleanups found while reading some code

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
13 years agonouveau: Add max_references parameter to vl_create_decoder()
Emeric Grange [Mon, 12 Sep 2011 21:39:28 +0000 (23:39 +0200)]
nouveau: Add max_references parameter to vl_create_decoder()

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
13 years agog3dvl: Add max_references parameter to vl_create_decoder()
Emeric Grange [Mon, 12 Sep 2011 21:39:27 +0000 (23:39 +0200)]
g3dvl: Add max_references parameter to vl_create_decoder()

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
13 years agog3dvl: Add get_clear_color capability
Emeric Grange [Mon, 12 Sep 2011 21:39:26 +0000 (23:39 +0200)]
g3dvl: Add get_clear_color capability

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
13 years agog3dvl: Various whitespace cleanups found while reading some code
Emeric Grange [Mon, 12 Sep 2011 21:39:25 +0000 (23:39 +0200)]
g3dvl: Various whitespace cleanups found while reading some code

Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
13 years agomesa/colormac: introduce inline helper for 4 unclamped float to ubyte.
Dave Airlie [Wed, 14 Sep 2011 10:08:57 +0000 (11:08 +0100)]
mesa/colormac: introduce inline helper for 4 unclamped float to ubyte.

This introduces an UNCLAMPED_FLOAT_TO_UBYTE x 4 inline function, as
suggested by Brian. It uses it in a few places I noticed from previous
color changes, and also some core mesa places. I haven't updated other places
yet.

Signed-off-by: Dave Airlie <airlied@redhat.com>