mesa.git
12 years agomesa/format_unpack: add LUMINANCE 8/16 UINT/INT
Dave Airlie [Sun, 29 Jan 2012 16:25:16 +0000 (16:25 +0000)]
mesa/format_unpack: add LUMINANCE 8/16 UINT/INT

This just copies what the LUMINANCE_ALPHA bits do.

Fixes piglit tests on softpipe complaining about missing unpack.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix udiv/idiv/umod/imod on cayman
Dave Airlie [Mon, 23 Jan 2012 13:38:24 +0000 (13:38 +0000)]
r600g: fix udiv/idiv/umod/imod on cayman

Cayman needs some of the MUL instructions spread across a full slot
of vectors.

It also no longer has RECIP_UINT, the recommendation is to replace it
with a U2F + RECIP_IEEE + MUL + F2U.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: enable blend_bypass for uint/sint
Dave Airlie [Sun, 29 Jan 2012 19:38:28 +0000 (19:38 +0000)]
r600g: enable blend_bypass for uint/sint

12 years agor600g: fix fragcoord.w test on cayman
Dave Airlie [Mon, 30 Jan 2012 13:19:14 +0000 (13:19 +0000)]
r600g: fix fragcoord.w test on cayman

12 years agor600g: remove unused streamout code
Marek Olšák [Mon, 30 Jan 2012 00:03:43 +0000 (01:03 +0100)]
r600g: remove unused streamout code

12 years agor600g: disable printing debug info for streamout
Marek Olšák [Mon, 30 Jan 2012 00:01:37 +0000 (01:01 +0100)]
r600g: disable printing debug info for streamout

12 years agogallium: remove trailing comma to silence warning
Brian Paul [Sun, 29 Jan 2012 22:02:43 +0000 (15:02 -0700)]
gallium: remove trailing comma to silence warning

12 years agoadd wayland cflags when building wayland-egl
Juan Zhao [Sun, 29 Jan 2012 22:46:41 +0000 (14:46 -0800)]
add wayland cflags when building wayland-egl

to fix the header file missing when building wayland-egl

12 years agonvfx,nv50,nvc0: handle PIPE_CAP_GLSL_FEATURE_LEVEL
Christoph Bumiller [Sun, 29 Jan 2012 12:24:11 +0000 (13:24 +0100)]
nvfx,nv50,nvc0: handle PIPE_CAP_GLSL_FEATURE_LEVEL

12 years agodri: don't link with DRICORE_LIB_DEPS
Matt Turner [Sun, 29 Jan 2012 03:00:29 +0000 (22:00 -0500)]
dri: don't link with DRICORE_LIB_DEPS

DRI_LIB_DEPS is sufficient since it includes DRICORE_LIB_DEPS

12 years agoscons: don't add -Wmissing-field-initializers
Marek Olšák [Wed, 25 Jan 2012 13:08:16 +0000 (14:08 +0100)]
scons: don't add -Wmissing-field-initializers

The warning is absolutely useless. It doesn't actually say that there are
uninitialized variables. It points out the fact that there are missing
initializers and that variables are initialized to zero implicitly, which is
exactly what we want and what we commonly make use of.

C90 and C99 require all unspecified variables in the initializer list to be set
to zero.

12 years agost/mesa: use table-driven approach to exposing extensions for formats (v3)
Marek Olšák [Wed, 25 Jan 2012 00:01:54 +0000 (01:01 +0100)]
st/mesa: use table-driven approach to exposing extensions for formats (v3)

The check for ctx->API was unnecessary, because OES extensions are not exposed
in desktop GL.

Also require renderbuffer support for ARB_texture_rgb10_a2ui,
as per the spec.

Tested by comparing old and new glxinfo with softpipe and r600g.

v2: fix bugs
v3: rename need_only_one -> need_at_least_one
    rename num_elements -> num_mappings
    add comments
    use const when appropriate

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: use table-driven approach to exposing extensions based on CAPs
Marek Olšák [Tue, 24 Jan 2012 22:16:50 +0000 (23:16 +0100)]
st/mesa: use table-driven approach to exposing extensions based on CAPs

This change is not exactly equivalent (sometimes we checked for non-zero,
sometimes if >0 or >1), but the behavior shouldn't change, because all drivers
report 0 for unsupported CAPs.

Exposing CAP_STREAM_OUTPUT_PAUSE_RESUME without CAP_MAX_STREAM_OUTPUT_BUFFERS
is a driver bug and st/mesa does no checking if the latter is supported as
well. Drivers must report CAPs consistently.

v2: make the array const

