Makefile.am                                                   |    1 
 VERSION                                                       |    2 
 configure.ac                                                  |   18 +
 debian/changelog                                              |    4 
 debian/upstream/signing-key.asc                               |   29 ++
 src/gallium/drivers/freedreno/a2xx/fd2_context.c              |    1 
 src/gallium/drivers/freedreno/a3xx/fd3_emit.c                 |   11 -
 src/gallium/drivers/freedreno/a3xx/fd3_texture.c              |   10 
 src/gallium/drivers/freedreno/a3xx/fd3_texture.h              |    1 
 src/gallium/drivers/freedreno/freedreno_resource.c            |  108 ++++++----
 src/gallium/drivers/freedreno/ir3/ir3_dump.c                  |    3 
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp |   32 ++
 src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h   |    5 
 src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp      |    4 
 src/gallium/drivers/nouveau/nv50/nv50_state.c                 |    7 
 src/gallium/drivers/nouveau/nv50/nv50_state_validate.c        |    8 
 src/gallium/drivers/nouveau/nv50/nv50_surface.c               |   16 -
 src/gallium/drivers/nouveau/nv50/nv50_transfer.c              |    2 
 src/gallium/drivers/nouveau/nv50/nv84_video.c                 |   15 -
 src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c               |    1 
 src/gallium/drivers/r600/r600_blit.c                          |    3 
 src/gallium/drivers/r600/r600_state_common.c                  |   12 -
 src/gallium/drivers/radeon/r600_query.c                       |   28 ++
 src/gallium/state_trackers/dri/dri2.c                         |    8 
 src/gallium/targets/dri/Makefile.am                           |    6 
 src/gallium/targets/vdpau/Makefile.am                         |    6 
 src/gallium/winsys/svga/drm/vmw_screen_dri.c                  |   13 -
 src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c             |   82 ++++++-
 src/glsl/lower_variable_index_to_cond_assign.cpp              |    2 
 src/mesa/Makefile.am                                          |    3 
 src/mesa/drivers/common/meta.c                                |   38 ---
 src/mesa/drivers/common/meta_copy_image.c                     |    2 
 src/mesa/drivers/dri/i965/brw_fs_visitor.cpp                  |   20 +
 src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp                |   23 +-
 src/mesa/drivers/dri/i965/intel_copy_image.c                  |   53 +++-
 src/mesa/main/attrib.c                                        |    4 
 src/mesa/main/context.c                                       |    3 
 src/mesa/main/macros.h                                        |    7 
 src/mesa/state_tracker/st_extensions.c                        |    5 
 src/mesa/state_tracker/st_glsl_to_tgsi.cpp                    |   51 +++-
 40 files changed, 455 insertions(+), 192 deletions(-)

New commits:
commit 21df3116dde1f1007db142aaa84792319cb47d4c
Author: Maarten Lankhorst <maarten.lankho...@canonical.com>
Date:   Mon Sep 8 15:51:05 2014 +0200

    release to experimental

diff --git a/debian/changelog b/debian/changelog
index cb2e48d..76cf8a6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mesa (10.3.0~rc3-1) UNRELEASED; urgency=low
+mesa (10.3.0~rc3-1) experimental; urgency=medium
 
   [ Maarten Lankhorst ]
   * Build with llvm 3.5.
@@ -9,7 +9,7 @@ mesa (10.3.0~rc3-1) UNRELEASED; urgency=low
   * mesa-common-dev: Add glcorearb.h.
   * not-installed: Skip libglapi.so.
 
- -- Maarten Lankhorst <maarten.lankho...@ubuntu.com>  Tue, 12 Aug 2014 
09:38:49 +0200
+ -- Maarten Lankhorst <maarten.lankho...@ubuntu.com>  Mon, 08 Sep 2014 
15:50:42 +0200
 
 mesa (10.2.5-1) unstable; urgency=medium
 

commit ea6a35dd882ed2630e0fca5ba1c6303bc0313a2d
Author: Maarten Lankhorst <maarten.lankho...@canonical.com>
Date:   Mon Sep 8 15:26:52 2014 +0200

    add xexaxo's key to allowed signatures
    
    Matches the tag downloaded through ssh from fd.org.
    I have no idea if it's the real one or not, but it matches the tarball.

diff --git a/debian/upstream/signing-key.asc b/debian/upstream/signing-key.asc
index 529e6c5..360f6c8 100644
--- a/debian/upstream/signing-key.asc
+++ b/debian/upstream/signing-key.asc
@@ -587,3 +587,32 @@ 
STu6wy2ZfNz1G8MKoYTavqyjYKTJBi3ZuSllxBY973CaRe5uU2WhJcBlkHv3Qut6
 /r0Jac/UieMLDFX8ixH7ooSevqX8sSA4UbVuUaOXVr0awYUCvD0d
 =LxfO
 -----END PGP PUBLIC KEY BLOCK-----
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.11 (GNU/Linux)
+
+mQINBFQDrA8BEACyGXUc6vSmNkwZdTTzX1vHRgIDWoppot56E5oOO+gM6ukyMDY7
+60FxKvmh704I8NqTfg3Rcs18fSOXeRj1gDG84MsU7QM3g6IQyxCA+IV7d2r/DPZE
+z7HxEIKFxGJw24swsQJy/iiZf/b8flqiJbx3Ye1LF7T5iw/gKDsN6eqzAtLKqw9I
+/4TBVE766nwmKNQZiw2jAFCs3lwfmNIm7ZaQNBpHTRabMTLMJiFFynLsa1eVsf9D
+R3eVXW4c2oHKZbxDvSWR2yz6XcQ9ldii89sUNeclnjSFNOt761P4zBNwcEX2GuQs
+JO/haw5FyrMJJexAbdUTtshZ7XvhDv/UCHtyqQBUw/vwYe8Rx79Hq/fOOUdMjWOW
+cDCzyYTmGdbEJYRHrENcsOhoti3IkOjgzw0UDyCHyjapFV1ZJT/Kz7rkMmsdNtoi
+1BVTLIdOvQmeXQtN2caZSN20wZWHdZnrz1/JOfOxpEsf2R78zavIfobReQdFoYMC
+jv4b49WB/Gytd5vneqk9yi9DEhCYw5uGxQgjIKC4AZPVtD//GY+iYiPe5dPwrhU1
+FyD3b9SgYxFE/uZlgbzBIV4akK11vC5Q+Co5PYzhnPPgd7cYLjr/ceMfGPkeWLCY
+OxZbXg92BZKKJnFHYx7FJ04WKS8SjzIn/qEzvy7SmPGxSCX6zdwn0fKZYQARAQAB
+tCdFbWlsIFZlbGlrb3YgPGVtaWwubC52ZWxpa292QGdtYWlsLmNvbT6JAjkEEwEC
+ACMFAlQDrA8CGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRDtrjewLOtJ
+DV/AEACd/RKvSzL0L4/9HYvFskjNR40NPFyQHyMaPg9eeblhfbnH7mWYXJ2MPGTR
+bgvQCr0zZ3R7u8E8Rxulwifbm20x0WhYOKkDuSROjroRqvDhxfuLtXtBKqfVGw6T
+0rMEOOWdqGhql4yuVpqGbgHa5ZfFvQi2EtT40QDdD052adzWeT96aFQB6Gf3CRMf
+a4y7hawbUV10XL3BUljUcyh+SJv9lPclW09WNE+tuCmdIqoP927BSjXwh2GR6dM0
+z0aDf3wOxRc9S8q34jS+xN8hsXmYFAqkn0YkVIQ0M0PaQ89ltcyonbG6rZ+1rNgx
+tiLEpfOZpzr7LowVsw9R6ky/pvhBHfVIM4aT17hbi2XfnMihmt/T1SZqb36+aYFt
+j8Bc/o9I5crPXwOP4in3heY2ZmDWeGkPSRNix0VLQHL0HzOxjMAEm+y5ROLDo7Z/
+sGOebYxMYPIK5mJzrKhk737FEI57cvUSRXzbjmV3CIOIJbaNULWFXkCHRhdyk8mh
+sVzKkl7IDiWPBj1RC5r0EXmrjUzK8QfzrTWiOa6z9WIkZ4sSs0bz14Q4pZR2qi8L
+KLVjCNf/FusqCTgbZU06x1S/75XJwcsFENWkWYPEaxxzQiCs1rVzG8SnrOjcyc5F
+T0rEAQLWU7eq9U6nd4BXMkokiuzlOKWqsDyXibR3wkhI80kAJw==
+=XSpT
+-----END PGP PUBLIC KEY BLOCK-----

commit 14204839dd938ae7ca76d2284fdc4e7c58129779
Author: Maarten Lankhorst <maarten.lankho...@canonical.com>
Date:   Mon Sep 8 15:21:10 2014 +0200

    bump version

diff --git a/debian/changelog b/debian/changelog
index ae0bbb8..cb2e48d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mesa (10.3~rc2-1) UNRELEASED; urgency=low
+mesa (10.3.0~rc3-1) UNRELEASED; urgency=low
 
   [ Maarten Lankhorst ]
   * Build with llvm 3.5.

commit 4e1ca4a190a0809e3c33327590faaa7eb25812ab
Author: Emil Velikov <emil.l.veli...@gmail.com>
Date:   Fri Sep 5 17:00:40 2014 +0100

    Increment version to 10.3.0-rc3
    
    Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>

diff --git a/VERSION b/VERSION
index 87d81b2..babe311 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-10.3.0-rc2
+10.3.0-rc3

commit 06f1f1ea8106e285a92e873a04de90e3aa228a32
Author: Marek Olšák <marek.ol...@amd.com>
Date:   Thu Sep 4 14:38:18 2014 +0200

    st/mesa: use 1.0f as boolean true on drivers without integer support
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882
    
    Cc: 10.2 10.3 mesa-sta...@lists.freedesktop.org
    Reviewed-by: Brian Paul <bri...@vmware.com>
    Reviewed-by: Matt Turner <matts...@gmail.com>
    (cherry picked from commit 1a00f247512f22e58548053a99a706615a178672)

diff --git a/src/mesa/state_tracker/st_extensions.c 
b/src/mesa/state_tracker/st_extensions.c
index 4110eb5..914004b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -34,6 +34,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_screen.h"
+#include "util/u_math.h"
 
 #include "st_context.h"
 #include "st_extensions.h"
@@ -274,8 +275,6 @@ void st_init_limits(struct pipe_screen *screen,
    c->MinProgramTextureGatherOffset = screen->get_param(screen, 
PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET);
    c->MaxProgramTextureGatherOffset = screen->get_param(screen, 
PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET);
 
-   c->UniformBooleanTrue = ~0;
-
    c->MaxTransformFeedbackBuffers =
       screen->get_param(screen, PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS);
    c->MaxTransformFeedbackBuffers = MIN2(c->MaxTransformFeedbackBuffers, 
MAX_FEEDBACK_BUFFERS);
@@ -697,6 +696,8 @@ void st_init_extensions(struct pipe_screen *screen,
       }
    }
 
+   consts->UniformBooleanTrue = consts->NativeIntegers ? ~0 : fui(1.0f);
+
    /* Below are the cases which cannot be moved into tables easily. */
 
    if (!has_lib_dxtc && !options->force_s3tc_enable) {

commit e842a02df3730aaabe7c71dd560c4f0f163ffbc5
Author: Marek Olšák <marek.ol...@amd.com>
Date:   Thu Sep 4 15:03:31 2014 +0200

    mesa: set UniformBooleanTrue = 1.0f by default
    
    because NativeIntegers is 0 by default.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82882
    
    Cc: 10.2 10.3 mesa-sta...@lists.freedesktop.org
    Reviewed-by: Brian Paul <bri...@vmware.com>
    Reviewed-by: Matt Turner <matts...@gmail.com>
    (cherry picked from commit d67db73458c8d66861b97675660289a9555695ce)

diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 2320842..509efd7 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -653,6 +653,9 @@ _mesa_init_constants(struct gl_constants *consts, gl_api 
api)
    /* GL_ARB_framebuffer_object */
    consts->MaxSamples = 0;
 
+   /* GLSL default if NativeIntegers == FALSE */
+   consts->UniformBooleanTrue = FLT_AS_UINT(1.0f);
+
    /* GL_ARB_sync */
    consts->MaxServerWaitTimeout = 0x1fff7fffffffULL;
 
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h
index 0ba658a..2d54ca5 100644
--- a/src/mesa/main/macros.h
+++ b/src/mesa/main/macros.h
@@ -184,6 +184,13 @@ static inline GLfloat UINT_AS_FLT(GLuint u)
    return tmp.f;
 }
 
+static inline unsigned FLT_AS_UINT(float f)
+{
+   fi_type tmp;
+   tmp.f = f;
+   return tmp.u;
+}
+
 /**
  * Convert a floating point value to an unsigned fixed point value.
  *

commit 96bca3617c3a66462d05a53287ae99940dd940d0
Author: Rob Clark <robcl...@freedesktop.org>
Date:   Sat Aug 30 16:51:46 2014 -0400

    freedreno/ir3: fix potential null ptr deref
    
    Fix potential segfault in debug code.
    
    Signed-off-by: Rob Clark <robcl...@freedesktop.org>
    (cherry picked from commit c06afcede2a0cf214aadc7d4ea149b361ee56ad2)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_dump.c 
b/src/gallium/drivers/freedreno/ir3/ir3_dump.c
index 1a6f49d..6133628 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_dump.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_dump.c
@@ -322,7 +322,8 @@ static void ir3_block_dump(struct ir3_dump_ctx *ctx,
 
        /* draw instruction graph: */
        for (i = 0; i < block->noutputs; i++)
-               dump_instr(ctx, block->outputs[i]);
+               if (block->outputs[i])
+                       dump_instr(ctx, block->outputs[i]);
 
        /* draw outputs: */
        fprintf(ctx->f, "output%lx [shape=record,label=\"outputs", 
PTRID(block));

commit c221e96a13e89d2dee1dff18e95b7a9f0385d237
Author: Rob Clark <robcl...@freedesktop.org>
Date:   Sun Aug 24 13:06:37 2014 -0400

    freedreno/a2xx: fix segfault
    
    Signed-off-by: Rob Clark <robcl...@freedesktop.org>
    (cherry picked from commit 306e421887720b149be77c749108bcffcebe34f6)

diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_context.c 
b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
index f51c5ee..a0bf01f 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_context.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_context.c
@@ -98,6 +98,7 @@ fd2_context_create(struct pipe_screen *pscreen, void *priv)
        pctx = &fd2_ctx->base.base;
 
        fd2_ctx->base.dev = fd_device_ref(screen->dev);
+       fd2_ctx->base.screen = fd_screen(pscreen);
 
        pctx->destroy = fd2_context_destroy;
        pctx->create_blend_state = fd2_blend_state_create;

commit 640ddefd9692df695a4ac44381a3a79823eacda6
Author: Rob Clark <robcl...@freedesktop.org>
Date:   Sat Aug 23 11:35:31 2014 -0400

    freedreno/a3xx: handle first/last level properly
    
    Fixes some assumptions about first_level being zero.
    
    Signed-off-by: Rob Clark <robcl...@freedesktop.org>
    (cherry picked from commit bd3b0964675d36e753e273d5667b922cc9baac4a)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c 
b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
index 44932dc..aae8ff1 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
@@ -215,14 +215,19 @@ emit_textures(struct fd_ringbuffer *ring,
                OUT_RING(ring, CP_LOAD_STATE_1_STATE_TYPE(ST_CONSTANTS) |
                                CP_LOAD_STATE_1_EXT_SRC_ADDR(0));
                for (i = 0; i < tex->num_textures; i++) {
-                       static const struct fd3_pipe_sampler_view dummy_view = 
{};
+                       static const struct fd3_pipe_sampler_view dummy_view = {
+                                       .base.u.tex.first_level = 1,
+                       };
                        const struct fd3_pipe_sampler_view *view = 
tex->textures[i] ?
                                        fd3_pipe_sampler_view(tex->textures[i]) 
:
                                        &dummy_view;
                        struct fd_resource *rsc = view->tex_resource;
+                       unsigned start = view->base.u.tex.first_level;
+                       unsigned end   = view->base.u.tex.last_level;
 
-                       for (j = 0; j < view->mipaddrs; j++) {
-                               struct fd_resource_slice *slice = 
fd_resource_slice(rsc, j);
+                       for (j = 0; j < (end - start + 1); j++) {
+                               struct fd_resource_slice *slice =
+                                               fd_resource_slice(rsc, j + 
start);
                                OUT_RELOC(ring, rsc->bo, slice->offset, 0, 0);
                        }
 
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c 
b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
index f28919f..b0e5efb 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
@@ -144,7 +144,8 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct 
pipe_resource *prsc,
 {
        struct fd3_pipe_sampler_view *so = CALLOC_STRUCT(fd3_pipe_sampler_view);
        struct fd_resource *rsc = fd_resource(prsc);
-       unsigned miplevels = cso->u.tex.last_level - cso->u.tex.first_level;
+       unsigned lvl = cso->u.tex.first_level;
+       unsigned miplevels = cso->u.tex.last_level - lvl;
 
        if (!so)
                return NULL;
@@ -156,7 +157,6 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct 
pipe_resource *prsc,
        so->base.context = pctx;
 
        so->tex_resource =  rsc;
-       so->mipaddrs = 1 + miplevels;
 
        so->texconst0 =
                        A3XX_TEX_CONST_0_TYPE(tex_type(prsc->target)) |
@@ -170,11 +170,11 @@ fd3_sampler_view_create(struct pipe_context *pctx, struct 
pipe_resource *prsc,
 
        so->texconst1 =
                        
A3XX_TEX_CONST_1_FETCHSIZE(fd3_pipe2fetchsize(cso->format)) |
-                       A3XX_TEX_CONST_1_WIDTH(prsc->width0) |
-                       A3XX_TEX_CONST_1_HEIGHT(prsc->height0);
+                       A3XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) |
+                       A3XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl));
        /* when emitted, A3XX_TEX_CONST_2_INDX() must be OR'd in: */
        so->texconst2 =
-                       A3XX_TEX_CONST_2_PITCH(rsc->slices[0].pitch * rsc->cpp);
+                       A3XX_TEX_CONST_2_PITCH(rsc->slices[lvl].pitch * 
rsc->cpp);
        so->texconst3 = 0x00000000;  /* ??? */
 
        return &so->base;
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.h 
b/src/gallium/drivers/freedreno/a3xx/fd3_texture.h
index f7e5f0e..a83f527 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.h
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.h
@@ -51,7 +51,6 @@ fd3_sampler_stateobj(struct pipe_sampler_state *samp)
 struct fd3_pipe_sampler_view {
        struct pipe_sampler_view base;
        struct fd_resource *tex_resource;
-       uint32_t mipaddrs;
        uint32_t texconst0, texconst1, texconst2, texconst3;
 };
 

commit 7cd0fa023e996371729a3ffd4fd18b6a9ae3bd8e
Author: Rob Clark <robcl...@freedesktop.org>
Date:   Sat Aug 23 09:33:50 2014 -0400

    freedreno: implement pipe_flush_resource()
    
    Signed-off-by: Rob Clark <robcl...@freedesktop.org>
    (cherry picked from commit b40a6c2b17de1f63d70d62608737ed9a259da1c5)

diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c 
b/src/gallium/drivers/freedreno/freedreno_resource.c
index 65dfc04..034e4b4 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -438,8 +438,12 @@ fd_blitter_pipe_end(struct fd_context *ctx)
 }
 
 static void
-fd_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource)
+fd_flush_resource(struct pipe_context *pctx, struct pipe_resource *prsc)
 {
+       struct fd_resource *rsc = fd_resource(prsc);
+
+       if (rsc->dirty)
+               fd_context_render(pctx);
 }
 
 void

commit cd94c644217a8b1ed13bc6eaba44ebdde6074f78
Author: Rob Clark <robcl...@freedesktop.org>
Date:   Fri Aug 22 18:33:15 2014 -0400

    freedreno: don't ignore src/dst level
    
    Don't ignore src/dst_level in pipe_copy_region.
    
    Signed-off-by: Rob Clark <robcl...@freedesktop.org>
    (cherry picked from commit 478a08ebd2b29724f2d440e560ab331c534236cd)

diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c 
b/src/gallium/drivers/freedreno/freedreno_resource.c
index ebc134a..65dfc04 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -304,7 +304,36 @@ fail:
        return NULL;
 }
 
-static bool render_blit(struct pipe_context *pctx, struct pipe_blit_info 
*info);
+static void fd_blitter_pipe_begin(struct fd_context *ctx);
+static void fd_blitter_pipe_end(struct fd_context *ctx);
+
+/**
+ * _copy_region using pipe (3d engine)
+ */
+static bool
+fd_blitter_pipe_copy_region(struct fd_context *ctx,
+               struct pipe_resource *dst,
+               unsigned dst_level,
+               unsigned dstx, unsigned dsty, unsigned dstz,
+               struct pipe_resource *src,
+               unsigned src_level,
+               const struct pipe_box *src_box)
+{
+       /* not until we allow rendertargets to be buffers */
+       if (dst->target == PIPE_BUFFER || src->target == PIPE_BUFFER)
+               return false;
+
+       if (!util_blitter_is_copy_supported(ctx->blitter, dst, src))
+               return false;
+
+       fd_blitter_pipe_begin(ctx);
+       util_blitter_copy_texture(ctx->blitter,
+                       dst, dst_level, dstx, dsty, dstz,
+                       src, src_level, src_box);
+       fd_blitter_pipe_end(ctx);
+
+       return true;
+}
 
 /**
  * Copy a block of pixels from one resource to another.
@@ -320,40 +349,33 @@ fd_resource_copy_region(struct pipe_context *pctx,
                unsigned src_level,
                const struct pipe_box *src_box)
 {
+       struct fd_context *ctx = fd_context(pctx);
+
        /* TODO if we have 2d core, or other DMA engine that could be used
         * for simple copies and reasonably easily synchronized with the 3d
         * core, this is where we'd plug it in..
         */
-       struct pipe_blit_info info = {
-               .dst = {
-                       .resource = dst,
-                       .box = {
-                               .x      = dstx,
-                               .y      = dsty,
-                               .z      = dstz,
-                               .width  = src_box->width,
-                               .height = src_box->height,
-                               .depth  = src_box->depth,
-                       },
-                       .format = util_format_linear(dst->format),
-               },
-               .src = {
-                       .resource = src,
-                       .box      = *src_box,
-                       .format   = util_format_linear(src->format),
-               },
-               .mask = PIPE_MASK_RGBA,
-               .filter = PIPE_TEX_FILTER_NEAREST,
-       };
-       render_blit(pctx, &info);
+
+       /* try blit on 3d pipe: */
+       if (fd_blitter_pipe_copy_region(ctx,
+                       dst, dst_level, dstx, dsty, dstz,
+                       src, src_level, src_box))
+               return;
+
+       /* else fallback to pure sw: */
+       util_resource_copy_region(pctx,
+                       dst, dst_level, dstx, dsty, dstz,
+                       src, src_level, src_box);
 }
 
-/* Optimal hardware path for blitting pixels.
+/**
+ * Optimal hardware path for blitting pixels.
  * Scaling, format conversion, up- and downsampling (resolve) are allowed.
  */
 static void
 fd_blit(struct pipe_context *pctx, const struct pipe_blit_info *blit_info)
 {
+       struct fd_context *ctx = fd_context(pctx);
        struct pipe_blit_info info = *blit_info;
 
        if (info.src.resource->nr_samples > 1 &&
@@ -373,21 +395,21 @@ fd_blit(struct pipe_context *pctx, const struct 
pipe_blit_info *blit_info)
                info.mask &= ~PIPE_MASK_S;
        }
 
-       render_blit(pctx, &info);
-}
-
-static bool
-render_blit(struct pipe_context *pctx, struct pipe_blit_info *info)
-{
-       struct fd_context *ctx = fd_context(pctx);
-
-       if (!util_blitter_is_blit_supported(ctx->blitter, info)) {
+       if (!util_blitter_is_blit_supported(ctx->blitter, &info)) {
                DBG("blit unsupported %s -> %s",
-                               
util_format_short_name(info->src.resource->format),
-                               
util_format_short_name(info->dst.resource->format));
-               return false;
+                               
util_format_short_name(info.src.resource->format),
+                               
util_format_short_name(info.dst.resource->format));
+               return;
        }
 
+       fd_blitter_pipe_begin(ctx);
+       util_blitter_blit(ctx->blitter, &info);
+       fd_blitter_pipe_end(ctx);
+}
+
+static void
+fd_blitter_pipe_begin(struct fd_context *ctx)
+{
        util_blitter_save_vertex_buffer_slot(ctx->blitter, ctx->vertexbuf.vb);
        util_blitter_save_vertex_elements(ctx->blitter, ctx->vtx);
        util_blitter_save_vertex_shader(ctx->blitter, ctx->prog.vp);
@@ -407,10 +429,12 @@ render_blit(struct pipe_context *pctx, struct 
pipe_blit_info *info)
                        ctx->fragtex.num_textures, ctx->fragtex.textures);
 
        fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_BLIT);
-       util_blitter_blit(ctx->blitter, info);
-       fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
+}
 
-       return true;
+static void
+fd_blitter_pipe_end(struct fd_context *ctx)
+{
+       fd_hw_query_set_stage(ctx, ctx->ring, FD_STAGE_NULL);
 }
 
 static void

commit e9923b2194b2a000d2a720e79746d66277d9019b
Author: Jonathan Gray <j...@jsg.id.au>
Date:   Tue Sep 2 02:08:00 2014 +1000

    automake: check if the linker supports --dynamic-list
    
    As older versions of gnu ld did not support --dynamic-list check to see
    if it is supported before using it.  Non gnu linkers such the apple one
    likely lack this option as well.
    
    Fixes the build on OpenBSD which has binutils 2.15 and 2.17.
    The --dynamic-list option seems to been have introduced sometime after
    binutils 2.17 was released as it is present in 2.18.
    
    Cc: mesa-sta...@lists.freedesktop.org
    Signed-off-by: Jonathan Gray <j...@jsg.id.au>
    Reviewed-by: Emil Velikov <emil.l.veli...@gmail.com>
    (cherry picked from commit 635477dc4b9579dac2fc0fb332dcf2e0e48dd418)

diff --git a/configure.ac b/configure.ac
index be6898f..050bcaf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -356,6 +356,24 @@ LDFLAGS=$save_LDFLAGS
 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
 
 dnl
+dnl Check if linker supports dynamic list files
+dnl
+AC_MSG_CHECKING([if the linker supports --dynamic-list])
+save_LDFLAGS=$LDFLAGS
+LDFLAGS="$LDFLAGS -Wl,--dynamic-list=conftest.dyn"
+cat > conftest.dyn <<EOF
+{
+       radeon_drm_winsys_create;
+};
+EOF
+AC_LINK_IFELSE(
+    [AC_LANG_SOURCE([int main() { return 0;}])],
+    [have_ld_dynamic_list=yes;AC_MSG_RESULT(yes)],
+    [have_ld_dynamic_list=no; AC_MSG_RESULT(no)])
+LDFLAGS=$save_LDFLAGS
+AM_CONDITIONAL(HAVE_LD_DYNAMIC_LIST, test "$have_ld_dynamic_list" = "yes")
+
+dnl
 dnl compatibility symlinks
 dnl
 case "$host_os" in
diff --git a/src/gallium/targets/dri/Makefile.am 
b/src/gallium/targets/dri/Makefile.am
index 70b19b8..1c33a91 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -26,7 +26,6 @@ gallium_dri_la_LDFLAGS = \
        -shrext .so \
        -module \
        -avoid-version \
-       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn \
        $(GC_SECTIONS)
 
 if HAVE_LD_VERSION_SCRIPT
@@ -34,6 +33,11 @@ gallium_dri_la_LDFLAGS += \
        -Wl,--version-script=$(top_srcdir)/src/gallium/targets/dri/dri.sym
 endif # HAVE_LD_VERSION_SCRIPT
 
+if HAVE_LD_DYNAMIC_LIST
+gallium_dri_la_LDFLAGS += \
+       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
+endif # HAVE_LD_DYNAMIC_LIST
+
 gallium_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
diff --git a/src/gallium/targets/vdpau/Makefile.am 
b/src/gallium/targets/vdpau/Makefile.am
index 6c92cd8..440cf22 100644
--- a/src/gallium/targets/vdpau/Makefile.am
+++ b/src/gallium/targets/vdpau/Makefile.am
@@ -15,7 +15,6 @@ libvdpau_gallium_la_LDFLAGS = \
        -module \
        -no-undefined \
        -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
@@ -24,6 +23,11 @@ libvdpau_gallium_la_LDFLAGS += \
        -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau/vdpau.sym
 endif # HAVE_LD_VERSION_SCRIPT
 
+if HAVE_LD_DYNAMIC_LIST
+libvdpau_gallium_la_LDFLAGS += \
+       -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
+endif # HAVE_LD_DYNAMIC_LIST
+
 libvdpau_gallium_la_LIBADD = \
        $(top_builddir)/src/gallium/state_trackers/vdpau/libvdpautracker.la \
        $(top_builddir)/src/gallium/auxiliary/libgallium.la \

commit 2e56334a2a58b6da1487fa088f76aa4522aa91aa
Author: Andreas Pokorny <andreas.poko...@canonical.com>
Date:   Fri Aug 22 18:41:11 2014 +0200

    kms-swrast: Support Prime fd handling
    
    Allows using prime fds as display target and from display target.
    Test for PRIME capability after initializing kms_swrast screen.
    
    Cc: mesa-sta...@lists.freedesktop.org
    Signed-off-by: Andreas Pokorny <andreas.poko...@canonical.com>
    (cherry picked from commit 8bcd57a46ce9d4a960253fd89ad21bd3e1776f8b)

diff --git a/src/gallium/state_trackers/dri/dri2.c 
b/src/gallium/state_trackers/dri/dri2.c
index 1d79dfc..24c753a 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1328,6 +1328,7 @@ dri_kms_init_screen(__DRIscreen * sPriv)
    const __DRIconfig **configs;
    struct dri_screen *screen;
    struct pipe_screen *pscreen = NULL;
+   uint64_t cap;
 
    screen = CALLOC_STRUCT(dri_screen);
    if (!screen)
@@ -1339,6 +1340,13 @@ dri_kms_init_screen(__DRIscreen * sPriv)
    sPriv->driverPrivate = (void *)screen;
 
    pscreen = kms_swrast_create_screen(screen->fd);
+
+   if (drmGetCap(sPriv->fd, DRM_CAP_PRIME, &cap) == 0 &&
+          (cap & DRM_PRIME_CAP_IMPORT)) {
+      dri2ImageExtension.createImageFromFds = dri2_from_fds;
+      dri2ImageExtension.createImageFromDmaBufs = dri2_from_dma_bufs;
+   }
+
    sPriv->extensions = dri_screen_extensions;
 
    /* dri_init_screen_helper checks pscreen for us */
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c 
b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
index c9934bb..49b2e65 100644
--- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
+++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c
@@ -38,6 +38,7 @@
 #include <sys/mman.h>
 #include <unistd.h>
 #include <dlfcn.h>
+#include <fcntl.h>
 #include <xf86drm.h>
 
 #include "pipe/p_compiler.h"
@@ -121,7 +122,7 @@ kms_sw_displaytarget_create(struct sw_winsys *ws,
    int ret;
 
    kms_sw_dt = CALLOC_STRUCT(kms_sw_displaytarget);
-   if(!kms_sw_dt)
+   if (!kms_sw_dt)
       goto no_dt;
 
    kms_sw_dt->ref_count = 1;
@@ -210,6 +211,38 @@ kms_sw_displaytarget_map(struct sw_winsys *ws,
    return kms_sw_dt->mapped;
 }
 
+static struct kms_sw_displaytarget *
+kms_sw_displaytarget_add_from_prime(struct kms_sw_winsys *kms_sw, int fd)
+{
+   uint32_t handle = -1;
+   struct kms_sw_displaytarget * kms_sw_dt;
+   int ret;
+
+   ret = drmPrimeFDToHandle(kms_sw->fd, fd, &handle);
+
+   if (ret)
+      return NULL;
+
+   kms_sw_dt = CALLOC_STRUCT(kms_sw_displaytarget);
+   if (!kms_sw_dt)
+      return NULL;
+
+   kms_sw_dt->ref_count = 1;
+   kms_sw_dt->handle = handle;
+   kms_sw_dt->size = lseek(fd, 0, SEEK_END);
+
+   if (kms_sw_dt->size == (off_t)-1) {
+      FREE(kms_sw_dt);
+      return NULL;
+   }
+
+   lseek(fd, 0, SEEK_SET);
+
+   list_add(&kms_sw_dt->link, &kms_sw->bo_list);
+
+   return kms_sw_dt;
+}
+
 static void
 kms_sw_displaytarget_unmap(struct sw_winsys *ws,
                            struct sw_displaytarget *dt)
@@ -231,17 +264,34 @@ kms_sw_displaytarget_from_handle(struct sw_winsys *ws,
    struct kms_sw_winsys *kms_sw = kms_sw_winsys(ws);
    struct kms_sw_displaytarget *kms_sw_dt;
 
-   assert(whandle->type == DRM_API_HANDLE_TYPE_KMS);
+   assert(whandle->type == DRM_API_HANDLE_TYPE_KMS ||
+          whandle->type == DRM_API_HANDLE_TYPE_FD);
 
-   LIST_FOR_EACH_ENTRY(kms_sw_dt, &kms_sw->bo_list, link) {
-      if (kms_sw_dt->handle == whandle->handle) {
+   switch(whandle->type) {
+   case DRM_API_HANDLE_TYPE_FD:
+      kms_sw_dt = kms_sw_displaytarget_add_from_prime(kms_sw, whandle->handle);
+      if (kms_sw_dt) {
          kms_sw_dt->ref_count++;
+         kms_sw_dt->width = templ->width0;
+         kms_sw_dt->height = templ->height0;
+         kms_sw_dt->stride = whandle->stride;
+         *stride = kms_sw_dt->stride;
+      }
+      return (struct sw_displaytarget *)kms_sw_dt;
+   case DRM_API_HANDLE_TYPE_KMS:
+      LIST_FOR_EACH_ENTRY(kms_sw_dt, &kms_sw->bo_list, link) {
+         if (kms_sw_dt->handle == whandle->handle) {
+            kms_sw_dt->ref_count++;
 
-         DEBUG("KMS-DEBUG: imported buffer %u (size %u)\n", kms_sw_dt->handle, 
kms_sw_dt->size);
+            DEBUG("KMS-DEBUG: imported buffer %u (size %u)\n", 
kms_sw_dt->handle, kms_sw_dt->size);
 
-         *stride = kms_sw_dt->stride;
-         return (struct sw_displaytarget *)kms_sw_dt;
+            *stride = kms_sw_dt->stride;
+            return (struct sw_displaytarget *)kms_sw_dt;
+         }
       }
+      /* fallthrough */
+   default:
+      break;
    }
 
    assert(0);
@@ -253,16 +303,26 @@ kms_sw_displaytarget_get_handle(struct sw_winsys *winsys,
                                 struct sw_displaytarget *dt,
                                 struct winsys_handle *whandle)
 {
+   struct kms_sw_winsys *kms_sw = kms_sw_winsys(winsys);
    struct kms_sw_displaytarget *kms_sw_dt = kms_sw_displaytarget(dt);
 
-   if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
+   switch(whandle->type) {
+   case DRM_API_HANDLE_TYPE_KMS:
       whandle->handle = kms_sw_dt->handle;
       whandle->stride = kms_sw_dt->stride;
-   } else {
+      return TRUE;
+   case DRM_API_HANDLE_TYPE_FD:
+      if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle,
+                             DRM_CLOEXEC, &whandle->handle)) {
+         whandle->stride = kms_sw_dt->stride;
+         return TRUE;
+      }
+      /* fallthrough */
+   default:
       whandle->handle = 0;
       whandle->stride = 0;
+      return FALSE;
    }
-   return TRUE;
 }
 
 static void
@@ -315,4 +375,4 @@ kms_dri_create_winsys(int fd)
    return &ws->base;
 }
 
-/* vim: set sw=3 ts=8 sts=3 expandtab: */
\ No newline at end of file
+/* vim: set sw=3 ts=8 sts=3 expandtab: */

commit ead7f72a2c40da6fac369cbce4bcaa3e18361c3a
Author: Marek Olšák <marek.ol...@amd.com>
Date:   Wed Sep 3 13:58:57 2014 +0200

    r600g,radeonsi: make sure there's enough CS space before resuming queries
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83432
    
    Cc: "10.2 10.3" <mesa-sta...@lists.freedesktop.org>
    Reviewed-by: Michel Dänzer <michel.daen...@amd.com>
    (cherry picked from commit 3dbf55c1be5a8867616e475d943c776d8245d0cc)

diff --git a/src/gallium/drivers/radeon/r600_query.c 
b/src/gallium/drivers/radeon/r600_query.c
index 503737c..590db13 100644
--- a/src/gallium/drivers/radeon/r600_query.c
+++ b/src/gallium/drivers/radeon/r600_query.c
@@ -807,12 +807,40 @@ void r600_suspend_nontimer_queries(struct 
r600_common_context *ctx)
        assert(ctx->num_cs_dw_nontimer_queries_suspend == 0);
 }
 
