<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.video.mesa3d.devel">
    <title>gmane.comp.video.mesa3d.devel</title>
    <link>http://blog.gmane.org/gmane.comp.video.mesa3d.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40810"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40808"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40804"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40792"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40790"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40789"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40782"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40780"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40767"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40758"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40745"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40737"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40733"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40732"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40731"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40730"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40719"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40718"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40717"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40715"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40810">
    <title>[PATCH] - main/ff_fragment_shader.cpp</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40810</link>
    <description>&lt;pre&gt;Hi I am working on chromium, and while I was compiling mesa trunk
using gcc 4.7, I had to add explicit type cast for narrower conversion
inside the initialization list.

Could you take a look at the patch and upstream it if it is ok to you? Thanks,
-Han

diff --git a/src/mesa/main/ff_fragment_shader.cpp
b/src/mesa/main/ff_fragment_shader.cpp
index 0233f38..5a6041a 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -887,10 +887,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; emit_texenv(struct texenv_fragment_program *p,
GLuint unit)
       }
       else {
  float const_data[4] = {
-    1 &amp;lt;&amp;lt; rgb_shift,
-    1 &amp;lt;&amp;lt; rgb_shift,
-    1 &amp;lt;&amp;lt; rgb_shift,
-    1 &amp;lt;&amp;lt; alpha_shift
+    static_cast&amp;lt;float&amp;gt;(1 &amp;lt;&amp;lt; rgb_shift),
+    static_cast&amp;lt;float&amp;gt;(1 &amp;lt;&amp;lt; rgb_shift),
+    static_cast&amp;lt;float&amp;gt;(1 &amp;lt;&amp;lt; rgb_shift),
+    static_cast&amp;lt;float&amp;gt;(1 &amp;lt;&amp;lt; alpha_shift)
  };
  shift = new(p-&amp;gt;mem_ctx) ir_constant(glsl_type::vec4_type,
      (ir_constant_data *)const_data);
_______________________________________________
mesa-dev mailing list
mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
&lt;/pre&gt;</description>
    <dc:creator>Han Shen(沈涵</dc:creator>
    <dc:date>2012-05-25T17:51:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40808">
    <title>[PATCH] draw: simplify index buffer specification</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40808</link>
    <description>&lt;pre&gt;Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with
draw_set_indexes() which simply takes a pointer and an index size.
---
 src/gallium/auxiliary/draw/draw_context.c       |   30 ++++++++++------------
 src/gallium/auxiliary/draw/draw_context.h       |    7 +----
 src/gallium/auxiliary/draw/draw_private.h       |    2 -
 src/gallium/auxiliary/draw/draw_pt.c            |   22 ++++------------
 src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h |    6 +---
 src/gallium/drivers/i915/i915_context.c         |    6 +++-
 src/gallium/drivers/i915/i915_state.c           |    3 --
 src/gallium/drivers/llvmpipe/lp_draw_arrays.c   |    8 ++++--
 src/gallium/drivers/llvmpipe/lp_state_vertex.c  |    2 -
 src/gallium/drivers/nv30/nv30_draw.c            |    7 +++--
 src/gallium/drivers/r300/r300_state.c           |   12 ++++----
 src/gallium/drivers/softpipe/sp_draw_arrays.c   |    7 ++++-
 src/gallium/drivers/softpipe/sp_state_vertex.c  |    2 -
 src/gallium/drivers/svga/svga_swtnl_draw.c      |    9 +++----
 src/mesa/state_tracker/st_draw_feedback.c       |    9 +++----
 15 files changed, 56 insertions(+), 76 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index ad49ce7..2eae204 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -627,25 +627,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void draw_set_render( struct draw_context *draw,
 }
 
 
-void
-draw_set_index_buffer(struct draw_context *draw,
-                      const struct pipe_index_buffer *ib)
-{
-   if (ib)
-      memcpy(&amp;amp;draw-&amp;gt;pt.index_buffer, ib, sizeof(draw-&amp;gt;pt.index_buffer));
-   else
-      memset(&amp;amp;draw-&amp;gt;pt.index_buffer, 0, sizeof(draw-&amp;gt;pt.index_buffer));
-}
-
-
 /**
- * Tell drawing context where to find mapped index/element buffer.
+ * Tell the draw module where vertex indexes/elements are located, and
+ * their size (in bytes).
+ *
+ * Note: the caller must apply the pipe_index_buffer::offset value to
+ * the address.  The draw module doesn't do that.
  */
 void
-draw_set_mapped_index_buffer(struct draw_context *draw,
-                             const void *elements)
-{
-    draw-&amp;gt;pt.user.elts = elements;
+draw_set_indexes(struct draw_context *draw,
+                 const void *elements, unsigned elem_size)
+{
+   assert(elem_size == 0 ||
+          elem_size == 1 ||
+          elem_size == 2 ||
+          elem_size == 4);
+   draw-&amp;gt;pt.user.elts = elements;
+   draw-&amp;gt;pt.user.eltSize = elem_size;
 }
 
 
diff --git a/src/gallium/auxiliary/draw/draw_context.h b/src/gallium/auxiliary/draw/draw_context.h
index f3a3f23..4cd0caf 100644
--- a/src/gallium/auxiliary/draw/draw_context.h
+++ b/src/gallium/auxiliary/draw/draw_context.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -208,11 +208,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void draw_set_vertex_elements(struct draw_context *draw,
       unsigned count,
                               const struct pipe_vertex_element *elements);
 
-void draw_set_index_buffer(struct draw_context *draw,
-                           const struct pipe_index_buffer *ib);
-
-void draw_set_mapped_index_buffer(struct draw_context *draw,
-                                  const void *elements);
+void draw_set_indexes(struct draw_context *draw,
+                      const void *elements, unsigned elem_size);
 
 void draw_set_mapped_vertex_buffer(struct draw_context *draw,
                                    unsigned attr, const void *buffer);
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index 9e63803..d85deee 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -169,8 +169,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct draw_context
       struct pipe_vertex_element vertex_element[PIPE_MAX_ATTRIBS];
       unsigned nr_vertex_elements;
 
-      struct pipe_index_buffer index_buffer;
-
       /* user-space vertex data, buffers */
       struct {
          /** vertex element/index buffer (ex: glDrawElements) */
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index 2c4edc0..5b6eaa7 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -232,28 +232,24 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count)
       uint j;
 
       if (draw-&amp;gt;pt.user.eltSize) {
-         const char *elts;
-
          /* indexed arrays */
-         elts = (const char *) draw-&amp;gt;pt.user.elts;
-         elts += draw-&amp;gt;pt.index_buffer.offset;
 
          switch (draw-&amp;gt;pt.user.eltSize) {
          case 1:
             {
-               const ubyte *elem = (const ubyte *) elts;
+               const ubyte *elem = (const ubyte *) draw-&amp;gt;pt.user.elts;
                ii = elem[start + i];
             }
             break;
          case 2:
             {
-               const ushort *elem = (const ushort *) elts;
+               const ushort *elem = (const ushort *) draw-&amp;gt;pt.user.elts;
                ii = elem[start + i];
             }
             break;
          case 4:
             {
-               const uint *elem = (const uint *) elts;
+               const uint *elem = (const uint *) draw-&amp;gt;pt.user.elts;
                ii = elem[start + i];
             }
             break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -368,28 +364,25 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; draw_pt_arrays_restart(struct draw_context *draw,
 
    if (draw-&amp;gt;pt.user.elts) {
       /* indexed prims (draw_elements) */
-      const char *elts =
-         (const char *) draw-&amp;gt;pt.user.elts + draw-&amp;gt;pt.index_buffer.offset;
-
       cur_start = start;
       cur_count = 0;
 
       switch (draw-&amp;gt;pt.user.eltSize) {
       case 1:
          {
-            const ubyte *elt_ub = (const ubyte *) elts;
+            const ubyte *elt_ub = (const ubyte *) draw-&amp;gt;pt.user.elts;
             PRIM_RESTART_LOOP(elt_ub);
          }
          break;
       case 2:
          {
-            const ushort *elt_us = (const ushort *) elts;
+            const ushort *elt_us = (const ushort *) draw-&amp;gt;pt.user.elts;
             PRIM_RESTART_LOOP(elt_us);
          }
          break;
       case 4:
          {
-            const uint *elt_ui = (const uint *) elts;
+            const uint *elt_ui = (const uint *) draw-&amp;gt;pt.user.elts;
             PRIM_RESTART_LOOP(elt_ui);
          }
          break;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -469,9 +462,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; draw_vbo(struct draw_context *draw,
    if (info-&amp;gt;indexed)
       assert(draw-&amp;gt;pt.user.elts);
 
-   draw-&amp;gt;pt.user.eltSize =
-      (info-&amp;gt;indexed) ? draw-&amp;gt;pt.index_buffer.index_size : 0;
-
    draw-&amp;gt;pt.user.eltBias = info-&amp;gt;index_bias;
    draw-&amp;gt;pt.user.min_index = info-&amp;gt;min_index;
    draw-&amp;gt;pt.user.max_index = info-&amp;gt;max_index;
diff --git a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
index bb3cbf8..98a4668 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
+++ b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,8 +38,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; CONCAT(vsplit_primitive_, ELT_TYPE)(struct vsplit_frontend *vsplit,
                                     unsigned istart, unsigned icount)
 {
    struct draw_context *draw = vsplit-&amp;gt;draw;
-   const ELT_TYPE *ib = (const ELT_TYPE *)
-      ((const char *) draw-&amp;gt;pt.user.elts + draw-&amp;gt;pt.index_buffer.offset);
+   const ELT_TYPE *ib = (const ELT_TYPE *) draw-&amp;gt;pt.user.elts;
    const unsigned min_index = draw-&amp;gt;pt.user.min_index;
    const unsigned max_index = draw-&amp;gt;pt.user.max_index;
    const int elt_bias = draw-&amp;gt;pt.user.eltBias;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -128,8 +127,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; CONCAT(vsplit_segment_cache_, ELT_TYPE)(struct vsplit_frontend *vsplit,
                                         boolean close, unsigned iclose)
 {
    struct draw_context *draw = vsplit-&amp;gt;draw;
-   const ELT_TYPE *ib = (const ELT_TYPE *)
-      ((const char *) draw-&amp;gt;pt.user.elts + draw-&amp;gt;pt.index_buffer.offset);
+   const ELT_TYPE *ib = (const ELT_TYPE *) draw-&amp;gt;pt.user.elts;
    const int ibias = draw-&amp;gt;pt.user.eltBias;
    unsigned i;
 
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index f3c7b30..988d659 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -71,8 +71,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
       mapped_indices = i915-&amp;gt;index_buffer.user_buffer;
       if (!mapped_indices)
          mapped_indices = i915_buffer(i915-&amp;gt;index_buffer.buffer)-&amp;gt;data;
+      draw_set_indexes(draw,
+                       (ubyte *) mapped_indices + i915-&amp;gt;index_buffer.offset,
+                       i915-&amp;gt;index_buffer.index_size);
    }
-   draw_set_mapped_index_buffer(draw, mapped_indices);
 
    if (i915-&amp;gt;constants[PIPE_SHADER_VERTEX])
       draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,7 +93,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    draw_vbo(i915-&amp;gt;draw, info);
 
    if (mapped_indices)
-      draw_set_mapped_index_buffer(draw, NULL);
+      draw_set_indexes(draw, NULL, 0);
 
    if (i915-&amp;gt;num_vertex_sampler_views &amp;gt; 0)
       i915_cleanup_vertex_sampling(i915);
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 1ff5388..f4b5d6f 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1048,9 +1048,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void i915_set_index_buffer(struct pipe_context *pipe,
       memcpy(&amp;amp;i915-&amp;gt;index_buffer, ib, sizeof(i915-&amp;gt;index_buffer));
    else
       memset(&amp;amp;i915-&amp;gt;index_buffer, 0, sizeof(i915-&amp;gt;index_buffer));
-
-   /* pass-through to draw module */
-   draw_set_index_buffer(i915-&amp;gt;draw, ib);
 }
 
 static void
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 225b80e..96259d7 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -78,9 +78,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
       mapped_indices = lp-&amp;gt;index_buffer.user_buffer;
       if (!mapped_indices)
          mapped_indices = llvmpipe_resource_data(lp-&amp;gt;index_buffer.buffer);
-   }
 
-   draw_set_mapped_index_buffer(draw, mapped_indices);
+      draw_set_indexes(draw,
+                       (ubyte *) mapped_indices + lp-&amp;gt;index_buffer.offset,
+                       lp-&amp;gt;index_buffer.index_size);
+   }
 
    llvmpipe_prepare_vertex_sampling(lp,
                                     lp-&amp;gt;num_vertex_sampler_views,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -96,7 +98,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
       draw_set_mapped_vertex_buffer(draw, i, NULL);
    }
    if (mapped_indices) {
-      draw_set_mapped_index_buffer(draw, NULL);
+      draw_set_indexes(draw, NULL, 0);
    }
    llvmpipe_cleanup_vertex_sampling(lp);
 
diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
index a62cfd5..4a74cd7 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -102,8 +102,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; llvmpipe_set_index_buffer(struct pipe_context *pipe,
       memcpy(&amp;amp;llvmpipe-&amp;gt;index_buffer, ib, sizeof(llvmpipe-&amp;gt;index_buffer));
    else
       memset(&amp;amp;llvmpipe-&amp;gt;index_buffer, 0, sizeof(llvmpipe-&amp;gt;index_buffer));
-
-   draw_set_index_buffer(llvmpipe-&amp;gt;draw, ib);
 }
 
 void
diff --git a/src/gallium/drivers/nv30/nv30_draw.c b/src/gallium/drivers/nv30/nv30_draw.c
index 29e6395..46e8536 100644
--- a/src/gallium/drivers/nv30/nv30_draw.c
+++ b/src/gallium/drivers/nv30/nv30_draw.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -417,10 +417,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
          pipe_buffer_map(pipe, nv30-&amp;gt;idxbuf.buffer,
                                   PIPE_TRANSFER_UNSYNCHRONIZED |
                                   PIPE_TRANSFER_READ, &amp;amp;transferi);
-      draw_set_index_buffer(draw, &amp;amp;nv30-&amp;gt;idxbuf);
-      draw_set_mapped_index_buffer(draw, map);
+      draw_set_indexes(draw,
+                       (ubyte *) map + nv30-&amp;gt;idxbuf.offset,
+                       nv30-&amp;gt;idxbuf.index_size);
    } else {
-      draw_set_mapped_index_buffer(draw, NULL);
+      draw_set_indexes(draw, NULL, 0);
    }
 
    draw_vbo(draw, info);
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c
index e025c2f..6f9feb1 100644
--- a/src/gallium/drivers/r300/r300_state.c
+++ b/src/gallium/drivers/r300/r300_state.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1649,16 +1649,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void r300_set_index_buffer_swtcl(struct pipe_context* pipe,
 {
     struct r300_context* r300 = r300_context(pipe);
 
-    draw_set_index_buffer(r300-&amp;gt;draw, ib);
-
     if (ib) {
+        const void *buf = NULL;
         if (ib-&amp;gt;user_buffer) {
-            draw_set_mapped_index_buffer(r300-&amp;gt;draw,
-                                         ib-&amp;gt;user_buffer);
+            buf = ib-&amp;gt;user_buffer;
         } else if (ib-&amp;gt;buffer) {
-            draw_set_mapped_index_buffer(r300-&amp;gt;draw,
-                r300_resource(ib-&amp;gt;buffer)-&amp;gt;malloced_buffer);
+            buf = r300_resource(ib-&amp;gt;buffer)-&amp;gt;malloced_buffer;
         }
+        draw_set_indexes(r300-&amp;gt;draw,
+                         (const ubyte *) buf + ib-&amp;gt;offset,
+                         ib-&amp;gt;index_size);
     }
 }
 
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c
index 7a22745..f9fc923 100644
--- a/src/gallium/drivers/softpipe/sp_draw_arrays.c
+++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -88,9 +88,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; softpipe_draw_vbo(struct pipe_context *pipe,
       mapped_indices = sp-&amp;gt;index_buffer.user_buffer;
       if (!mapped_indices)
          mapped_indices = softpipe_resource(sp-&amp;gt;index_buffer.buffer)-&amp;gt;data;
+
+      draw_set_indexes(draw,
+                       (ubyte *) mapped_indices + sp-&amp;gt;index_buffer.offset,
+                       sp-&amp;gt;index_buffer.index_size);
    }
 
-   draw_set_mapped_index_buffer(draw, mapped_indices);
 
    for (i = 0; i &amp;lt; sp-&amp;gt;num_so_targets; i++) {
       void *buf = softpipe_resource(sp-&amp;gt;so_targets[i]-&amp;gt;target.buffer)-&amp;gt;data;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -108,7 +111,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; softpipe_draw_vbo(struct pipe_context *pipe,
       draw_set_mapped_vertex_buffer(draw, i, NULL);
    }
    if (mapped_indices) {
-      draw_set_mapped_index_buffer(draw, NULL);
+      draw_set_indexes(draw, NULL, 0);
    }
 
    draw_set_mapped_so_targets(draw, 0, NULL);
diff --git a/src/gallium/drivers/softpipe/sp_state_vertex.c b/src/gallium/drivers/softpipe/sp_state_vertex.c
index 1dbd798..95acecd 100644
--- a/src/gallium/drivers/softpipe/sp_state_vertex.c
+++ b/src/gallium/drivers/softpipe/sp_state_vertex.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -106,8 +106,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; softpipe_set_index_buffer(struct pipe_context *pipe,
       memcpy(&amp;amp;softpipe-&amp;gt;index_buffer, ib, sizeof(softpipe-&amp;gt;index_buffer));
    else
       memset(&amp;amp;softpipe-&amp;gt;index_buffer, 0, sizeof(softpipe-&amp;gt;index_buffer));
-
-   draw_set_index_buffer(softpipe-&amp;gt;draw, ib);
 }
 
 
diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c
index bb6870f..212f11a 100644
--- a/src/gallium/drivers/svga/svga_swtnl_draw.c
+++ b/src/gallium/drivers/svga/svga_swtnl_draw.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -76,17 +76,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; svga_swtnl_draw_vbo(struct svga_context *svga,
       }
    }
 
-   /* TODO move this to update_swtnl_draw */
-   draw_set_index_buffer(draw, &amp;amp;svga-&amp;gt;curr.ib);
-
    /* Map index buffer, if present */
    map = NULL;
    if (info-&amp;gt;indexed &amp;amp;&amp;amp; svga-&amp;gt;curr.ib.buffer) {
       map = pipe_buffer_map(&amp;amp;svga-&amp;gt;pipe, svga-&amp;gt;curr.ib.buffer,
                             PIPE_TRANSFER_READ,
                             &amp;amp;ib_transfer);
+      draw_set_indexes(draw,
+                       (const ubyte *) map + svga-&amp;gt;curr.ib.offset,
+                       svga-&amp;gt;curr.ib.index_size);
    }
-   draw_set_mapped_index_buffer(draw, map);
 
    if (svga-&amp;gt;curr.cb[PIPE_SHADER_VERTEX]) {
       map = pipe_buffer_map(&amp;amp;svga-&amp;gt;pipe,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -119,7 +118,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; svga_swtnl_draw_vbo(struct svga_context *svga,
 
    if (ib_transfer) {
       pipe_buffer_unmap(&amp;amp;svga-&amp;gt;pipe, ib_transfer);
-      draw_set_mapped_index_buffer(draw, NULL);
+      draw_set_indexes(draw, NULL, 0);
    }
 
    if (svga-&amp;gt;curr.cb[PIPE_SHADER_VERTEX]) {
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 4209fb2..820918e 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -232,8 +232,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_feedback_draw_vbo(struct gl_context *ctx,
          mapped_indices = ib-&amp;gt;ptr;
       }
 
-      draw_set_index_buffer(draw, &amp;amp;ibuffer);
-      draw_set_mapped_index_buffer(draw, mapped_indices);
+      draw_set_indexes(draw,
+                       (ubyte *) mapped_indices + ibuffer.offset,
+                       ibuffer.index_size);
    }
 
    /* set the constant buffer */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -252,9 +253,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_feedback_draw_vbo(struct gl_context *ctx,
     * unmap vertex/index buffers
     */
    if (ib) {
-      draw_set_mapped_index_buffer(draw, NULL);
-      draw_set_index_buffer(draw, NULL);
-
+      draw_set_indexes(draw, NULL, 0);
       if (ib_transfer)
          pipe_buffer_unmap(pipe, ib_transfer);
       pipe_resource_reference(&amp;amp;ibuffer.buffer, NULL);
&lt;/pre&gt;</description>
    <dc:creator>Brian Paul</dc:creator>
    <dc:date>2012-05-25T16:35:44</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40804">
    <title>[PATCH] r600g: handle R16G16B16_FLOAT andR32G32B32_FLOAT in translate_colorswap</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40804</link>
    <description>&lt;pre&gt;Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50318

Signed-off-by: Kai Wasserbäch &amp;lt;kai&amp;lt; at &amp;gt;dev.carbon-project.org&amp;gt;
---
 Verified with a full Piglit run on my HW (see the bug).
 Thanks to Marek for pointing out b2d63860 to me!

 In case you accept this patch: please commit it for me, I don't have access.

 src/gallium/drivers/r600/r600_state.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index ed08fd6..124eba2 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -281,6 +281,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static uint32_t r600_translate_colorswap(enum pipe_format format)
 case PIPE_FORMAT_R16G16_FLOAT:
 case PIPE_FORMAT_R16G16_UINT:
 case PIPE_FORMAT_R16G16_SINT:
+case PIPE_FORMAT_R16G16B16_FLOAT:
+case PIPE_FORMAT_R32G32B32_FLOAT:
 case PIPE_FORMAT_R32_UINT:
 case PIPE_FORMAT_R32_SINT:
 case PIPE_FORMAT_R32_FLOAT:
&lt;/pre&gt;</description>
    <dc:creator>Kai Wasserbäch</dc:creator>
    <dc:date>2012-05-25T14:27:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40792">
    <title>help</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40792</link>
    <description>&lt;pre&gt;

-----Original Message-----

From: mesa-dev-request&amp;lt; at &amp;gt;lists.freedesktop.org
Sent: 25 May 2012 09:32:33 GMT
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Subject: mesa-dev Digest, Vol 26, Issue 165

Send mesa-dev mailing list submissions to
        mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.freedesktop.org/mailman/listinfo/mesa-dev
or, via email, send a message with subject or body 'help' to
        mesa-dev-request&amp;lt; at &amp;gt;lists.freedesktop.org

You can reach the person managing the list at
        mesa-dev-owner&amp;lt; at &amp;gt;lists.freedesktop.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of mesa-dev digest..."


Today's Topics:

   1. [PATCH 1/7] r600g: add RECIP_INT, PRED_SETE_INT to
      r600_bytecode_get_num_operands (Vadim Girlin)
   2. [PATCH 2/7] radeon/llvm/loader: convert hardcoded gpu     name to
      option (Vadim Girlin)
   3. [PATCH 3/7] radeon/llvm: fix opcode for RECIP_UINT_r600
      (Vadim Girlin)
   4. [PATCH 4/7] radeon/llvm: fix sampler index in     llvm_emit_tex
      (Vadim Girlin)
   5. [PATCH 5/7] radeon/llvm: prepare to revert the round      mode
      state to default (Vadim Girlin)
   6. [PATCH 6/7] radeon/llvm: add FLT_TO_UINT, UINT_TO_FLT
      instructions (Vadim Girlin)
   7. [PATCH 7/7] Revert "r600g: set round_mode to truncate     and get
      rid of tgsi_f2i on evergreen" (Vadim Girlin)


----------------------------------------------------------------------

Message: 1
Date: Fri, 25 May 2012 13:26:01 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 1/7] r600g: add RECIP_INT,   PRED_SETE_INT to
        r600_bytecode_get_num_operands
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-1-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Content-Type: text/plain; charset=UTF-8

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

Tested-by: Kai Wasserb?ch &amp;lt;kai&amp;lt; at &amp;gt;dev.carbon-project.org&amp;gt;
Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/r600/r600_asm.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index b73bbb3..b0cda3a 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -80,6 +80,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int r600_bytecode_get_num_operands(struct r600_bytecode *
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT:
+               case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -103,6 +104,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int r600_bytecode_get_num_operands(struct r600_bytecode *
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE:
+               case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
                case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
--
1.7.10.2



------------------------------

Message: 2
Date: Fri, 25 May 2012 13:26:02 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 2/7] radeon/llvm/loader: convert hardcoded
        gpu     name to option
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-2-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;

Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/radeon/loader.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/loader.cpp b/src/gallium/drivers/radeon/loader.cpp
index 79348d5..3ea8cd8 100644
--- a/src/gallium/drivers/radeon/loader.cpp
+++ b/src/gallium/drivers/radeon/loader.cpp
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -15,7 +15,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; using namespace llvm;
 static cl::opt&amp;lt;std::string&amp;gt;
 InputFilename(cl::Positional, cl::desc("&amp;lt;input bitcode&amp;gt;"), cl::init("-"));

-
+static cl::opt&amp;lt;std::string&amp;gt;
+TargetGPUName("gpu", cl::desc("target gpu name"), cl::value_desc("gpu_name"));

 int main(int argc, char ** argv)
 {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,5 +31,5 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int main(int argc, char ** argv)

        Module * mod = M.get();

-       radeon_llvm_compile(wrap(mod), &amp;amp;bytes, &amp;amp;byte_count, "redwood", 1);
+       radeon_llvm_compile(wrap(mod), &amp;amp;bytes, &amp;amp;byte_count, TargetGPUName.c_str(), 1);
 }
--
1.7.10.2



------------------------------

Message: 3
Date: Fri, 25 May 2012 13:26:03 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 3/7] radeon/llvm: fix opcode for
        RECIP_UINT_r600
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-3-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Content-Type: text/plain; charset=UTF-8

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

Tested-by: Kai Wasserb?ch &amp;lt;kai&amp;lt; at &amp;gt;dev.carbon-project.org&amp;gt;
Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/radeon/R600Instructions.td |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index b56d03c..88a03ab 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -749,7 +749,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; let Predicates = [isR600] in {
   def MULHI_INT_r600 : MULHI_INT_Common&amp;lt;0x74&amp;gt;;
   def MULLO_UINT_r600 : MULLO_UINT_Common&amp;lt;0x75&amp;gt;;
   def MULHI_UINT_r600 : MULHI_UINT_Common&amp;lt;0x76&amp;gt;;
-  def RECIP_UINT_r600 : RECIP_UINT_Common &amp;lt;0x77&amp;gt;;
+  def RECIP_UINT_r600 : RECIP_UINT_Common &amp;lt;0x78&amp;gt;;

   def DIV_r600 : DIV_Common&amp;lt;RECIP_IEEE_r600&amp;gt;;
   def POW_r600 : POW_Common&amp;lt;LOG_IEEE_r600, EXP_IEEE_r600, MUL, GPRF32&amp;gt;;
--
1.7.10.2



------------------------------

Message: 4
Date: Fri, 25 May 2012 13:26:04 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 4/7] radeon/llvm: fix sampler index in
        llvm_emit_tex
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-4-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;

Sampler index isn't a second source operand for some tgsi texture
instructions.

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

Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/r600/r600_llvm.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_llvm.c b/src/gallium/drivers/r600/r600_llvm.c
index 2ca838f..5e073e0 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -144,15 +144,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void llvm_emit_tex(
 {
        struct gallivm_state * gallivm = bld_base-&amp;gt;base.gallivm;
        LLVMValueRef args[6];
-       unsigned c;
+       unsigned c, sampler_src;

        assert(emit_data-&amp;gt;arg_count + 2 &amp;lt;= Elements(args));

        for (c = 0; c &amp;lt; emit_data-&amp;gt;arg_count; ++c)
                args[c] = emit_data-&amp;gt;args[c];

+       sampler_src = emit_data-&amp;gt;inst-&amp;gt;Instruction.NumSrcRegs-1;
+
        args[c++] = lp_build_const_int32(gallivm,
-                                       emit_data-&amp;gt;inst-&amp;gt;Src[1].Register.Index);
+                                       emit_data-&amp;gt;inst-&amp;gt;Src[sampler_src].Register.Index);
        args[c++] = lp_build_const_int32(gallivm,
                                        emit_data-&amp;gt;inst-&amp;gt;Texture.Texture);

--
1.7.10.2



------------------------------

Message: 5
Date: Fri, 25 May 2012 13:26:05 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 5/7] radeon/llvm: prepare to revert the
        round   mode state to default
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-5-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;

Use TRUNC before FLT_TO_INT on evergreen/cayman.

Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/radeon/R600Instructions.td |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index 88a03ab..04f49cd 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -901,7 +901,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class TRIG_eg &amp;lt;InstR600 trig, Intrinsic intr&amp;gt; : Pat&amp;lt;
   def CNDGT_eg : CNDGT_Common&amp;lt;0x1A&amp;gt;;
   def CNDGE_eg : CNDGE_Common&amp;lt;0x1B&amp;gt;;
   def MUL_LIT_eg : MUL_LIT_Common&amp;lt;0x1F&amp;gt;;
-  def FLT_TO_INT_eg : FLT_TO_INT_Common&amp;lt;0x50&amp;gt;;
   def EXP_IEEE_eg : EXP_IEEE_Common&amp;lt;0x81&amp;gt;;
   def LOG_CLAMPED_eg : LOG_CLAMPED_Common&amp;lt;0x82&amp;gt;;
   def LOG_IEEE_eg : LOG_IEEE_Common&amp;lt;0x83&amp;gt;;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -916,7 +915,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class TRIG_eg &amp;lt;InstR600 trig, Intrinsic intr&amp;gt; : Pat&amp;lt;
   def MULLO_UINT_eg : MULLO_UINT_Common&amp;lt;0x91&amp;gt;;
   def MULHI_UINT_eg : MULHI_UINT_Common&amp;lt;0x92&amp;gt;;
   def RECIP_UINT_eg : RECIP_UINT_Common&amp;lt;0x94&amp;gt;;
-  def INT_TO_FLT_eg : INT_TO_FLT_Common&amp;lt;0x9B&amp;gt;;
   def DOT4_eg : DOT4_Common&amp;lt;0xBE&amp;gt;;
   def CUBE_eg : CUBE_Common&amp;lt;0xC0&amp;gt;;

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -928,6 +926,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class TRIG_eg &amp;lt;InstR600 trig, Intrinsic intr&amp;gt; : Pat&amp;lt;
   def : TRIG_eg &amp;lt;SIN_eg, int_AMDGPU_sin&amp;gt;;
   def : TRIG_eg &amp;lt;COS_eg, int_AMDGPU_cos&amp;gt;;

+  def FLT_TO_INT_eg : FLT_TO_INT_Common&amp;lt;0x50&amp;gt; {
+    let Pattern = [];
+  }
+
+  def INT_TO_FLT_eg : INT_TO_FLT_Common&amp;lt;0x9B&amp;gt;;
+
+  def : Pat&amp;lt;(fp_to_sint R600_Reg32:$src),
+    (FLT_TO_INT_eg (TRUNC R600_Reg32:$src))&amp;gt;;
+
 }

 let Predicates = [isCayman] in {
--
1.7.10.2



------------------------------

Message: 6
Date: Fri, 25 May 2012 13:26:06 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 6/7] radeon/llvm: add FLT_TO_UINT,
        UINT_TO_FLT instructions
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-6-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;

Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/radeon/R600Instructions.td |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/gallium/drivers/radeon/R600Instructions.td b/src/gallium/drivers/radeon/R600Instructions.td
index 04f49cd..b6b9fe0 100644
--- a/src/gallium/drivers/radeon/R600Instructions.td
+++ b/src/gallium/drivers/radeon/R600Instructions.td
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -618,6 +618,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class INT_TO_FLT_Common &amp;lt;bits&amp;lt;32&amp;gt; inst&amp;gt; : R600_1OP &amp;lt;
   [(set R600_Reg32:$dst, (sint_to_fp R600_Reg32:$src))]
 &amp;gt;;

+class FLT_TO_UINT_Common &amp;lt;bits&amp;lt;32&amp;gt; inst&amp;gt; : R600_1OP &amp;lt;
+  inst, "FLT_TO_UINT",
+  [(set R600_Reg32:$dst, (fp_to_uint R600_Reg32:$src))]
+&amp;gt;;
+
+class UINT_TO_FLT_Common &amp;lt;bits&amp;lt;32&amp;gt; inst&amp;gt; : R600_1OP &amp;lt;
+  inst, "UINT_TO_FLT",
+  [(set R600_Reg32:$dst, (uint_to_fp R600_Reg32:$src))]
+&amp;gt;;
+
 class LOG_CLAMPED_Common &amp;lt;bits&amp;lt;32&amp;gt; inst&amp;gt; : R600_1OP &amp;lt;
   inst, "LOG_CLAMPED",
   []
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -740,6 +750,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; let Predicates = [isR600] in {
   def RECIPSQRT_IEEE_r600 : RECIPSQRT_IEEE_Common&amp;lt;0x69&amp;gt;;
   def FLT_TO_INT_r600 : FLT_TO_INT_Common&amp;lt;0x6b&amp;gt;;
   def INT_TO_FLT_r600 : INT_TO_FLT_Common&amp;lt;0x6c&amp;gt;;
+  def FLT_TO_UINT_r600 : FLT_TO_UINT_Common&amp;lt;0x79&amp;gt;;
+  def UINT_TO_FLT_r600 : UINT_TO_FLT_Common&amp;lt;0x6d&amp;gt;;
   def SIN_r600 : SIN_Common&amp;lt;0x6E&amp;gt;;
   def COS_r600 : COS_Common&amp;lt;0x6F&amp;gt;;
   def ASHR_r600 : ASHR_Common&amp;lt;0x70&amp;gt;;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -932,9 +944,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; class TRIG_eg &amp;lt;InstR600 trig, Intrinsic intr&amp;gt; : Pat&amp;lt;

   def INT_TO_FLT_eg : INT_TO_FLT_Common&amp;lt;0x9B&amp;gt;;

+  def FLT_TO_UINT_eg : FLT_TO_UINT_Common&amp;lt;0x9A&amp;gt; {
+    let Pattern = [];
+  }
+
+  def UINT_TO_FLT_eg : UINT_TO_FLT_Common&amp;lt;0x9C&amp;gt;;
+
   def : Pat&amp;lt;(fp_to_sint R600_Reg32:$src),
     (FLT_TO_INT_eg (TRUNC R600_Reg32:$src))&amp;gt;;

+  def : Pat&amp;lt;(fp_to_uint R600_Reg32:$src),
+    (FLT_TO_UINT_eg (TRUNC R600_Reg32:$src))&amp;gt;;
 }

 let Predicates = [isCayman] in {
--
1.7.10.2



------------------------------

Message: 7
Date: Fri, 25 May 2012 13:26:07 +0400
From: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
Subject: [Mesa-dev] [PATCH 7/7] Revert "r600g: set round_mode to
        truncate        and get rid of tgsi_f2i on evergreen"
To: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
Message-ID: &amp;lt;1337937967-24175-7-git-send-email-vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;

This reverts commit 60bf0f05b472e66bf1175fcec7a274dab6f7e2a3.

It seems round_mode behaves differently in some cases depending on  the
instruction/slot. Reverting it for now.

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

Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/r600/evergreen_state.c |    8 ++---
 src/gallium/drivers/r600/r600_shader.c     |   54 ++++++++++++++++++++++++++--
 2 files changed, 56 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index c28eeab..ec0afe5 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2027,8 +2027,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void cayman_init_atom_start_cs(struct r600_context *rctx)
        r600_store_value(cb, 0); /* R_028030_PA_SC_SCREEN_SCISSOR_TL */
        r600_store_value(cb, S_028034_BR_X(16384) | S_028034_BR_Y(16384)); /* R_028034_PA_SC_SCREEN_SCISSOR_BR */

-       r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_TO_ZERO));
-       r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_TO_ZERO));
+       r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
+       r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
        r600_store_context_reg(cb, R_0288A8_SQ_PGM_RESOURCES_FS, 0);

        r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2512,8 +2512,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void evergreen_init_atom_start_cs(struct r600_context *rctx)
        r600_store_value(cb, 0); /* R_028030_PA_SC_SCREEN_SCISSOR_TL */
        r600_store_value(cb, S_028034_BR_X(16384) | S_028034_BR_Y(16384)); /* R_028034_PA_SC_SCREEN_SCISSOR_BR */

-       r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_TO_ZERO));
-       r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_TO_ZERO));
+       r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
+       r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
        r600_store_context_reg(cb, R_0288A8_SQ_PGM_RESOURCES_FS, 0);

        r600_store_context_reg(cb, R_028354_SX_SURFACE_SYNC, S_028354_SURFACE_SYNC_MASK(0xf));
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c
index cd78104..dc208b9 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -3306,6 +3306,56 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int tgsi_imod(struct r600_shader_ctx *ctx)
        return tgsi_divmod(ctx, 1, 1);
 }

+
+static int tgsi_f2i(struct r600_shader_ctx *ctx)
+{
+       struct tgsi_full_instruction *inst = &amp;amp;ctx-&amp;gt;parse.FullToken.FullInstruction;
+       struct r600_bytecode_alu alu;
+       int i, r;
+       unsigned write_mask = inst-&amp;gt;Dst[0].Register.WriteMask;
+       int last_inst = tgsi_last_instruction(write_mask);
+
+       for (i = 0; i &amp;lt; 4; i++) {
+               if (!(write_mask &amp;amp; (1&amp;lt;&amp;lt;i)))
+                       continue;
+
+               memset(&amp;amp;alu, 0, sizeof(struct r600_bytecode_alu));
+               alu.inst = CTX_INST(V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_TRUNC);
+
+               alu.dst.sel = ctx-&amp;gt;temp_reg;
+               alu.dst.chan = i;
+               alu.dst.write = 1;
+
+               r600_bytecode_src(&amp;amp;alu.src[0], &amp;amp;ctx-&amp;gt;src[0], i);
+               if (i == last_inst)
+                       alu.last = 1;
+               r = r600_bytecode_add_alu(ctx-&amp;gt;bc, &amp;amp;alu);
+               if (r)
+                       return r;
+       }
+
+       for (i = 0; i &amp;lt; 4; i++) {
+               if (!(write_mask &amp;amp; (1&amp;lt;&amp;lt;i)))
+                       continue;
+
+               memset(&amp;amp;alu, 0, sizeof(struct r600_bytecode_alu));
+               alu.inst = ctx-&amp;gt;inst_info-&amp;gt;r600_opcode;
+
+               tgsi_dst(ctx, &amp;amp;inst-&amp;gt;Dst[0], i, &amp;amp;alu.dst);
+
+               alu.src[0].sel = ctx-&amp;gt;temp_reg;
+               alu.src[0].chan = i;
+
+               if (i == last_inst)
+                       alu.last = 1;
+               r = r600_bytecode_add_alu(ctx-&amp;gt;bc, &amp;amp;alu);
+               if (r)
+                       return r;
+       }
+
+       return 0;
+}
+
 static int tgsi_iabs(struct r600_shader_ctx *ctx)
 {
        struct tgsi_full_instruction *inst = &amp;amp;ctx-&amp;gt;parse.FullToken.FullInstruction;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5368,7 +5418,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
        {TGSI_OPCODE_END,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_end},  /* aka HALT */
        /* gap */
        {118,                   0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_unsupported},
-       {TGSI_OPCODE_F2I,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT, tgsi_op2},
+       {TGSI_OPCODE_F2I,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_INT, tgsi_f2i},
        {TGSI_OPCODE_IDIV,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_idiv},
        {TGSI_OPCODE_IMAX,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MAX_INT, tgsi_op2},
        {TGSI_OPCODE_IMIN,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_MIN_INT, tgsi_op2},
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -5376,7 +5426,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static struct r600_shader_tgsi_instruction eg_shader_tgsi_instruction[] = {
        {TGSI_OPCODE_ISGE,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGE_INT, tgsi_op2},
        {TGSI_OPCODE_ISHR,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ASHR_INT, tgsi_op2},
        {TGSI_OPCODE_ISLT,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_SETGT_INT, tgsi_op2_swap},
-       {TGSI_OPCODE_F2U,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT, tgsi_op2_trans},
+       {TGSI_OPCODE_F2U,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_FLT_TO_UINT, tgsi_f2i},
        {TGSI_OPCODE_U2F,       0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_UINT_TO_FLT, tgsi_op2_trans},
        {TGSI_OPCODE_UADD,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_ADD_INT, tgsi_op2},
        {TGSI_OPCODE_UDIV,      0, EG_V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_NOP, tgsi_udiv},
--
1.7.10.2



------------------------------

_______________________________________________
mesa-dev mailing list
mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


End of mesa-dev Digest, Vol 26, Issue 165
*****************************************
&lt;/pre&gt;</description>
    <dc:creator>Westermann Fu</dc:creator>
    <dc:date>2012-05-25T12:11:59</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40790">
    <title>[PATCH] gallium: add st_api feature mask to preventadvertising MS visuals</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40790</link>
    <description>&lt;pre&gt;v2: use a define for the maximum sample count
v3: also test odd sample counts (r300 supports MS3)

While multisample renderbuffers are supported by mesa, MS visuals
are not, so we need a way to tell dri/st not to advertise them even
if the gallium driver does support multisampled surfaces.

Otherwise applications selecting these non-functional visuals would
run into trouble ...
---
 src/gallium/include/state_tracker/st_api.h         |   16 ++++++++++
 src/gallium/state_trackers/dri/common/dri_screen.c |   31 ++++++++++++-------
 src/gallium/state_trackers/vega/vg_manager.c       |    1 +
 src/mesa/state_tracker/st_manager.c                |    1 +
 4 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 3af1dfc..86ab02d 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -70,6 +70,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum st_profile_type
 #define ST_PROFILE_OPENGL_ES2_MASK   (1 &amp;lt;&amp;lt; ST_PROFILE_OPENGL_ES2)
 
 /**
+ * Optional API/state tracker features.
+ */
+enum st_api_feature
+{
+   ST_API_FEATURE_MS_VISUALS  /**&amp;lt; support for multisample visuals */
+};
+
+/* for feature_mask in st_api */
+#define ST_API_FEATURE_MS_VISUALS_MASK (1 &amp;lt;&amp;lt; ST_API_FEATURE_MS_VISUALS)
+
+/**
  * New context flags for GL 3.0 and beyond.
  *
  * Profile information (core vs. compatibilty for OpenGL 3.2+) is communicated
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -430,6 +441,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct st_api
    unsigned profile_mask;
 
    /**
+    * The supported optional features.  Tested with ST_FEATURE_*_MASK.
+    */
+   unsigned feature_mask;
+
+   /**
     * Destroy the API.
     */
    void (*destroy)(struct st_api *stapi);
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 24efbde..406e550 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -41,6 +41,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "util/u_debug.h"
 
+#define MSAA_VISUAL_MAX_SAMPLES 8
+
 PUBLIC const char __driConfigOptions[] =
    DRI_CONF_BEGIN
       DRI_CONF_SECTION_PERFORMANCE
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -72,10 +74,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    __DRIconfig **configs_x8r8g8b8 = NULL;
    uint8_t depth_bits_array[5];
    uint8_t stencil_bits_array[5];
-   uint8_t msaa_samples_array[5];
+   uint8_t msaa_samples_array[MSAA_VISUAL_MAX_SAMPLES];
    unsigned depth_buffer_factor;
    unsigned back_buffer_factor;
-   unsigned msaa_samples_factor;
+   unsigned msaa_samples_factor, msaa_samples_max;
    unsigned i;
    struct pipe_screen *p_screen = screen-&amp;gt;base.screen;
    boolean pf_r5g6b5, pf_a8r8g8b8, pf_x8r8g8b8;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -89,6 +91,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    stencil_bits_array[0] = 0;
    depth_buffer_factor = 1;
 
+   msaa_samples_max = (screen-&amp;gt;st_api-&amp;gt;feature_mask &amp;amp; ST_API_FEATURE_MS_VISUALS)
+      ? MSAA_VISUAL_MAX_SAMPLES : 1;
+
    pf_x8z24 = p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
     PIPE_TEXTURE_2D, 0,
                                             PIPE_BIND_DEPTH_STENCIL);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -146,14 +151,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    msaa_samples_array[0] = 0;
    back_buffer_factor = 3;
 
-   /* also test color for msaa 2/4/6/8 - just assume it'll work for all depth buffers */
+   /* Also test for color multisample support - just assume it'll work
+    * for all depth buffers.
+    */
    if (pf_r5g6b5) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i++) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -168,11 +175,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
 
    if (pf_a8r8g8b8) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i++) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -190,11 +197,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
 
    if (pf_x8r8g8b8) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i++) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index e88f5f1..660a7af 100644
--- a/src/gallium/state_trackers/vega/vg_manager.c
+++ b/src/gallium/state_trackers/vega/vg_manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -369,6 +369,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct st_api vg_api = {
    "Vega " VEGA_VERSION_STRING,
    ST_API_OPENVG,
    ST_PROFILE_DEFAULT_MASK,
+   0,
    vg_api_destroy,
    vg_api_get_proc_address,
    vg_api_create_context,
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index d54b7ed..748624f 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -891,6 +891,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct st_api st_gl_api = {
    ST_PROFILE_OPENGL_ES2_MASK |
 #endif
    0,
+   0,
    st_api_destroy,
    st_api_get_proc_address,
    st_api_create_context,
&lt;/pre&gt;</description>
    <dc:creator>Christoph Bumiller</dc:creator>
    <dc:date>2012-05-25T11:24:47</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40789">
    <title>[PATCH] gallium: add st_api feature mask to preventadvertising MS visuals</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40789</link>
    <description>&lt;pre&gt;v2: use a define for the maximum sample count

While multisample renderbuffers are supported by mesa, MS visuals
are not, so we need a way to tell dri/st not to advertise them even
if the gallium driver does support multisampled surfaces.

Otherwise applications selecting these non-functional visuals would
run into trouble ...
---
 src/gallium/include/state_tracker/st_api.h         |   16 ++++++++++
 src/gallium/state_trackers/dri/common/dri_screen.c |   31 ++++++++++++-------
 src/gallium/state_trackers/vega/vg_manager.c       |    1 +
 src/mesa/state_tracker/st_manager.c                |    1 +
 4 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/src/gallium/include/state_tracker/st_api.h b/src/gallium/include/state_tracker/st_api.h
index 3af1dfc..86ab02d 100644
--- a/src/gallium/include/state_tracker/st_api.h
+++ b/src/gallium/include/state_tracker/st_api.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -70,6 +70,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; enum st_profile_type
 #define ST_PROFILE_OPENGL_ES2_MASK   (1 &amp;lt;&amp;lt; ST_PROFILE_OPENGL_ES2)
 
 /**
+ * Optional API/state tracker features.
+ */
+enum st_api_feature
+{
+   ST_API_FEATURE_MS_VISUALS  /**&amp;lt; support for multisample visuals */
+};
+
+/* for feature_mask in st_api */
+#define ST_API_FEATURE_MS_VISUALS_MASK (1 &amp;lt;&amp;lt; ST_API_FEATURE_MS_VISUALS)
+
+/**
  * New context flags for GL 3.0 and beyond.
  *
  * Profile information (core vs. compatibilty for OpenGL 3.2+) is communicated
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -430,6 +441,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct st_api
    unsigned profile_mask;
 
    /**
+    * The supported optional features.  Tested with ST_FEATURE_*_MASK.
+    */
+   unsigned feature_mask;
+
+   /**
     * Destroy the API.
     */
    void (*destroy)(struct st_api *stapi);
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c
index 24efbde..82f1aee 100644
--- a/src/gallium/state_trackers/dri/common/dri_screen.c
+++ b/src/gallium/state_trackers/dri/common/dri_screen.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -41,6 +41,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "util/u_debug.h"
 
+#define MSAA_VISUAL_MAX_SAMPLES 8
+
 PUBLIC const char __driConfigOptions[] =
    DRI_CONF_BEGIN
       DRI_CONF_SECTION_PERFORMANCE
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -72,10 +74,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    __DRIconfig **configs_x8r8g8b8 = NULL;
    uint8_t depth_bits_array[5];
    uint8_t stencil_bits_array[5];
-   uint8_t msaa_samples_array[5];
+   uint8_t msaa_samples_array[MSAA_VISUAL_MAX_SAMPLES/2+1]; /* even only */
    unsigned depth_buffer_factor;
    unsigned back_buffer_factor;
-   unsigned msaa_samples_factor;
+   unsigned msaa_samples_factor, msaa_samples_max;
    unsigned i;
    struct pipe_screen *p_screen = screen-&amp;gt;base.screen;
    boolean pf_r5g6b5, pf_a8r8g8b8, pf_x8r8g8b8;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -89,6 +91,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    stencil_bits_array[0] = 0;
    depth_buffer_factor = 1;
 
+   msaa_samples_max = (screen-&amp;gt;st_api-&amp;gt;feature_mask &amp;amp; ST_API_FEATURE_MS_VISUALS)
+      ? MSAA_VISUAL_MAX_SAMPLES : 1;
+
    pf_x8z24 = p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_Z24X8_UNORM,
     PIPE_TEXTURE_2D, 0,
                                             PIPE_BIND_DEPTH_STENCIL);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -146,14 +151,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
    msaa_samples_array[0] = 0;
    back_buffer_factor = 3;
 
-   /* also test color for msaa 2/4/6/8 - just assume it'll work for all depth buffers */
+   /* Also test color for even sample counts - just assume it'll work
+    * for all depth buffers.
+    */
    if (pf_r5g6b5) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i += 2) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B5G6R5_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -168,11 +175,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
 
    if (pf_a8r8g8b8) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i += 2) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B8G8R8A8_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -190,11 +197,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; dri_fill_in_modes(struct dri_screen *screen,
 
    if (pf_x8r8g8b8) {
       msaa_samples_factor = 1;
-      for (i = 1; i &amp;lt; 5; i++) {
+      for (i = 2; i &amp;lt;= msaa_samples_max; i += 2) {
          if (p_screen-&amp;gt;is_format_supported(p_screen, PIPE_FORMAT_B8G8R8X8_UNORM,
-   PIPE_TEXTURE_2D, i*2,
+   PIPE_TEXTURE_2D, i,
                                                    PIPE_BIND_RENDER_TARGET)) {
-            msaa_samples_array[msaa_samples_factor] = i * 2;
+            msaa_samples_array[msaa_samples_factor] = i;
             msaa_samples_factor++;
          }
       }
diff --git a/src/gallium/state_trackers/vega/vg_manager.c b/src/gallium/state_trackers/vega/vg_manager.c
index e88f5f1..660a7af 100644
--- a/src/gallium/state_trackers/vega/vg_manager.c
+++ b/src/gallium/state_trackers/vega/vg_manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -369,6 +369,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct st_api vg_api = {
    "Vega " VEGA_VERSION_STRING,
    ST_API_OPENVG,
    ST_PROFILE_DEFAULT_MASK,
+   0,
    vg_api_destroy,
    vg_api_get_proc_address,
    vg_api_create_context,
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index d54b7ed..748624f 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -891,6 +891,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct st_api st_gl_api = {
    ST_PROFILE_OPENGL_ES2_MASK |
 #endif
    0,
+   0,
    st_api_destroy,
    st_api_get_proc_address,
    st_api_create_context,
&lt;/pre&gt;</description>
    <dc:creator>Christoph Bumiller</dc:creator>
    <dc:date>2012-05-25T11:06:35</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40782">
    <title>[PATCH 1/7] r600g: add RECIP_INT,PRED_SETE_INT to r600_bytecode_get_num_operands</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40782</link>
    <description>&lt;pre&gt;Fixes https://bugs.freedesktop.org/show_bug.cgi?id=50315

Tested-by: Kai Wasserbäch &amp;lt;kai&amp;lt; at &amp;gt;dev.carbon-project.org&amp;gt;
Signed-off-by: Vadim Girlin &amp;lt;vadimgirlin&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/gallium/drivers/r600/r600_asm.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index b73bbb3..b0cda3a 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -80,6 +80,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int r600_bytecode_get_num_operands(struct r600_bytecode *
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETGE:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETNE_INT:
+case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_PRED_SETE_INT:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_DOT4_IEEE:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_CUBE:
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -103,6 +104,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static inline unsigned int r600_bytecode_get_num_operands(struct r600_bytecode *
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_LOG_IEEE:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_CLAMPED:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_IEEE:
+case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_INT:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIP_UINT:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_CLAMPED:
 case V_SQ_ALU_WORD1_OP2_SQ_OP2_INST_RECIPSQRT_IEEE:
&lt;/pre&gt;</description>
    <dc:creator>Vadim Girlin</dc:creator>
    <dc:date>2012-05-25T09:26:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40780">
    <title>[PATCH 1/1] mesa: meta_glsl_clear_init() use of "out" isnot compatible with ES2.0.</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40780</link>
    <description>&lt;pre&gt;Discovered by Eric Anholt's recent changes to the i965 driver GL clear
logic while executing some of the Khronos conformance tests.

Signed-off-by: Oliver McFadden &amp;lt;oliver.mcfadden&amp;lt; at &amp;gt;linux.intel.com&amp;gt;
---
 src/mesa/drivers/common/meta.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 95336fc..4bd9c5d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1753,11 +1753,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
    const char *fs_int_source =
       "#version 130\n"
       "uniform ivec4 color;\n"
-      "out ivec4 out_color;\n"
       "\n"
       "void main()\n"
       "{\n"
-      "   out_color = color;\n"
+      "   gl_FragColor = color;\n"
       "}\n";
    GLuint vs, fs;
 
&lt;/pre&gt;</description>
    <dc:creator>Oliver McFadden</dc:creator>
    <dc:date>2012-05-25T08:18:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40767">
    <title>[PATCH 1/6] st/mesa: Don't flush the front buffer</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40767</link>
    <description>&lt;pre&gt;We might not even have a frontbuffer bound, this is the wrong place to do
this, and this is not needed, so remove it.
---
 src/mesa/state_tracker/st_manager.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index d54b7ed..5990eaf 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -460,8 +460,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; st_context_flush(struct st_context_iface *stctxi, unsigned flags,
 {
    struct st_context *st = (struct st_context *) stctxi;
    st_flush(st, fence);
-   if (flags &amp;amp; ST_FLUSH_FRONT)
-      st_manager_flush_frontbuffer(st);
 }
 
 static boolean
&lt;/pre&gt;</description>
    <dc:creator>Stéphane Marchesin</dc:creator>
    <dc:date>2012-05-25T01:29:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40758">
    <title>No more make clean!</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40758</link>
    <description>&lt;pre&gt;It still has the flaw that changes to source lists and Makefile.ams
don't rebuild Makefile as often as they should.  This is because our
top-level Makefile isn't in automake, and has just a stub am-refresh
target.  I have a series to convert that, but it means getting rid of
the static configs.  I'd love to see them die (they're just a trap
these days), but I'll wait on that for another patchbomb.

I also want libglsl.so to get merged into libdricore.so, and to make
libdricore sit in a normal lib directory without rpath.  That's next
on my list.
&lt;/pre&gt;</description>
    <dc:creator>Eric Anholt</dc:creator>
    <dc:date>2012-05-24T23:45:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40745">
    <title>r600g compute support v3</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40745</link>
    <description>&lt;pre&gt;Hi,

Here is an updated version of the r600 compute patches.

Patches 2,4,9,10 have changed since v2 and patch 3 is new.

-Tom
&lt;/pre&gt;</description>
    <dc:creator>Tom Stellard</dc:creator>
    <dc:date>2012-05-24T19:43:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40737">
    <title>[Bug 50318] New: [r600g] Piglit: spec/ARB_texture_float/get-renderbuffer-internalformat: unsupported colour formats 30 and 93</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40737</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50318

             Bug #: 50318
           Summary: [r600g] Piglit:
                    spec/ARB_texture_float/get-renderbuffer-internalformat
                    : unsupported colour formats 30 and 93
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: kai&amp;lt; at &amp;gt;dev.carbon-project.org


The Piglit test, which I ran the first time with a non-LLVM-backend build on
2012-05-20 (git/239792fb) has the state "warn" as a result. In the "errors"
column the following is recorded:


The test still shows the same output with the LLVM-backend build of today
(git/0f6a3a7d)

Please see bug 50312, comment #0 for the used software stack and hardware in
today's test run.

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T18:01:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40733">
    <title>[PATCH] svga: remove the special zero-stride vertexarray code</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40733</link>
    <description>&lt;pre&gt;This code actually hasn't been needed for some time now.  We can just
treat a zero-stride vertex array like any other non-zero-stride array.
---
 src/gallium/drivers/svga/svga_context.h         |    6 --
 src/gallium/drivers/svga/svga_pipe_draw.c       |    9 +--
 src/gallium/drivers/svga/svga_state.c           |    1 -
 src/gallium/drivers/svga/svga_state.h           |    1 -
 src/gallium/drivers/svga/svga_state_constants.c |   18 -----
 src/gallium/drivers/svga/svga_state_vs.c        |   93 +----------------------
 src/gallium/drivers/svga/svga_tgsi.c            |    1 -
 src/gallium/drivers/svga/svga_tgsi.h            |    2 -
 src/gallium/drivers/svga/svga_tgsi_decl_sm30.c  |   34 ++------
 9 files changed, 12 insertions(+), 153 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_context.h b/src/gallium/drivers/svga/svga_context.h
index 067c791..7567431 100644
--- a/src/gallium/drivers/svga/svga_context.h
+++ b/src/gallium/drivers/svga/svga_context.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -237,11 +237,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct svga_state
    } tex_flags;
 
    boolean any_user_vertex_buffers;
-
-   unsigned zero_stride_vertex_elements;
-   unsigned num_zero_stride_vertex_elements;
-   /* ### maybe dynamically allocate this */
-   float zero_stride_constants[PIPE_MAX_ATTRIBS*4];
 };
 
 struct svga_prescale {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -406,7 +401,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct svga_context
 #define SVGA_NEW_NEED_SWTNL          0x400000
 #define SVGA_NEW_FS_RESULT           0x800000
 #define SVGA_NEW_VS_RESULT           0x1000000
-#define SVGA_NEW_ZERO_STRIDE         0x2000000
 #define SVGA_NEW_TEXTURE_FLAGS       0x4000000
 #define SVGA_NEW_STENCIL_REF         0x8000000
 
diff --git a/src/gallium/drivers/svga/svga_pipe_draw.c b/src/gallium/drivers/svga/svga_pipe_draw.c
index 2cab532..8c5d274 100644
--- a/src/gallium/drivers/svga/svga_pipe_draw.c
+++ b/src/gallium/drivers/svga/svga_pipe_draw.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -95,16 +95,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; svga_user_buffer_range(struct svga_context *svga,
             first = ve[i].src_offset;
             count = (instance_count + instance_div - 1) / instance_div;
             size = vb-&amp;gt;stride * (count - 1) + elemSize;
-         } else if (vb-&amp;gt;stride) {
+         } else {
             first = vb-&amp;gt;stride * start + ve[i].src_offset;
             size = vb-&amp;gt;stride * (count - 1) + elemSize;
-         } else {
-            /* Only a single vertex!
-             * Upload with the largest vertex size the hw supports,
-             * if possible.
-             */
-            first = ve[i].src_offset;
-            size = MIN2(16, vb-&amp;gt;buffer-&amp;gt;width0);
          }
 
          buffer-&amp;gt;uploaded.start = MIN2(buffer-&amp;gt;uploaded.start, first);
diff --git a/src/gallium/drivers/svga/svga_state.c b/src/gallium/drivers/svga/svga_state.c
index bb3e80a..55cc841 100644
--- a/src/gallium/drivers/svga/svga_state.c
+++ b/src/gallium/drivers/svga/svga_state.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -63,7 +63,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const struct svga_tracked_state *hw_clear_state[] =
  */
 static const struct svga_tracked_state *hw_draw_state[] =
 {
-   &amp;amp;svga_hw_update_zero_stride,
    &amp;amp;svga_hw_fs,
    &amp;amp;svga_hw_vs,
    &amp;amp;svga_hw_rss,
diff --git a/src/gallium/drivers/svga/svga_state.h b/src/gallium/drivers/svga/svga_state.h
index de76cc2..046c033 100644
--- a/src/gallium/drivers/svga/svga_state.h
+++ b/src/gallium/drivers/svga/svga_state.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -66,7 +66,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; extern struct svga_tracked_state svga_hw_clip_planes;
 extern struct svga_tracked_state svga_hw_vdecl;
 extern struct svga_tracked_state svga_hw_fs_parameters;
 extern struct svga_tracked_state svga_hw_vs_parameters;
-extern struct svga_tracked_state svga_hw_update_zero_stride;
 
 /* SWTNL_DRAW
  */
diff --git a/src/gallium/drivers/svga/svga_state_constants.c b/src/gallium/drivers/svga/svga_state_constants.c
index 1c0ed6c..c03ef05 100644
--- a/src/gallium/drivers/svga/svga_state_constants.c
+++ b/src/gallium/drivers/svga/svga_state_constants.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -351,23 +351,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; emit_vs_consts(struct svga_context *svga, unsigned dirty)
          return ret;
    }
 
-   /* SVGA_NEW_ZERO_STRIDE
-    * Put the zero-stride vertex array attributes into the const buffer.
-    */
-   if (key-&amp;gt;zero_stride_vertex_elements) {
-      unsigned i, curr_zero_stride = 0;
-      for (i = 0; i &amp;lt; PIPE_MAX_ATTRIBS; ++i) {
-         if (key-&amp;gt;zero_stride_vertex_elements &amp;amp; (1 &amp;lt;&amp;lt; i)) {
-            ret = emit_const( svga, PIPE_SHADER_VERTEX, offset++,
-                              svga-&amp;gt;curr.zero_stride_constants +
-                              4 * curr_zero_stride );
-            if (ret != PIPE_OK)
-               return ret;
-            ++curr_zero_stride;
-         }
-      }
-   }
-
    return PIPE_OK;
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -377,7 +360,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct svga_tracked_state svga_hw_vs_parameters =
    "hw vs params",
    (SVGA_NEW_PRESCALE |
     SVGA_NEW_VS_CONST_BUFFER |
-    SVGA_NEW_ZERO_STRIDE |
     SVGA_NEW_VS_RESULT),
    emit_vs_consts
 };
diff --git a/src/gallium/drivers/svga/svga_state_vs.c b/src/gallium/drivers/svga/svga_state_vs.c
index e8c953b..efa7c15 100644
--- a/src/gallium/drivers/svga/svga_state_vs.c
+++ b/src/gallium/drivers/svga/svga_state_vs.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -152,7 +152,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fail:
    return ret;
 }
 
-/* SVGA_NEW_PRESCALE, SVGA_NEW_RAST, SVGA_NEW_ZERO_STRIDE, SVGA_NEW_FS
+/* SVGA_NEW_PRESCALE, SVGA_NEW_RAST, SVGA_NEW_FS
  */
 static void
 make_vs_key(struct svga_context *svga, struct svga_vs_compile_key *key)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -160,10 +160,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; make_vs_key(struct svga_context *svga, struct svga_vs_compile_key *key)
    memset(key, 0, sizeof *key);
    key-&amp;gt;need_prescale = svga-&amp;gt;state.hw_clear.prescale.enabled;
    key-&amp;gt;allow_psiz = svga-&amp;gt;curr.rast-&amp;gt;templ.point_size_per_vertex;
-   key-&amp;gt;zero_stride_vertex_elements =
-      svga-&amp;gt;curr.zero_stride_vertex_elements;
-   key-&amp;gt;num_zero_stride_vertex_elements =
-      svga-&amp;gt;curr.num_zero_stride_vertex_elements;
 
    /* SVGA_NEW_FS */
    key-&amp;gt;fs_generic_inputs = svga-&amp;gt;curr.fs-&amp;gt;generic_inputs;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -216,91 +212,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct svga_tracked_state svga_hw_vs =
    (SVGA_NEW_VS |
     SVGA_NEW_FS |
     SVGA_NEW_PRESCALE |
-    SVGA_NEW_NEED_SWTNL |
-    SVGA_NEW_ZERO_STRIDE),
+    SVGA_NEW_NEED_SWTNL),
    emit_hw_vs
 };
-
-
-/**
- * This function handles the special case of vertex attributes
- * with stride=0.  Basically, copy those values into the constant
- * buffer and modify the vertex shader to get the values from the
- * constant buffer rather than a vertex array.
- */
-static enum pipe_error
-update_zero_stride( struct svga_context *svga,
-                    unsigned dirty )
-{
-   unsigned i;
-
-   svga-&amp;gt;curr.zero_stride_vertex_elements = 0;
-   svga-&amp;gt;curr.num_zero_stride_vertex_elements = 0;
-
-   for (i = 0; i &amp;lt; svga-&amp;gt;curr.velems-&amp;gt;count; i++) {
-      const struct pipe_vertex_element *vel = &amp;amp;svga-&amp;gt;curr.velems-&amp;gt;velem[i];
-      const struct pipe_vertex_buffer *vbuffer = &amp;amp;svga-&amp;gt;curr.vb[
-         vel-&amp;gt;vertex_buffer_index];
-
-      if (vbuffer-&amp;gt;stride == 0) {
-         unsigned const_idx =
-            svga-&amp;gt;curr.num_zero_stride_vertex_elements;
- struct pipe_transfer *transfer;
-         struct translate *translate;
-         struct translate_key key;
-         void *mapped_buffer;
-
-         svga-&amp;gt;curr.zero_stride_vertex_elements |= (1 &amp;lt;&amp;lt; i);
-         ++svga-&amp;gt;curr.num_zero_stride_vertex_elements;
-
-         key.output_stride = 4 * sizeof(float);
-         key.nr_elements = 1;
-         key.element[0].type = TRANSLATE_ELEMENT_NORMAL;
-         key.element[0].input_format = vel-&amp;gt;src_format;
-         key.element[0].output_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
-         key.element[0].input_buffer = vel-&amp;gt;vertex_buffer_index;
-         key.element[0].input_offset = vel-&amp;gt;src_offset;
-         key.element[0].instance_divisor = vel-&amp;gt;instance_divisor;
-         key.element[0].output_offset = const_idx * 4 * sizeof(float);
-
-         translate_key_sanitize(&amp;amp;key);
-         /* translate_generic_create is technically private but
-          * we don't want to code-generate, just want generic
-          * translation */
-         translate = translate_generic_create(&amp;amp;key);
-
-         assert(vel-&amp;gt;src_offset == 0);
-         
-         mapped_buffer = pipe_buffer_map_range(&amp;amp;svga-&amp;gt;pipe, 
-                                               vbuffer-&amp;gt;buffer,
-                                               vel-&amp;gt;src_offset + vbuffer-&amp;gt;buffer_offset,
-                                               util_format_get_blocksize(vel-&amp;gt;src_format),
-                                               PIPE_TRANSFER_READ,
-       &amp;amp;transfer);
-         mapped_buffer = (uint8_t*)mapped_buffer - vel-&amp;gt;src_offset;
-
-         translate-&amp;gt;set_buffer(translate, vel-&amp;gt;vertex_buffer_index,
-                               mapped_buffer,
-                               vbuffer-&amp;gt;stride, ~0);
-         translate-&amp;gt;run(translate, 0, 1, 0,
-                        svga-&amp;gt;curr.zero_stride_constants);
-
-         pipe_buffer_unmap(&amp;amp;svga-&amp;gt;pipe, transfer);
-
-         translate-&amp;gt;release(translate);
-      }
-   }
-
-   if (svga-&amp;gt;curr.num_zero_stride_vertex_elements)
-      svga-&amp;gt;dirty |= SVGA_NEW_ZERO_STRIDE;
-
-   return PIPE_OK;
-}
-
-struct svga_tracked_state svga_hw_update_zero_stride =
-{
-   "update zero_stride",
-   ( SVGA_NEW_VELEMENT |
-     SVGA_NEW_VBUFFER ),
-   update_zero_stride
-};
diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c
index 02ce59f..8a1ed4a 100644
--- a/src/gallium/drivers/svga/svga_tgsi.c
+++ b/src/gallium/drivers/svga/svga_tgsi.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -284,7 +284,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; svga_tgsi_translate( const struct svga_shader *shader,
 
    if (unit == PIPE_SHADER_VERTEX) {
       emit.imm_start += key.vkey.need_prescale ? 2 : 0;
-      emit.imm_start += key.vkey.num_zero_stride_vertex_elements;
    }
 
    emit.nr_hw_float_const = (emit.imm_start + emit.info.file_max[TGSI_FILE_IMMEDIATE] + 1);
diff --git a/src/gallium/drivers/svga/svga_tgsi.h b/src/gallium/drivers/svga/svga_tgsi.h
index 7e93bf5..bb0c6d0 100644
--- a/src/gallium/drivers/svga/svga_tgsi.h
+++ b/src/gallium/drivers/svga/svga_tgsi.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,10 +47,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct tgsi_token;
 struct svga_vs_compile_key
 {
    unsigned fs_generic_inputs;
-   unsigned zero_stride_vertex_elements;
    unsigned need_prescale:1;
    unsigned allow_psiz:1;
-   unsigned num_zero_stride_vertex_elements:6;
 };
 
 struct svga_fs_compile_key
diff --git a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
index e9adf3a..becd159 100644
--- a/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
+++ b/src/gallium/drivers/svga/svga_tgsi_decl_sm30.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -376,35 +376,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; vs30_input(struct svga_shader_emitter *emit,
    dcl.values[0] = 0;
    dcl.values[1] = 0;
 
-   if (emit-&amp;gt;key.vkey.zero_stride_vertex_elements &amp;amp; (1 &amp;lt;&amp;lt; idx)) {
-      unsigned i;
-      unsigned offset = 0;
-      unsigned start_idx = emit-&amp;gt;info.file_max[TGSI_FILE_CONSTANT] + 1;
-      /* adjust for prescale constants */
-      start_idx += emit-&amp;gt;key.vkey.need_prescale ? 2 : 0;
-      /* compute the offset from the start of zero stride constants */
-      for (i = 0; i &amp;lt; PIPE_MAX_ATTRIBS &amp;amp;&amp;amp; i &amp;lt; idx; ++i) {
-         if (emit-&amp;gt;key.vkey.zero_stride_vertex_elements &amp;amp; (1&amp;lt;&amp;lt;i))
-            ++offset;
-      }
-      emit-&amp;gt;input_map[idx] = src_register( SVGA3DREG_CONST,
-                                           start_idx + offset );
-   } else {
-      emit-&amp;gt;input_map[idx] = src_register( SVGA3DREG_INPUT, idx );
-      dcl.dst = dst_register( SVGA3DREG_INPUT, idx );
+   emit-&amp;gt;input_map[idx] = src_register( SVGA3DREG_INPUT, idx );
+   dcl.dst = dst_register( SVGA3DREG_INPUT, idx );
 
-      assert(dcl.dst.reserved0);
+   assert(dcl.dst.reserved0);
 
-      svga_generate_vdecl_semantics( idx, &amp;amp;usage, &amp;amp;index );
+   svga_generate_vdecl_semantics( idx, &amp;amp;usage, &amp;amp;index );
 
-      dcl.usage = usage;
-      dcl.index = index;
-      dcl.values[0] |= 1&amp;lt;&amp;lt;31;
+   dcl.usage = usage;
+   dcl.index = index;
+   dcl.values[0] |= 1&amp;lt;&amp;lt;31;
 
-      return (emit_instruction(emit, opcode) &amp;amp;&amp;amp;
-              svga_shader_emit_dwords( emit, dcl.values, Elements(dcl.values)));
-   }
-   return TRUE;
+   return (emit_instruction(emit, opcode) &amp;amp;&amp;amp;
+           svga_shader_emit_dwords( emit, dcl.values, Elements(dcl.values)));
 }
 
 
&lt;/pre&gt;</description>
    <dc:creator>Brian Paul</dc:creator>
    <dc:date>2012-05-24T17:42:07</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40732">
    <title>[PATCH] gallium/docs: beef up the docs related to colorclamping</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40732</link>
    <description>&lt;pre&gt;---
 src/gallium/docs/source/cso/rasterizer.rst |    9 +++++++++
 src/gallium/docs/source/screen.rst         |   12 +++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/gallium/docs/source/cso/rasterizer.rst b/src/gallium/docs/source/cso/rasterizer.rst
index 150e6df..f4e24f0 100644
--- a/src/gallium/docs/source/cso/rasterizer.rst
+++ b/src/gallium/docs/source/cso/rasterizer.rst
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -20,6 +20,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; OpenGL: glClampColor(GL_CLAMP_VERTEX_COLOR) in GL 3.0 or GL_ARB_color_buffer_flo
 
 D3D11: seems always disabled
 
+Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the
+driver supports this control.  If it's not supported, the state tracker may
+have to insert extra clamping code.
+
+
 clamp_fragment_color
 ^^^^^^^^^^^^^^^^^^^^
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,6 +35,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; OpenGL: glClampColor(GL_CLAMP_FRAGMENT_COLOR) in GL 3.0 or ARB_color_buffer_floa
 
 D3D11: seems always disabled
 
+Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the
+driver supports this control.  If it's not supported, the state tracker may
+have to insert extra clamping code.
+
 
 Shading
 -------
diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst
index 2bddf1b..17adf4d 100644
--- a/src/gallium/docs/source/screen.rst
+++ b/src/gallium/docs/source/screen.rst
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -83,17 +83,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; The integer capabilities:
 * ``PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR``: Whether the driver supports
   per-instance vertex attribs.
 * ``PIPE_CAP_FRAGMENT_COLOR_CLAMPED``: Whether fragment color clamping is
-  supported.
+  supported.  That is, is the pipe_rasterizer_state::clamp_fragment_color
+  flag supported by the driver?  If not, the state tracker will insert
+  clamping code into the fragment shaders when needed.
+
 * ``PIPE_CAP_MIXED_COLORBUFFER_FORMATS``: Whether mixed colorbuffer formats are
   supported, e.g. RGBA8 and RGBA32F as the first and second colorbuffer, resp.
 * ``PIPE_CAP_VERTEX_COLOR_UNCLAMPED``: Whether the driver is capable of
   outputting unclamped vertex colors from a vertex shader. If unsupported,
   the vertex colors are always clamped. This is the default for DX9 hardware.
 * ``PIPE_CAP_VERTEX_COLOR_CLAMPED``: Whether the driver is capable of
-  clamping vertex colors when they come out of a vertex shader. If unsupported,
+  clamping vertex colors when they come out of a vertex shader, as specified
+  by the pipe_rasterizer_state::clamp_vertex_color flag.  If unsupported,
   the vertex colors are never clamped. This is the default for DX10 hardware.
   If both clamped and unclamped CAPs are supported, the clamping can be
-  controlled through pipe_rasterizer_state.
+  controlled through pipe_rasterizer_state.  If the driver cannot do vertex
+  color clamping, the state tracker may insert clamping code into the vertex
+  shader.
 * ``PIPE_CAP_GLSL_FEATURE_LEVEL``: Whether the driver supports features
   equivalent to a specific GLSL version. E.g. for GLSL 1.3, report 130.
 * ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION``: Whether quads adhere to
&lt;/pre&gt;</description>
    <dc:creator>Brian Paul</dc:creator>
    <dc:date>2012-05-24T17:41:50</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40731">
    <title>[PATCH] util: add GALLIUM_LOG_FILE option for loggingoutput to a file</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40731</link>
    <description>&lt;pre&gt;Useful for logging different runs to files and diffing, etc.
---
 src/gallium/auxiliary/os/os_misc.c   |   25 ++++++++++++++++++++++---
 src/gallium/auxiliary/util/u_debug.c |    6 +++---
 2 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/src/gallium/auxiliary/os/os_misc.c b/src/gallium/auxiliary/os/os_misc.c
index 5744dd5..447e720 100644
--- a/src/gallium/auxiliary/os/os_misc.c
+++ b/src/gallium/auxiliary/os/os_misc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -50,16 +50,35 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 void
 os_log_message(const char *message)
 {
+   /* If the GALLIUM_LOG_FILE environment variable is set to a valid filename,
+    * write all messages to that file.
+    */
+   static FILE *fout = NULL;
+
+   if (!fout) {
+      /* one-time init */
+      const char *filename = os_get_option("GALLIUM_LOG_FILE");
+      if (filename)
+         fout = fopen(filename, "w");
+      if (!fout)
+         fout = stderr;
+   }
+
 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
    OutputDebugStringA(message);
    if(GetConsoleWindow() &amp;amp;&amp;amp; !IsDebuggerPresent()) {
       fflush(stdout);
-      fputs(message, stderr);
-      fflush(stderr);
+      fputs(message, fout);
+      fflush(fout);
+   }
+   else if (fout != stderr) {
+      fputs(message, fout);
+      fflush(fout);
    }
 #else /* !PIPE_SUBSYSTEM_WINDOWS */
    fflush(stdout);
-   fputs(message, stderr);
+   fputs(message, fout);
+   fflush(fout);
 #endif
 }
 
diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c
index df1d8e6..0a350ca 100644
--- a/src/gallium/auxiliary/util/u_debug.c
+++ b/src/gallium/auxiliary/util/u_debug.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -48,9 +48,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 void _debug_vprintf(const char *format, va_list ap)
 {
+   static char buf[4096] = {'\0'};
 #if defined(PIPE_OS_WINDOWS) || defined(PIPE_SUBSYSTEM_EMBEDDED)
    /* We buffer until we find a newline. */
-   static char buf[4096] = {'\0'};
    size_t len = strlen(buf);
    int ret = util_vsnprintf(buf + len, sizeof(buf) - len, format, ap);
    if(ret &amp;gt; (int)(sizeof(buf) - len - 1) || util_strchr(buf + len, '\n')) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -58,8 +58,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void _debug_vprintf(const char *format, va_list ap)
       buf[0] = '\0';
    }
 #else
-   /* Just print as-is to stderr */
-   vfprintf(stderr, format, ap);
+   util_vsnprintf(buf, sizeof(buf), format, ap);
+   os_log_message(buf);
 #endif
 }
 
&lt;/pre&gt;</description>
    <dc:creator>Brian Paul</dc:creator>
    <dc:date>2012-05-24T17:41:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40730">
    <title>[PATCH] draw: fix primitive restart bug by using theindex buffer offset</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40730</link>
    <description>&lt;pre&gt;The code which scans the index buffer for restart indexes wasn't adding
the index buffer offset so we were always starting at offset=0.  The
offset is usually zero so it wasn't noticed before.

Fixes a failure in the piglit primitive-restart test when testing
vertex data + index data in a single VBO.

NOTE: This is a candidate for the 8.0 branch.
---
 src/gallium/auxiliary/draw/draw_pt.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c
index dbe5e94..2c4edc0 100644
--- a/src/gallium/auxiliary/draw/draw_pt.c
+++ b/src/gallium/auxiliary/draw/draw_pt.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -368,25 +368,28 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; draw_pt_arrays_restart(struct draw_context *draw,
 
    if (draw-&amp;gt;pt.user.elts) {
       /* indexed prims (draw_elements) */
+      const char *elts =
+         (const char *) draw-&amp;gt;pt.user.elts + draw-&amp;gt;pt.index_buffer.offset;
+
       cur_start = start;
       cur_count = 0;
 
       switch (draw-&amp;gt;pt.user.eltSize) {
       case 1:
          {
-            const ubyte *elt_ub = (const ubyte *) draw-&amp;gt;pt.user.elts;
+            const ubyte *elt_ub = (const ubyte *) elts;
             PRIM_RESTART_LOOP(elt_ub);
          }
          break;
       case 2:
          {
-            const ushort *elt_us = (const ushort *) draw-&amp;gt;pt.user.elts;
+            const ushort *elt_us = (const ushort *) elts;
             PRIM_RESTART_LOOP(elt_us);
          }
          break;
       case 4:
          {
-            const uint *elt_ui = (const uint *) draw-&amp;gt;pt.user.elts;
+            const uint *elt_ui = (const uint *) elts;
             PRIM_RESTART_LOOP(elt_ui);
          }
          break;
&lt;/pre&gt;</description>
    <dc:creator>Brian Paul</dc:creator>
    <dc:date>2012-05-24T17:16:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40719">
    <title>[Bug 50317] New: [r600g+llvm] Piglit test failures: LLVM ERROR: Cannot select: target intrinsic %llvm.AMDGPU.sin</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40719</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50317

             Bug #: 50317
           Summary: [r600g+llvm] Piglit test failures: LLVM ERROR: Cannot
                    select: target intrinsic %llvm.AMDGPU.sin
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: All
            Status: NEW
          Keywords: regression
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: kai&amp;lt; at &amp;gt;dev.carbon-project.org


This is identical to bug 50316 except that it is for the intrinsic
%llvm.AMDGPU.sin

Affected Piglit tests:
shaders/glsl-fs-atan-3
shaders/glsl-fs-tan-1
shaders/glsl-sin
spec/glsl-1.10/execution/built-in-functions/fs-sin-float
spec/glsl-1.10/execution/built-in-functions/fs-sin-vec2
spec/glsl-1.10/execution/built-in-functions/fs-sin-vec3
spec/glsl-1.10/execution/built-in-functions/fs-sin-vec4
spec/glsl-1.10/execution/built-in-functions/fs-tan-float
spec/glsl-1.10/execution/built-in-functions/fs-tan-vec2
spec/glsl-1.10/execution/built-in-functions/fs-tan-vec3
spec/glsl-1.10/execution/built-in-functions/fs-tan-vec4
spec/glsl-1.10/execution/built-in-functions/vs-sin-float
spec/glsl-1.10/execution/built-in-functions/vs-sin-vec2
spec/glsl-1.10/execution/built-in-functions/vs-sin-vec3
spec/glsl-1.10/execution/built-in-functions/vs-sin-vec4
spec/glsl-1.10/execution/built-in-functions/vs-tan-float
spec/glsl-1.10/execution/built-in-functions/vs-tan-vec2
spec/glsl-1.10/execution/built-in-functions/vs-tan-vec3
spec/glsl-1.10/execution/built-in-functions/vs-tan-vec4

Please see bug 50312 for the hardware specification and information about the
used stack.

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T16:47:52</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40718">
    <title>[Bug 50316] New: [r600g+llvm] Piglit test failures: LLVM ERROR: Cannot select: target intrinsic %llvm.AMDGPU.cos</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40718</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50316

             Bug #: 50316
           Summary: [r600g+llvm] Piglit test failures: LLVM ERROR: Cannot
                    select: target intrinsic %llvm.AMDGPU.cos
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: All
            Status: NEW
          Keywords: regression
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: kai&amp;lt; at &amp;gt;dev.carbon-project.org
                CC: tstellar&amp;lt; at &amp;gt;gmail.com


Similar to bug 50312, except for the error and the fact that all tests with
this error have the state "fail".

The error message:

Piglit tests affected:
shaders/fp-abs-01
shaders/glsl-cos
shaders/glsl-vs-masked-cos
spec/glsl-1.10/execution/built-in-functions/fs-cos-float
spec/glsl-1.10/execution/built-in-functions/fs-cos-vec2
spec/glsl-1.10/execution/built-in-functions/fs-cos-vec3
spec/glsl-1.10/execution/built-in-functions/fs-cos-vec4
spec/glsl-1.10/execution/built-in-functions/vs-cos-float
spec/glsl-1.10/execution/built-in-functions/vs-cos-vec2
spec/glsl-1.10/execution/built-in-functions/vs-cos-vec3
spec/glsl-1.10/execution/built-in-functions/vs-cos-vec4
spec/glsl-1.10/execution/clipping/clip-plane-transformation clipvert_pos
spec/glsl-1.10/execution/clipping/clip-plane-transformation pos_clipvert
spec/glsl-1.30/execution/clipping/clip-plane-transformation pos

Please see bug 50312 for the hardware specification and information about the
used stack

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T16:40:20</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40717">
    <title>[Bug 50315] New: [r600g+llvm] Piglit failures with "EE r600_asm.c:119 r600_bytecode_get_num_operands - Need instruction operand number for 0x42."</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40717</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50315

             Bug #: 50315
           Summary: [r600g+llvm] Piglit failures with "EE r600_asm.c:119
                    r600_bytecode_get_num_operands - Need instruction
                    operand number for 0x42."
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86-64 (AMD64)
        OS/Version: All
            Status: NEW
          Keywords: regression
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: kai&amp;lt; at &amp;gt;dev.carbon-project.org
                CC: tstellar&amp;lt; at &amp;gt;gmail.com


The same as bug 50312, except the tests are not in state fail, only warn and
the error:

The tests that have state warn and show the error given above are:
glean/glsl1-discard statement in for loop
glean/glsl1-do-loop
glean/glsl1-do-loop with break
glean/glsl1-do-loop with continue and break
glean/glsl1-for-loop with continue
shaders/glsl-copy-propagation-loop-1
shaders/glsl-fs-discard-04
shaders/glsl-fs-loop
shaders/glsl-fs-loop-300
shaders/glsl-fs-loop-continue
shaders/glsl-fs-loop-nested
shaders/glsl-fs-loop-redundant-condition
shaders/glsl-fs-unroll-out-param
shaders/glsl-fs-unroll-side-effect
shaders/glsl-vs-copy-propagation-1
shaders/glsl-vs-loop
shaders/glsl-vs-loop-300
shaders/glsl-vs-loop-continue
shaders/glsl-vs-loop-nested
shaders/glsl-vs-loop-redundant-condition
spec/glsl-1.30/execution/fs-discard-exit-1
spec/glsl-1.30/execution/fs-discard-exit-2

Please see bug 50312 for the hardware and stack specification.

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T09:29:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40715">
    <title>[Bug 50312] New: [r600g+llvm] Piglit failures with "EE r600_asm.c:119 r600_bytecode_get_num_operands - Need instruction operand number for 0x77."</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40715</link>
    <description>&lt;pre&gt;https://bugs.freedesktop.org/show_bug.cgi?id=50312

             Bug #: 50312
           Summary: [r600g+llvm] Piglit failures with "EE r600_asm.c:119
                    r600_bytecode_get_num_operands - Need instruction
                    operand number for 0x77."
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: regression
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev&amp;lt; at &amp;gt;lists.freedesktop.org
        ReportedBy: kai&amp;lt; at &amp;gt;dev.carbon-project.org
                CC: tstellar&amp;lt; at &amp;gt;gmail.com


I've just compiled r600g with the LLVM shader compiler and the Piglit results
look similar to the recent run without LLVM backend (2012-05-20/Git: 239792fb)
except that a ton of GLSL 1.10 and 1.30 tests now fail with:

The tests failing with the previous error are:
spec/glsl-1.10/execution/built-in-functions/fs-op-div-int-int
spec/glsl-1.10/execution/built-in-functions/fs-op-div-int-ivec2
spec/glsl-1.10/execution/built-in-functions/fs-op-div-int-ivec3 (warning only)
spec/glsl-1.10/execution/built-in-functions/fs-op-div-int-ivec4 (warning only)
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec2-int
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec2-ivec2 (warning
only)
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec3-int
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec3-ivec3 (warning
only)
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec4-int
spec/glsl-1.10/execution/built-in-functions/fs-op-div-ivec4-ivec4 (warning
only)
spec/glsl-1.10/execution/built-in-functions/vs-op-div-int-int
spec/glsl-1.10/execution/built-in-functions/vs-op-div-int-ivec2
spec/glsl-1.10/execution/built-in-functions/vs-op-div-int-ivec3 (warning only)
spec/glsl-1.10/execution/built-in-functions/vs-op-div-int-ivec4 (warning only)
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec2-int
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec2-ivec2 (warning
only)
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec3-int
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec3-ivec3 (warning
only)
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec4-int
spec/glsl-1.10/execution/built-in-functions/vs-op-div-ivec4-ivec4 (warning
only)
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-int-int
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-int-ivec2
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-int-ivec3 (warning only)
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-int-ivec4 (warning only)
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec2-int
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec2-ivec2 (warning
only)
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec3-int
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec3-ivec3 (warning
only)
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec4-int
spec/glsl-1.30/execution/built-in-functions/fs-op-mod-ivec4-ivec4 (warning
only)
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-int-int
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-int-ivec2
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-int-ivec3 (warning only)
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-int-ivec4 (warning only)
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec2-int
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec2-ivec2 (warning
only)
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec3-int
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec3-ivec3 (warning
only)
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec4-int
spec/glsl-1.30/execution/built-in-functions/vs-op-mod-ivec4-ivec4 (warning
only)

Stack:
Kernel: 3.4
libdrm: 2.4.33-1
Mesa: Git/0f6a3a7d
X.org: 1.12.1-2
LLVM: 3.1-1

Hardware: 0x9553

&lt;/pre&gt;</description>
    <dc:creator>bugzilla-daemon&lt; at &gt;freedesktop.org</dc:creator>
    <dc:date>2012-05-24T16:13:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40714">
    <title>[PATCH] gallium/targets: pass ldflags parameter to MKLIB</title>
    <link>http://comments.gmane.org/gmane.comp.video.mesa3d.devel/40714</link>
    <description>&lt;pre&gt;Without passing the -ldflags parameter before $(LDFLAGS) in some cases
flags will be passed to MKLIB which it does not understand.
This might be -m64, -m32 or similar.

Signed-off-by: Thomas Gstädtner &amp;lt;thomas&amp;lt; at &amp;gt;gstaedtner.net&amp;gt;
---
 src/gallium/targets/Makefile.xorg |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/targets/Makefile.xorg b/src/gallium/targets/Makefile.xorg
index 481e3d6..21bf237 100644
--- a/src/gallium/targets/Makefile.xorg
+++ b/src/gallium/targets/Makefile.xorg
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -46,7 +46,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; endif
 default: depend $(TOP)/$(LIB_DIR)/gallium $(LIBNAME) $(LIBNAME_STAGING)
 
 $(LIBNAME): $(OBJECTS) Makefile ../Makefile.xorg $(LIBS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES)
-$(MKLIB) -linker '$(LD)' -noprefix -o $&amp;lt; at &amp;gt; $(LDFLAGS) $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
+$(MKLIB) -linker '$(LD)' -noprefix -o $&amp;lt; at &amp;gt; -ldflags '$(LDFLAGS)' $(OBJECTS) $(DRIVER_PIPES) $(GALLIUM_AUXILIARIES) $(DRIVER_LINKS)
 
 depend: $(C_SOURCES) $(CPP_SOURCES) $(ASM_SOURCES) $(SYMLINKS) $(GENERATED_SOURCES)
 rm -f depend
&lt;/pre&gt;</description>
    <dc:creator>Thomas Gstädtner</dc:creator>
    <dc:date>2012-05-23T16:55:51</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.video.mesa3d.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.video.mesa3d.devel</link>
  </textinput>
</rdf:RDF>