12 years agost/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.c
Marek Olšák [Tue, 24 Jan 2012 21:23:01 +0000 (22:23 +0100)]
st/mesa: add PIPE_CAP_GLSL_FEATURE_LEVEL, cleanup st_extensions.c

v2: handle the cap in r300 and r600 as well

Additional info for r600g:
   The env var R600_GLSL130=1 enables GLSL 1.3.
   Along with R600_STREAMOUT=1, it enables full GL 3.

12 years agostate_stracker: Fix access to uninitialized memory.
Mathias Fröhlich [Sat, 28 Jan 2012 17:55:08 +0000 (18:55 +0100)]
state_stracker: Fix access to uninitialized memory.

Fix an access to uninitialized memory pointed out by valgrind in
glsl_to_tgsi_visitor::simplify_cmp(void).

Note: This is a candidate for the 8.0 branch.
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
12 years agodraw: Remove unused variables.
Vinson Lee [Sun, 15 Jan 2012 07:31:03 +0000 (23:31 -0800)]
draw: Remove unused variables.

Fix this GCC warning.
draw_pipe_clip.c: In function ‘interp’:
draw_pipe_clip.c:122:13: warning: variable ‘clip_dist’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: fix linear and flat interpolation
Vadim Girlin [Tue, 24 Jan 2012 19:32:50 +0000 (23:32 +0400)]
r600g: fix linear and flat interpolation

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoi965: fix inverted point sprite origin when rendering to FBO
Yuanhan Liu [Thu, 19 Jan 2012 23:48:52 +0000 (07:48 +0800)]
i965: fix inverted point sprite origin when rendering to FBO

When rendering to FBO, rendering is inverted. At the same time, we would
also make sure the point sprite origin is inverted. Or, we will get an
inverted result correspoinding to rendering to the default winsys FBO.

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

NOTE: This is a candidate for stable release branches.

v2: add the simliar logic to ivb, too (comments from Ian)
    simplify the logic operation (comments from Brian)

v3: pick a better comment from Eric
    use != for the logic instead of ^ (comments from Ian)

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: remove byteswap check in fast_read_rgba_pixels_memcpy()
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: remove byteswap check in fast_read_rgba_pixels_memcpy()

It's handled by _mesa_format_matches_format_and_type() now.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb9_e5, r11_g11_b10f, argb2101010_uint functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb332, signed rgba8888, signed rgba888_rev functions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:13 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgba5551, argb1555, argb2101010 formats.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: more use of _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: more use of _mesa_format_matches_format_and_type() in texstore code

For rgb565, argb8888, rgb888, argb4444 functions.

12 years agomesa: use _mesa_format_matches_format_and_type() in texstore code
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: use _mesa_format_matches_format_and_type() in texstore code

This simplifies the code quite a bit, consolidates some cases and
possibly catches more cases for the memcpy path.

More such changes will follow.  Do just a few at a time to help bisect
any possible regressions.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: implement more cases in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: implement more cases in _mesa_format_matches_format_and_type()

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: use swapBytes parameter in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: use swapBytes parameter in _mesa_format_matches_format_and_type()

This will let us use memcpy in more situations.  We can also remove
the checks for byte spapping that happen before the calls to
_mesa_format_matches_format_and_type().

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: added swapBytes parameter to _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:12 +0000 (20:01 -0700)]
mesa: added swapBytes parameter to _mesa_format_matches_format_and_type()

Not actually used yet though.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: rewrite, simplify some of the logic in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: rewrite, simplify some of the logic in _mesa_format_matches_format_and_type()

In preparation for adding GL_PACK/UNPACK_SWAP_BYTES support.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: add BGR888 code in _mesa_format_matches_format_and_type()
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: add BGR888 code in _mesa_format_matches_format_and_type()

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: fix error in _mesa_format_matches_format_and_type() for RGB888
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: fix error in _mesa_format_matches_format_and_type() for RGB888

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove redundant byte swap check
Brian Paul [Fri, 27 Jan 2012 03:01:11 +0000 (20:01 -0700)]
mesa: remove redundant byte swap check

The outer conditional already did the test.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: remove LSB-first pixel packing check in glReadPixels
Brian Paul [Fri, 27 Jan 2012 03:01:10 +0000 (20:01 -0700)]
mesa: remove LSB-first pixel packing check in glReadPixels

GL_UNPACK_LSB_FIRST only applies to bitmap data, not glReadPixels.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoswrast: Fix implicit declaration warnings
Chad Versace [Sat, 28 Jan 2012 00:44:26 +0000 (16:44 -0800)]
swrast: Fix implicit declaration warnings

In a recent commit,
    commit 1c0f1dd42a50464eeb81de4aad8eecf24b3d6c89
    Author: Chad Versace <chad.versace@linux.intel.com>
    swrast: Fix fixed-function fragment processing
I defined a new function,_swrast_fragment_program, but neglected
to #include s_fragprog.h for clients of that function.

Note: This is a candidate for the 8.0 branch.
Reported-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agor600g: remove unsupported evergreen CB formats
Alex Deucher [Fri, 27 Jan 2012 23:42:39 +0000 (18:42 -0500)]
r600g: remove unsupported evergreen CB formats

The evergreen+ CB no longer supports the following formats
compared to 6xx/7xx:
- COLOR_4_4
- COLOR_3_3_2
- COLOR_6_5_5
- COLOR_8_24_FLOAT
- COLOR_24_8_FLOAT
- COLOR_11_11_10
- COLOR_11_11_10_FLOAT

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
12 years agomesa: Avoid void * arithmetic.
José Fonseca [Fri, 27 Jan 2012 21:54:12 +0000 (21:54 +0000)]
mesa: Avoid void * arithmetic.

Should fix MSVC build.

12 years agoswrast: Fix fixed-function fragment processing
Chad Versace [Thu, 26 Jan 2012 03:38:10 +0000 (19:38 -0800)]
swrast: Fix fixed-function fragment processing

On i965, _mesa_ir_link_shader is never called. As a consequence, the
current fragment program (ctx->FragmentProgram->_Current) exists but is
invalid because it has no instructions. Yet swrast continued to attempt to
use the empty program.

To avoid using the empty program, this patch 1) defines a new function,
_swrast_use_fragment_program, which checks if the current fragment program
exists and differs from the fixed function fragment program, and, when
appropriate, 2) replaces checks of the form
    if (ctx->FragmentProgram->_Current == NULL)
with
    if (_swrast_use_fragment_program(ctx))

Fixes the following oglconform regressions on i965/gen6:
    api-fogcoord(basic.allCases.log)
    api-mtexcoord(basic.allCases.log)
    api-seccolor(basic.allCases.log)
    api-texcoord(basic.allCases.log)
    blend-separate(basic.allCases)
    colorsum(basic.allCases.log)

The tests were ran with the GLXFBConfig:
    visual  x   bf lv rg d st  colorbuffer  sr ax dp st accumbuffer ms  cav
  id dep cl sp  sz l  ci b ro  r  g  b  a F gb bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------------
0x021 24 tc  0  32  0 r  y .   8  8  8  8 .  .  0 24 8  0  0  0  0  0 0 None

(Note: I originally believed that the hunk in
_swrast_update_fragment_program was unnecessary. But it is required to fix
blend-separate.)

Note: This is a candidate for the 8.0 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327
Reveiwed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
12 years agomesa: set clamp bit in glGetTexImage for GL_UNSIGNED_NORMALIZED
Anuj Phogat [Wed, 25 Jan 2012 04:06:27 +0000 (20:06 -0800)]
mesa: set clamp bit in glGetTexImage for GL_UNSIGNED_NORMALIZED

Color clamping should be enabled in glGetTexImage if texture dataType is
GL_UNSIGNED_NORMALIZED and format is GL_LUMINANCE or GL_LUMINANCE_ALPHA

Fixes 2 Intel oglconform test cases: pxconv-gettex and pxtrans-gettex
https://bugs.freedesktop.org/show_bug.cgi?id=40864

NOTE: This is a candidate for the 8.0 branch

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Don't round-trip integer texture data through a floating point temp.
Eric Anholt [Tue, 24 Jan 2012 22:52:04 +0000 (14:52 -0800)]
mesa: Don't round-trip integer texture data through a floating point temp.

This was losing bits of precision.  Fixes (with the previous commits):
piglit EXT_texture_integer/getteximage-clamping
piglit EXT_texture_integer/getteximage-clamping GL_ARB_texture_rg
oglc advanced.mipmap.upload

Regresses oglc negative.typeFormatMismatch.teximage from fail to
abort, because it's been hitting texstore for a format/type combo that
shouldn't happen.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: When unpacking signed integer pixel data, don't clamp to 0.
Eric Anholt [Tue, 24 Jan 2012 22:48:56 +0000 (14:48 -0800)]
mesa: When unpacking signed integer pixel data, don't clamp to 0.

In the core, we always treat spans of int/uint data as uint, so this
extract function was truncating storage of integer pixel data to a n
int texture to (0, max_int) instead of (min_int, max_int).  There is
probably missing code for handling truncation on conversion between
pixel formats, still, but this does improve things.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add clamping for packing of integer data.
Eric Anholt [Tue, 24 Jan 2012 22:16:59 +0000 (14:16 -0800)]
mesa: Add clamping for packing of integer data.

Mostly fixes piglit EXT_texture_integer/getteximage-clamping.  The
remaining failure involves precision loss on storing of int32 texture
data (something I knew was an issue, but wasn't trying to test).

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Add missing format unpack for some integer texture formats.
Eric Anholt [Fri, 20 Jan 2012 00:34:24 +0000 (16:34 -0800)]
mesa: Add missing format unpack for some integer texture formats.

This cut and paste is pretty awful.  I'm tempted to do a lot of this
using preprocessor tricks for customizing the parameter type from a
template function, but that's just a different sort of hideous.

Fixes 8 Intel oglconform int-textures cases.

NOTE: This is a candidate for the 8.0 branch.
v2: Add alpha formats, too.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoi965: Don't allow rendering to non-GL_RED/RG/RGBA integer textures.
Eric Anholt [Wed, 25 Jan 2012 00:32:36 +0000 (16:32 -0800)]
i965: Don't allow rendering to non-GL_RED/RG/RGBA integer textures.

Fixes piglit EXT_texture_integer/fbo-blending.

12 years agointel: Pass the gl_renderbuffer to render_target_supported() vtable method.
Eric Anholt [Fri, 20 Jan 2012 01:23:25 +0000 (17:23 -0800)]
intel: Pass the gl_renderbuffer to render_target_supported() vtable method.

I'm going to want to go looking at it for an integer texture fix.

NOTE: This is a candidate for the 8.0 branch.

12 years agointel: Make a renderbuffer wrapping a texture have the same _BaseFormat.
Eric Anholt [Fri, 20 Jan 2012 01:41:39 +0000 (17:41 -0800)]
intel: Make a renderbuffer wrapping a texture have the same _BaseFormat.

Otherwise, when you asked for the _BaseFormat of an rb wrapping a
GL_RGB texture, you got GL_RGBA because that's what we were storing
the texture data as.

NOTE: This is a candidate for the 8.0 branch.

12 years agointel: Simplify intel_renderbuffer_update_wrapper() by passing in the image.
Eric Anholt [Fri, 20 Jan 2012 01:40:41 +0000 (17:40 -0800)]
intel: Simplify intel_renderbuffer_update_wrapper() by passing in the image.

NOTE: This is a candidate for the 8.0 branch.

12 years agointel: Drop intel_wrap_miptree().
Eric Anholt [Fri, 20 Jan 2012 01:32:55 +0000 (17:32 -0800)]
intel: Drop intel_wrap_miptree().

Most of this function was just calling
intel_renderbuffer_update_wrapper(), which was called immediately
afterwards in the only caller.

NOTE: This is a candidate for the 8.0 branch.

12 years agointel: Comment typo fix.
Eric Anholt [Fri, 27 Jan 2012 19:06:49 +0000 (11:06 -0800)]
intel: Comment typo fix.

12 years agomesa: Fix handling of glCopyBufferSubData() for src == dst.
Eric Anholt [Thu, 26 Jan 2012 00:29:28 +0000 (16:29 -0800)]
mesa: Fix handling of glCopyBufferSubData() for src == dst.

Fixes piglit ARB_copy_buffer-overlap, on swrast, which previously
assertion failed.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agointel: Fix accum buffer mapping since the swrast rework.
Eric Anholt [Tue, 24 Jan 2012 23:52:52 +0000 (15:52 -0800)]
intel: Fix accum buffer mapping since the swrast rework.

A pure swrast-allocated buffer gets an irb of NULL, so we segfaulted
in the clear-accum test.  Just look at the swrast renderbuffer pointer
for handling swrast rbs.

12 years agomesa: Fix display list handling for GL_EXT_framebuffer_multisample.
Eric Anholt [Tue, 24 Jan 2012 23:27:29 +0000 (15:27 -0800)]
mesa: Fix display list handling for GL_EXT_framebuffer_multisample.

From the extension spec:

    Added to section 5.4, as part of the discussion of which commands
    are not compiled into display lists:

    "Certain commands, when called while compiling a display list, are
    not compiled into the display list but are executed immediately.
    These are: ..., RenderbufferStorageMultisampleEXT..."

Fixes piglit EXT_framebuffer_multisample/dlist.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Fix display list handling for EXT_framebuffer_object.
Eric Anholt [Tue, 24 Jan 2012 23:19:50 +0000 (15:19 -0800)]
mesa: Fix display list handling for EXT_framebuffer_object.

Noticed when handling a similar problem in EXT_framebuffer_multisample.

From the EXT_framebuffer_object spec:

    Added to section 5.4, as part of the discussion of which commands
    are not compiled into display lists:

    "Certain commands, when called while compiling a display list, are
    not compiled into the display list but are executed immediately.
    These are: ..., GenFramebuffersEXT, BindFramebufferEXT,
    DeleteFramebuffersEXT, CheckFramebufferStatusEXT,
    GenRenderbuffersEXT, BindRenderbufferEXT, DeleteRenderbuffersEXT,
    RenderbufferStorageEXT, FramebufferTexture1DEXT,
    FramebufferTexture2DEXT, FramebufferTexture3DEXT,
    FramebufferRenderbufferEXT, GenerateMipmapEXT..."

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agogallivm: Swizzle constants into the right AoS ordering.
Brian Paul [Wed, 2 Feb 2011 14:20:10 +0000 (14:20 +0000)]
gallivm: Swizzle constants into the right AoS ordering.

Constants array is always assumed to be RGBA, which means we need to
swizzle the constant elements into place to match the AoS ordering
(e.g., BGRA) that was passed to lp_build_tgsi_aos().

Signed-off-by: José Fonseca <jfonseca@vmware.com>
12 years agodraw: Ensure that prepare is always run after LLVM garbagge collection.
José Fonseca [Fri, 27 Jan 2012 14:40:06 +0000 (14:40 +0000)]
draw: Ensure that prepare is always run after LLVM garbagge collection.

Should avoid dangling pointer derreference with

  glean --run results --overwrite --quick --tests texSwizzle

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agoconfigure.ac: Don't use $CLANG since it will collide with the static analyzer.
Jeremy Huddleston [Thu, 5 May 2011 21:08:57 +0000 (14:08 -0700)]
configure.ac: Don't use $CLANG since it will collide with the static analyzer.

We just prefix the $CLANG environment variable in configure.ac with acv_mesa_

Found by: tinderbox
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agoRevert "r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable"
Marek Olšák [Fri, 27 Jan 2012 16:49:41 +0000 (17:49 +0100)]
Revert "r600g: use S_028B20_BUFFER_0_EN macro for streamout buffer enable"

This reverts commit d6cd514edbeca0de38561f66189748078d0dc602.

It broke multiple streamout buffers, because it only enabled the first one.

12 years agoi965/automake: use $top_srcdir instead of relative links
Matt Turner [Fri, 27 Jan 2012 05:33:10 +0000 (00:33 -0500)]
i965/automake: use $top_srcdir instead of relative links

Fixes out-of-tree builds.

12 years agodri common: add .gitignore
Matt Turner [Fri, 27 Jan 2012 05:16:33 +0000 (00:16 -0500)]
dri common: add .gitignore

12 years agoconfigure.ac: remove shared/static options
Matt Turner [Sat, 14 Jan 2012 16:10:06 +0000 (11:10 -0500)]
configure.ac: remove shared/static options

now that libtool provides them.

12 years agodri: make sure to build libdricommon.la
Matt Turner [Fri, 27 Jan 2012 00:31:12 +0000 (19:31 -0500)]
dri: make sure to build libdricommon.la

12 years agoi965: Drop the missing symbols link test.
Eric Anholt [Fri, 27 Jan 2012 00:11:12 +0000 (16:11 -0800)]
i965: Drop the missing symbols link test.

This was horribly broken and has cost everyone more time than we were
ever going to save using it.  It might have been fixable, but the
problem it was originally trying to solve can be better solved with
-Werror=missing-prototypes and -Werror=implicit-function-declaration.

Also, it was always producing a big scary warning about how the link
test was non-portable.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44928

12 years agonouveau: Fix missing dri common symbols after automake conversion.
Eric Anholt [Fri, 27 Jan 2012 00:10:48 +0000 (16:10 -0800)]
nouveau: Fix missing dri common symbols after automake conversion.

12 years agoradeon: Fix missing dri common symbols after automake conversion.
Eric Anholt [Wed, 25 Jan 2012 22:42:45 +0000 (14:42 -0800)]
radeon: Fix missing dri common symbols after automake conversion.

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agodri: Move the compile of the common files to a convenience library.
Eric Anholt [Wed, 25 Jan 2012 22:40:41 +0000 (14:40 -0800)]
dri: Move the compile of the common files to a convenience library.

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoi915: Fix driver after automakeification.
Eric Anholt [Wed, 25 Jan 2012 19:23:51 +0000 (11:23 -0800)]
i915: Fix driver after automakeification.

12 years agoi965/vs: Use the sampler for VS pull constant loading on Ivybridge.
Kenneth Graunke [Thu, 26 Jan 2012 13:38:28 +0000 (05:38 -0800)]
i965/vs: Use the sampler for VS pull constant loading on Ivybridge.

Substantially increases performance in GLBenchmark PRO:
- 320x240   => 3.28x
- 1920x1080 => 1.47x
- 2560x1440 => 1.27x

The LD message ignores the sampler unit index and SAMPLER_STATE pointer,
instead relying on hard-wired default state.  Thus, there's no need to
worry about running out of sampler units or providing SAMPLER_STATE;
this small patch should be all that's required.

NOTE: This is a candidate for release branches.
      (It requires the preceding commit to compile.)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agoi965: Expose brw_set_sampler_message for use outside brw_eu_emit.c.
Kenneth Graunke [Thu, 26 Jan 2012 13:33:19 +0000 (05:33 -0800)]
i965: Expose brw_set_sampler_message for use outside brw_eu_emit.c.

brw_SAMPLE is full of complex workarounds for original Broadwater
hardware, and I'd rather avoid all that for my next Ivybridge patch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agosvga: reset vertex buffer offset in svga_release_user_upl_buffers()
Brian Paul [Thu, 26 Jan 2012 18:32:01 +0000 (11:32 -0700)]
svga: reset vertex buffer offset in svga_release_user_upl_buffers()

This function releases the buffer that contains user-space vertex data.
The buffer_offset field points into that buffer.  So reset the
buffer_offset to zero when we release the buffer so that subsequent
draws don't inadvertantly get a bad offset.

Fixes error messages / failed assertions (in the draw module's bounds/size
checking code) when running piglit's polygon-mode test.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agomapi: Make initMagic unsigned.
José Fonseca [Thu, 26 Jan 2012 17:33:33 +0000 (17:33 +0000)]
mapi: Make initMagic unsigned.

To avoid signed/unsigned comparison warnings against INIT_MAGIC
0xff8adc98, which doesn't fit on signed integers.

12 years agoscons: Remove references to u_thread.c
José Fonseca [Thu, 26 Jan 2012 17:25:30 +0000 (17:25 +0000)]
scons: Remove references to u_thread.c

For future reference: always run "git grep" on refactorings.

12 years agoFix visibility of u_thread functions by inlining them
Matt Turner [Tue, 24 Jan 2012 15:05:52 +0000 (10:05 -0500)]
Fix visibility of u_thread functions by inlining them

-fvisibility=hidden was preventing them from being exported, which
combined with shared-glapi was causing undefined symbol errors at
runtime.

We don't want to make these functions part of the ABI, and given
how simple they are, we simply inline them.

12 years agonouveau: include s_context.h to silence missing prototype warnings
Brian Paul [Thu, 26 Jan 2012 15:16:54 +0000 (08:16 -0700)]
nouveau: include s_context.h to silence missing prototype warnings

12 years agoswrast: silence uninitialized var warnings
Brian Paul [Thu, 26 Jan 2012 15:16:33 +0000 (08:16 -0700)]
swrast: silence uninitialized var warnings

12 years agonvfx: fix nv3x fallout from state validation changes
Lucas Stach [Tue, 24 Jan 2012 08:54:31 +0000 (09:54 +0100)]
nvfx: fix nv3x fallout from state validation changes

From c998f732d42da5e962fe5da294493132c3e8dc5f Mon Sep 17 00:00:00 2001
From: Lucas Stach <dev@lynxeye.de>
Date: Tue, 24 Jan 2012 09:46:32 +0100
Subject: [PATCH] nvfx: fix nv3x fallout from state validation changes

Apparently nv3x needs some curde hacks to work properly. This
is clearly not the right fix, but it's the behaviour of the old
code and fixes regressions seen by users.

12 years agogbm: Add back link flags for udev, dl and glapi
Benjamin Franzke [Thu, 26 Jan 2012 08:47:48 +0000 (09:47 +0100)]
gbm: Add back link flags for udev, dl and glapi

They were left out when migrating to automake.

12 years agoconfigure: Use WAYLAND_SCANNER_RULES only if available
Benjamin Franzke [Thu, 26 Jan 2012 09:50:04 +0000 (10:50 +0100)]
configure: Use WAYLAND_SCANNER_RULES only if available

This has the drawback that when creating configure for
distribution, wayland needs to be available for the packager.

Also the the macros has the wayland prefix hardcoded, so
we cant copy it in mesa right now.

12 years agodraw: Only run prepare when state, prim and opt changes
Jakob Bornecrantz [Mon, 24 Jan 2011 01:11:59 +0000 (02:11 +0100)]
draw: Only run prepare when state, prim and opt changes

In bad applications like ipers which does a lot of draw calls with
no state changes this helps to greatly reduce time spent in prepare.
In ipers around 7% of CPU was spent in various prepare functions,
after this commit no prepare function show on the profile.

This commit also has the added benefit of now grouping all pipelined
drawing into a single draw call if the driver uses vbuf_render.

Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agodraw: Don't revalidate pipeline on backend flushes
Jakob Bornecrantz [Sun, 5 Dec 2010 20:20:59 +0000 (21:20 +0100)]
draw: Don't revalidate pipeline on backend flushes

Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agodraw: Remove reduced_prim
Jakob Bornecrantz [Sun, 5 Dec 2010 20:19:12 +0000 (21:19 +0100)]
draw: Remove reduced_prim

Conflicts:

src/gallium/auxiliary/draw/draw_context.c

Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
12 years agoautomake: src/egl/wayland
Benjamin Franzke [Tue, 24 Jan 2012 19:38:01 +0000 (20:38 +0100)]
automake: src/egl/wayland

So we can use the wayland scanner makro, which is way
better than our previous runtime-pkgconfig hack.

Reviewed-by: Matt Turner <mattst88@gmail.com>
12 years agoi965/gen6/GT1: Increase max_vs_entries to 256.
Paul Berry [Tue, 24 Jan 2012 20:16:29 +0000 (12:16 -0800)]
i965/gen6/GT1: Increase max_vs_entries to 256.

Previously, max_vs_entries was set to 128 for GT1, and 256 for GT2,
based on the PRM (see Vol2, part1, p28).  However, Bspec section 1.6.5
indicates that the maximum number of VS entries is 256 for GT1.

No piglit regressions on GT1.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agoi965/gen6: Fix segfault in transform feedback to DYNAMIC_DRAW buffers.
Paul Berry [Tue, 24 Jan 2012 00:11:05 +0000 (16:11 -0800)]
i965/gen6: Fix segfault in transform feedback to DYNAMIC_DRAW buffers.

When storing data in a buffer of type DYNAMIC_DRAW, we don't create a
drm_intel_bo for it; instead we store the data in system memory and
defer allocation of the GPU buffer until it is needed.  Therefore, in
brw_update_sol_surface(), we can't just consult the "buffer" field of
the intel_buffer_object structure; we need to call
intel_bufferobj_buffer() to ensure that the deferred allocation
occurs.

This parallels a similar fix for gen7 (see commit ba6f4c9).

Fixes piglit test EXT_transform_feedback/buffer-usage on gen6.

This is a candidate for the 8.0 release branch.

Reviewed-by: Eric Anholt <eric@anholt.net>
12 years agogbm: fix copy & paste error in gbm_bo_get_handle documentation
Ander Conselvan de Oliveira [Wed, 25 Jan 2012 14:24:13 +0000 (16:24 +0200)]
gbm: fix copy & paste error in gbm_bo_get_handle documentation

12 years agomesa/st: Assign inputsRead at right (previous) location.
José Fonseca [Wed, 25 Jan 2012 13:47:55 +0000 (13:47 +0000)]
mesa/st: Assign inputsRead at right (previous) location.

Fixes the

  src/mesa/state_tracker/st_glsl_to_tgsi.cpp:4032:src_register: Assertion `t->inputMapping[index] < (sizeof(t->inputs)/sizeof(*(t->inputs)))' failed.

assertion failure introduced in 697b9945fb0f55428b06821f98fd8621372f81ad

12 years agomesa: remove ctx->Const.sRGBCapable
Marek Olšák [Tue, 24 Jan 2012 22:39:31 +0000 (23:39 +0100)]
mesa: remove ctx->Const.sRGBCapable

It always had the same value as ctx->Extensions.EXT_framebuffer_sRGB.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
12 years agor600g: handle start_component from stream_output_info when possible
Marek Olšák [Wed, 25 Jan 2012 02:28:23 +0000 (03:28 +0100)]
r600g: handle start_component from stream_output_info when possible

12 years agor600g: don't expose transform_feedback2 without kernel support
Marek Olšák [Wed, 25 Jan 2012 02:23:27 +0000 (03:23 +0100)]
r600g: don't expose transform_feedback2 without kernel support

12 years agomesa: allow exposing GL3 without EXT_texture_integer
Marek Olšák [Sun, 22 Jan 2012 19:25:42 +0000 (20:25 +0100)]
mesa: allow exposing GL3 without EXT_texture_integer

Strictly speaking, it's not legal to expose EXT_texture_integer without
EXT_gpu_shader4. It might be even dangerous (apps can assume EXT_gpu_shader4
is available without checking for it).

The check in compute_version is removed as well, because that's already
covered by GLSLVersion >= 130.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: add missing integer alpha formats to _mesa_base_fbo_format
Marek Olšák [Sun, 22 Jan 2012 19:21:36 +0000 (20:21 +0100)]
mesa: add missing integer alpha formats to _mesa_base_fbo_format

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: require all s3tc formats for EXT_texture_compression_s3tc
Marek Olšák [Sun, 22 Jan 2012 17:47:21 +0000 (18:47 +0100)]
st/mesa: require all s3tc formats for EXT_texture_compression_s3tc

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agost/mesa: simplify enabling EXT_packed_depth_stencil and ARB_fbo
Marek Olšák [Sun, 22 Jan 2012 17:27:40 +0000 (18:27 +0100)]
st/mesa: simplify enabling EXT_packed_depth_stencil and ARB_fbo

- use OR to combine bind flags
- combine both conditionals into one
- move the ARB_fbo enable where it belongs

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: remove obsolete comment in version.c
Marek Olšák [Tue, 24 Jan 2012 20:31:46 +0000 (21:31 +0100)]
mesa: remove obsolete comment in version.c

Pointed out by Brian Paul.

12 years agogallium/docs: document more CAPs
Marek Olšák [Tue, 24 Jan 2012 20:24:21 +0000 (21:24 +0100)]
gallium/docs: document more CAPs

12 years agor600g: nuke the fallback for vertex and fragment color clamping
Marek Olšák [Mon, 23 Jan 2012 02:43:54 +0000 (03:43 +0100)]
r600g: nuke the fallback for vertex and fragment color clamping

12 years agor300g: nuke the fallback for fragment color clamping
Marek Olšák [Mon, 23 Jan 2012 02:38:39 +0000 (03:38 +0100)]
r300g: nuke the fallback for fragment color clamping

12 years agost/mesa: inline if(1) conditional
Marek Olšák [Mon, 23 Jan 2012 12:28:07 +0000 (13:28 +0100)]
st/mesa: inline if(1) conditional

v2: fix typo

12 years agost/mesa: move fragment shader tgsi tokens into st_fp_variant
Marek Olšák [Mon, 23 Jan 2012 12:26:04 +0000 (13:26 +0100)]
st/mesa: move fragment shader tgsi tokens into st_fp_variant

The TGSI code may vary depending on the clamp_color bit.

12 years agost/mesa: do vertex and fragment color clamping in shaders
Marek Olšák [Mon, 23 Jan 2012 02:11:17 +0000 (03:11 +0100)]
st/mesa: do vertex and fragment color clamping in shaders

For ARB_color_buffer_float. Most hardware can't do it and st/mesa is
the perfect place for a fallback.
The exceptions are:
- r500 (vertex clamp only)
- nv50 (both)
- nvc0 (both)
- softpipe (both)

We also have to take into account that r300 can do CLAMPED vertex colors only,
while r600 can do UNCLAMPED vertex colors only. The difference can be expressed
with the two new CAPs.

12 years agost/xvmc: remove xorg-server dependency
Christian König [Tue, 24 Jan 2012 11:19:59 +0000 (12:19 +0100)]
st/xvmc: remove xorg-server dependency

Fixing a circular build dependency.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Christian König <deathsimple@vodafone.de>
12 years agost/mesa: Fix recurring surfaceless contexts
Benjamin Franzke [Tue, 24 Jan 2012 13:35:34 +0000 (14:35 +0100)]
st/mesa: Fix recurring surfaceless contexts

A current incomplete framebuffer was incorrectly used as a
st_framebuffer. When accessing st_framebuffer childs bad things happen:
e.g. st_framebuffer::iface was used to check whether its an incomplete
fb, instead we need to compare st_framebuffer::Base against
mesa_get_incomplete_framebuffer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44919
Note: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: Fix CopyTex{Sub,}Image error checks for integer vs non-integer.
Eric Anholt [Fri, 20 Jan 2012 21:43:11 +0000 (13:43 -0800)]
mesa: Fix CopyTex{Sub,}Image error checks for integer vs non-integer.

Fixes Intel oglconform negative.typeFormatMismatch.copyteximage.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>