Merge branch '7.8'
authorBrian Paul <brianp@vmware.com>
Thu, 25 Mar 2010 22:12:01 +0000 (16:12 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 25 Mar 2010 22:12:01 +0000 (16:12 -0600)
docs/news.html
docs/relnotes-7.7.1.html
docs/relnotes-7.8.html
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_fragprog_common.c
src/mesa/drivers/dri/r300/r300_vertprog.c
src/mesa/glapi/glapi_nop.c

index 0a0be715c1be226181a9822eaf55c50fc67d7399..a60d7a87d88ec569a206e276eaa2cfd88213a4f4 100644 (file)
 
 <H1>News</H1>
 
+
+<h2>March 26, 2010</h2>
+<p>
+<a href="relnotes-7.7.1.html">Mesa 7.7.1</a> is released.  This is a bug-fix
+release fixing issues found in the 7.7 release.
+</p>
+<p>
+Also, <a href="relnotes-7.8.html">Mesa 7.8</a> is released.  This is a new
+development release.
+</p>
+
+
+
 <h2>December 21, 2009</h2>
 <p>
 <a href="relnotes-7.6.1.html">Mesa 7.6.1</a> is released.  This is a bug-fix
index c3d42c1d546da95823e6ea98bf29da1f84a46837..46f4cac5637f481535e0738feaa6c43eef06969f 100644 (file)
@@ -8,7 +8,7 @@
 
 <body bgcolor="#eeeeee">
 
-<H1>Mesa 7.7.1 Release Notes / date tbd</H1>
+<H1>Mesa 7.7.1 Release Notes / March 26, 2010</H1>
 
 <p>
 Mesa 7.7.1 is a bug-fix release.
@@ -30,12 +30,6 @@ tbd
 </pre>
 
 
-<h2>New features</h2>
-<ul>
-<li>tbd
-</ul>
-
-
 <h2>Bug fixes</h2>
 <ul>
 <li>Assorted fixes to VMware SVGA gallium driver.
@@ -45,6 +39,12 @@ tbd
 <li>Gallium SSE codegen for XPD didn't always work.
 <li>Fixed Windows build.
 <li>Fixed broken glMultiDrawElements().
+<li>Silence bogus GL errors generated in glxinfo.
+<li>Fixed several render to texture bugs.
+<li>Assorted bug fixes in Mesa/Gallium state tracker including
+    glCopy/DrawPixels() to FBOs.
+<li>Assorted fixes to Gallium drivers.
+<li>Fixed broken glPush/PopClientAttrib() for vertex arrays in GLX code.
 </ul>
 
 
index ebe3d498b5762a9c060a66701981dde32f3b274f..eaf3a8d54a0306192946f384f20345ef40be4790 100644 (file)
@@ -8,7 +8,7 @@
 
 <body bgcolor="#eeeeee">
 
-<H1>Mesa 7.8 Release Notes / date TBD</H1>
+<H1>Mesa 7.8 Release Notes / March 26, 2010</H1>
 
 <p>
 Mesa 7.8 is a new development release.
index e2dbb1dbf400aab51613dbfdfb3df691f1ec61e6..c40802aec6e72e6476669628dffe1d78b776c362 100644 (file)
@@ -77,12 +77,29 @@ static int check_vpu(GLcontext *ctx, struct radeon_state_atom *atom)
        cnt = vpu_count(atom->cmd);
 
        if (r300->radeon.radeonScreen->kernel_mm) {
-               extra = 5;
+               extra = 3;
        }
 
        return cnt ? (cnt * 4) + extra : 0;
 }
 