+static unsigned r600_queries_num_cs_dw_for_resuming(struct r600_common_context 
*ctx)
+{
+       struct r600_query *query;
+       unsigned num_dw = 0;
+
+       LIST_FOR_EACH_ENTRY(query, &ctx->active_nontimer_queries, list) {
+               /* begin + end */
+               num_dw += query->num_cs_dw * 2;
+
+               /* Workaround for the fact that
+                * num_cs_dw_nontimer_queries_suspend is incremented for every
+                * resumed query, which raises the bar in need_cs_space for
+                * queries about to be resumed.
+                */
+               num_dw += query->num_cs_dw;
+       }
+       /* primitives generated query */
+       num_dw += ctx->streamout.enable_atom.num_dw;
+       /* guess for ZPASS enable or PERFECT_ZPASS_COUNT enable updates */
+       num_dw += 13;
+
+       return num_dw;
+}
+
 void r600_resume_nontimer_queries(struct r600_common_context *ctx)
 {
        struct r600_query *query;
 
        assert(ctx->num_cs_dw_nontimer_queries_suspend == 0);
 
+       /* Check CS space here. Resuming must not be interrupted by flushes. */
+       ctx->need_gfx_cs_space(&ctx->b,
+                              r600_queries_num_cs_dw_for_resuming(ctx), TRUE);
+
        LIST_FOR_EACH_ENTRY(query, &ctx->active_nontimer_queries, list) {
                r600_emit_query_begin(ctx, query);
        }

commit 139d176f543f2cbd66309b86fb54f27b6a9fe506
Author: Marek Olšák <marek.ol...@amd.com>
Date:   Mon Sep 1 20:01:03 2014 +0200

    mesa: invalidate draw state in glPopClientAttrib
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82538
    
    Cc: mesa-sta...@lists.freedesktop.org
    Reviewed-by: Brian Paul <bri...@vmware.com>
    (cherry picked from commit 374f3e9e19f064007ea8a864fbd00f1ae7deafd1)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index c656845..2e289b6 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1488,6 +1488,10 @@ copy_array_attrib(struct gl_context *ctx,
 
    /* skip ArrayBufferObj */
    /* skip IndexBufferObj */
+
+   /* Invalidate draw state. It will be updated during the next draw. */
+   dest->DrawMethod = DRAW_NONE;
+   dest->_DrawArrays = NULL;
 }
 
 /**

commit 941b2ae35fd891f03a790eb3a2371b2c11d319ad
Author: Thomas Hellstrom <thellst...@vmware.com>
Date:   Wed Sep 3 11:14:51 2014 +0200

    winsys/svga: Fix incorrect type usage in IOCTL v2
    
    While similar in layout, the size of the SVGA3dSize type may be smaller than
    the struct drm_vmw_size type that is part of the ioctl interface. The kernel
    driver could accordingly overwrite a memory area following the size variable
    on the stack. Typically that would be another local variable, causing
    breakage in, for example, ubuntu 12.04.5 where the handle local variable
    becomes overwritten.
    
    v2: Fix whitespace errors
    
    Signed-off-by: Thomas Hellstrom <thellst...@vmware.com>
    Reviewed-by: Jakob Bornecrantz <ja...@vmware.com>
    Cc: "10.1 10.2 10.3" <mesa-sta...@lists.freedesktop.org>
    (cherry picked from commit 2d6206140afe9ecb551822ea00c36eeeef7edfbf)

diff --git a/src/gallium/winsys/svga/drm/vmw_screen_dri.c 
b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
index 79a1b3e..9f33590 100644
--- a/src/gallium/winsys/svga/drm/vmw_screen_dri.c
+++ b/src/gallium/winsys/svga/drm/vmw_screen_dri.c
@@ -238,7 +238,7 @@ out_mip:
 
 static struct svga_winsys_surface *
 vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
-                           struct winsys_handle *whandle,
+                            struct winsys_handle *whandle,
                            SVGA3dSurfaceFormat *format)
 {
     struct vmw_svga_winsys_surface *vsrf;
@@ -248,7 +248,8 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
     struct drm_vmw_surface_arg *req = &arg.req;
     struct drm_vmw_surface_create_req *rep = &arg.rep;
     uint32_t handle = 0;
-    SVGA3dSize size;
+    struct drm_vmw_size size;
+    SVGA3dSize base_size;
     int ret;
     int i;
 
@@ -274,7 +275,7 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
 
     memset(&arg, 0, sizeof(arg));
     req->sid = handle;
-    rep->size_addr = (size_t)&size;
+    rep->size_addr = (unsigned long)&size;
 
     ret = drmCommandWriteRead(vws->ioctl.drm_fd, DRM_VMW_REF_SURFACE,
                              &arg, sizeof(arg));
@@ -324,7 +325,11 @@ vmw_drm_surface_from_handle(struct svga_winsys_screen *sws,
     *format = rep->format;
 
     /* Estimate usage, for early flushing. */
-    vsrf->size = svga3dsurface_get_serialized_size(rep->format, size,
+
+    base_size.width = size.width;
+    base_size.height = size.height;
+    base_size.depth = size.depth;
+    vsrf->size = svga3dsurface_get_serialized_size(rep->format, base_size,
                                                    rep->mip_levels[0],
                                                    FALSE);
 

commit 4b38838ef425566b5ea97af948995a2352202405
Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Fri Aug 22 12:19:49 2014 -0700

    i965: Handle ir_triop_csel in emit_bool_to_cond_code().
    
    ir_triop_csel can return a boolean expression, so we need to handle it


-- 
To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1xrfog-00053j...@moszumanska.debian.org

Reply via email to