+static int check_vpp(GLcontext *ctx, struct radeon_state_atom *atom)
+{
+    r300ContextPtr r300 = R300_CONTEXT(ctx);
+    int cnt;
+    int extra = 1;
+
+    if (r300->radeon.radeonScreen->kernel_mm) {
+        cnt = r300->selected_vp->code.constants.Count * 4;
+        extra = 3;
+    } else {
+        cnt = vpu_count(atom->cmd);
+        extra = 1;
+    }
+
+    return cnt ? (cnt * 4) + extra : 0;
+}
+
 void r300_emit_vpu(struct r300_context *r300,
                    uint32_t *data,
                    unsigned len,
@@ -101,15 +118,26 @@ static void emit_vpu_state(GLcontext *ctx, struct radeon_state_atom * atom)
 {
     r300ContextPtr r300 = R300_CONTEXT(ctx);
     drm_r300_cmd_header_t cmd;
-    uint32_t addr, ndw;
+    uint32_t addr;
 
     cmd.u = atom->cmd[0];
     addr = (cmd.vpu.adrhi << 8) | cmd.vpu.adrlo;
-    ndw = atom->check(ctx, atom);
 
     r300_emit_vpu(r300, &atom->cmd[1], vpu_count(atom->cmd) * 4, addr);
 }
 
+static void emit_vpp_state(GLcontext *ctx, struct radeon_state_atom * atom)
+{
+    r300ContextPtr r300 = R300_CONTEXT(ctx);
+    drm_r300_cmd_header_t cmd;
+    uint32_t addr;
+
+    cmd.u = atom->cmd[0];
+    addr = (cmd.vpu.adrhi << 8) | cmd.vpu.adrlo;
+
+    r300_emit_vpu(r300, &atom->cmd[1], r300->selected_vp->code.constants.Count * 4, addr);
+}
+
 void r500_emit_fp(struct r300_context *r300,
                   uint32_t *data,
                   unsigned len,
@@ -785,11 +813,11 @@ void r300InitCmdBuf(r300ContextPtr r300)
                        r300->hw.vpi.emit = emit_vpu_state;
 
                if (is_r500) {
-                       ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0);
+                       ALLOC_STATE(vpp, vpp, R300_VPP_CMDSIZE, 0);
                        r300->hw.vpp.cmd[0] =
                                cmdvpu(r300->radeon.radeonScreen, R500_PVS_CONST_START, 0);
                        if (r300->radeon.radeonScreen->kernel_mm)
-                               r300->hw.vpp.emit = emit_vpu_state;
+                               r300->hw.vpp.emit = emit_vpp_state;
 
                        ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0);
                        r300->hw.vps.cmd[0] =
@@ -806,11 +834,11 @@ void r300InitCmdBuf(r300ContextPtr r300)
                                        r300->hw.vpucp[i].emit = emit_vpu_state;
                        }
                } else {
-                       ALLOC_STATE(vpp, vpu, R300_VPP_CMDSIZE, 0);
+                       ALLOC_STATE(vpp, vpp, R300_VPP_CMDSIZE, 0);
                        r300->hw.vpp.cmd[0] =
                                cmdvpu(r300->radeon.radeonScreen, R300_PVS_CONST_START, 0);
                        if (r300->radeon.radeonScreen->kernel_mm)
-                               r300->hw.vpp.emit = emit_vpu_state;
+                               r300->hw.vpp.emit = emit_vpp_state;
 
                        ALLOC_STATE(vps, vpu, R300_VPS_CMDSIZE, 0);
                        r300->hw.vps.cmd[0] =
index 61ea5e4d9a35fb5c88fefe56ca20a9279996db0c..0646da46249ea9b5fe36714f0031ff838b03bdb9 100644 (file)
@@ -256,6 +256,19 @@ static void translate_fragment_program(GLcontext *ctx, struct r300_fragment_prog
 
        fp->InputsRead = compiler.Base.Program.InputsRead;
 
+       /* Clear the fog/wpos_attr if code accessing these
+        * attributes has been removed during compilation
+        */
+       if (fp->fog_attr != FRAG_ATTRIB_MAX) {
+               if (!(fp->InputsRead & (1 << fp->fog_attr)))
+                       fp->fog_attr = FRAG_ATTRIB_MAX;
+       }
+
+       if (fp->wpos_attr != FRAG_ATTRIB_MAX) {
+               if (!(fp->InputsRead & (1 << fp->wpos_attr)))
+                       fp->wpos_attr = FRAG_ATTRIB_MAX;
+       }
+
        rc_destroy(&compiler.Base);
 }
 
index 129004fee7850d97d0cea5572a9e6de699ee3699..a1fe3780294e5c6c04d113057531f80aceb397f6 100644 (file)
@@ -263,15 +263,25 @@ static struct r300_vertex_program *build_program(GLcontext *ctx,
        rc_move_output(&compiler.Base, VERT_RESULT_PSIZ, VERT_RESULT_PSIZ, WRITEMASK_X);
 
        if (vp->key.WPosAttr != FRAG_ATTRIB_MAX) {
-               rc_copy_output(&compiler.Base,
-                       VERT_RESULT_HPOS,
-                       vp->key.WPosAttr - FRAG_ATTRIB_TEX0 + VERT_RESULT_TEX0);
+               unsigned int vp_wpos_attr = vp->key.WPosAttr - FRAG_ATTRIB_TEX0 + VERT_RESULT_TEX0;
+
+               /* Set empty writemask for instructions writing to vp_wpos_attr
+                * before moving the wpos attr there.
+                * Such instructions will be removed by DCE.
+                */
+               rc_move_output(&compiler.Base, vp_wpos_attr, vp->key.WPosAttr, 0);
+               rc_copy_output(&compiler.Base, VERT_RESULT_HPOS, vp_wpos_attr);
        }
 
        if (vp->key.FogAttr != FRAG_ATTRIB_MAX) {
-               rc_move_output(&compiler.Base,
-                       VERT_RESULT_FOGC,
-                       vp->key.FogAttr - FRAG_ATTRIB_TEX0 + VERT_RESULT_TEX0, WRITEMASK_X);
+               unsigned int vp_fog_attr = vp->key.FogAttr - FRAG_ATTRIB_TEX0 + VERT_RESULT_TEX0;
+
+               /* Set empty writemask for instructions writing to vp_fog_attr
+                * before moving the fog attr there.
+                * Such instructions will be removed by DCE.
+                */
+               rc_move_output(&compiler.Base, vp_fog_attr, vp->key.FogAttr, 0);
+               rc_move_output(&compiler.Base, VERT_RESULT_FOGC, vp_fog_attr, WRITEMASK_X);
        }
 
        r3xx_compile_vertex_program(&compiler);
@@ -382,7 +392,11 @@ void r300SetupVertexProgram(r300ContextPtr rmesa)
        R300_STATECHANGE(rmesa, vap_cntl);
        R300_STATECHANGE(rmesa, vpp);
        param_count = r300VertexProgUpdateParams(ctx, prog, (float *)&rmesa->hw.vpp.cmd[R300_VPP_PARAM_0]);
-       bump_vpu_count(rmesa->hw.vpp.cmd, param_count);
+       if (!rmesa->radeon.radeonScreen->kernel_mm && param_count > 255 * 4) {
+               WARN_ONCE("Too many VP params, expect rendering errors\n");
+       }
+       /* Prevent the overflow (vpu.count is u8) */
+       bump_vpu_count(rmesa->hw.vpp.cmd, MIN2(255 * 4, param_count));
        param_count /= 4;
 
        r300EmitVertexProgram(rmesa, R300_PVS_CODE_START, &(prog->code));
@@ -395,6 +409,6 @@ void r300SetupVertexProgram(r300ContextPtr rmesa)
        rmesa->hw.pvs.cmd[R300_PVS_CNTL_1] = (0 << R300_PVS_FIRST_INST_SHIFT) | (inst_count << R300_PVS_XYZW_VALID_INST_SHIFT) |
                                (inst_count << R300_PVS_LAST_INST_SHIFT);
 
-       rmesa->hw.pvs.cmd[R300_PVS_CNTL_2] = (0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) | (param_count << R300_PVS_MAX_CONST_ADDR_SHIFT);
+       rmesa->hw.pvs.cmd[R300_PVS_CNTL_2] = (0 << R300_PVS_CONST_BASE_OFFSET_SHIFT) | ((param_count - 1) << R300_PVS_MAX_CONST_ADDR_SHIFT);
        rmesa->hw.pvs.cmd[R300_PVS_CNTL_3] = (inst_count << R300_PVS_LAST_VTX_SRC_INST_SHIFT);
 }
index b1a718a5f0a5dfa89273092e6920d6a1736fd1b7..df9c5872842ef1369fbf5522cf40dbd5309fbbf4 100644 (file)
@@ -93,7 +93,7 @@ NoOpUnused(void)
 
 #else
 
-static void
+static int
 NoOpGeneric(void)
 {
 #if !defined(_WIN32_WCE)
@@ -101,6 +101,7 @@ NoOpGeneric(void)
       fprintf(stderr, "GL User Error: calling GL function without a rendering context\n");
    }
 #endif
+   return 0;
 }
 
 #define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric