From 8ac7d7fa05f34dcded533ba17ed3cec1f69e8906 Mon Sep 17 00:00:00 2001 From: Li Peng Date: Thu, 8 Apr 2010 13:52:55 -0400 Subject: intel: Call intel_prepare_render() in intelClear() Make sure we have up to date buffers before we start looking at the tiling bits to determine how to clear. --- src/mesa/drivers/dri/intel/intel_blit.c | 2 -- src/mesa/drivers/dri/intel/intel_clear.c | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_blit.c b/src/mesa/drivers/dri/intel/intel_blit.c index 4ad42a7c28..2d676f635b 100644 --- a/src/mesa/drivers/dri/intel/intel_blit.c +++ b/src/mesa/drivers/dri/intel/intel_blit.c @@ -247,8 +247,6 @@ intelClearWithBlit(GLcontext *ctx, GLbitfield mask) GLuint buf; all = (cw == fb->Width && ch == fb->Height); - intel_prepare_render(intel); - /* Loop over all renderbuffers */ for (buf = 0; buf < BUFFER_COUNT && mask; buf++) { const GLbitfield bufBit = 1 << buf; diff --git a/src/mesa/drivers/dri/intel/intel_clear.c b/src/mesa/drivers/dri/intel/intel_clear.c index 03b24e2b51..3c22118866 100644 --- a/src/mesa/drivers/dri/intel/intel_clear.c +++ b/src/mesa/drivers/dri/intel/intel_clear.c @@ -90,6 +90,10 @@ intelClear(GLcontext *ctx, GLbitfield mask) tri_mask |= (mask & (BUFFER_BIT_FRONT_LEFT | BUFFER_BIT_BACK_LEFT)); } + /* Make sure we have up to date buffers before we start looking at + * the tiling bits to determine how to clear. */ + intel_prepare_render(intel); + /* HW stencil */ if (mask & BUFFER_BIT_STENCIL) { const struct intel_region *stencilRegion -- cgit v1.2.3 From bab6c0a03527f3d3b5124c6540cc167e3989c068 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Apr 2010 13:05:35 -0600 Subject: st/mesa: fix glDrawPixels(GL_DEPTH_COMPONENT) regression Commit 1454f20a991ddda35f1a2ffda953012078b407ba caused the regression. When the vertex shader emitted both a texcoord and color we were grabbing the wrong vertex attributes. Fix the draw_quad() code to put texcoords in slot[1] and color in slot[2]. That's a bit cleaner than changing the vertex shader code. Tested with progs/tests/zreaddraw.c --- src/mesa/state_tracker/st_cb_drawpixels.c | 41 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index b937288f8c..5fcfa86904 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -250,13 +250,13 @@ make_passthrough_vertex_shader(struct st_context *st, ureg_DECL_output( ureg, TGSI_SEMANTIC_POSITION, 0 ), ureg_DECL_vs_input( ureg, 0 )); - /* MOV result.texcoord0, vertex.texcoord0; */ + /* MOV result.texcoord0, vertex.attr[1]; */ ureg_MOV(ureg, ureg_DECL_output( ureg, TGSI_SEMANTIC_GENERIC, 0 ), ureg_DECL_vs_input( ureg, 1 )); if (passColor) { - /* MOV result.color0, vertex.color0; */ + /* MOV result.color0, vertex.attr[2]; */ ureg_MOV(ureg, ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, 0 ), ureg_DECL_vs_input( ureg, 2 )); @@ -430,7 +430,7 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z, const GLfloat sLeft = 0.0f, sRight = maxXcoord; const GLfloat tTop = invertTex ? maxYcoord : 0.0f; const GLfloat tBot = invertTex ? 0.0f : maxYcoord; - GLuint tex, i; + GLuint i; /* upper-left */ verts[0][0][0] = clip_x0; /* v[0].attr[0].x */ @@ -448,32 +448,31 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z, verts[3][0][0] = clip_x0; verts[3][0][1] = clip_y1; - tex = color ? 2 : 1; - verts[0][tex][0] = sLeft; /* v[0].attr[tex].s */ - verts[0][tex][1] = tTop; /* v[0].attr[tex].t */ - verts[1][tex][0] = sRight; - verts[1][tex][1] = tTop; - verts[2][tex][0] = sRight; - verts[2][tex][1] = tBot; - verts[3][tex][0] = sLeft; - verts[3][tex][1] = tBot; + verts[0][1][0] = sLeft; /* v[0].attr[1].S */ + verts[0][1][1] = tTop; /* v[0].attr[1].T */ + verts[1][1][0] = sRight; + verts[1][1][1] = tTop; + verts[2][1][0] = sRight; + verts[2][1][1] = tBot; + verts[3][1][0] = sLeft; + verts[3][1][1] = tBot; /* same for all verts: */ if (color) { for (i = 0; i < 4; i++) { - verts[i][0][2] = z; /*Z*/ - verts[i][0][3] = 1.0f; /*W*/ - verts[i][1][0] = color[0]; - verts[i][1][1] = color[1]; - verts[i][1][2] = color[2]; - verts[i][1][3] = color[3]; - verts[i][2][2] = 0.0f; /*R*/ - verts[i][2][3] = 1.0f; /*Q*/ + verts[i][0][2] = z; /* v[i].attr[0].z */ + verts[i][0][3] = 1.0f; /* v[i].attr[0].w */ + verts[i][2][0] = color[0]; /* v[i].attr[2].r */ + verts[i][2][1] = color[1]; /* v[i].attr[2].g */ + verts[i][2][2] = color[2]; /* v[i].attr[2].b */ + verts[i][2][3] = color[3]; /* v[i].attr[2].a */ + verts[i][1][2] = 0.0f; /* v[i].attr[1].R */ + verts[i][1][3] = 1.0f; /* v[i].attr[1].Q */ } } else { for (i = 0; i < 4; i++) { - verts[i][0][2] = z; /*Z*/ + verts[i][0][2] = z; /*Z*/ verts[i][0][3] = 1.0f; /*W*/ verts[i][1][2] = 0.0f; /*R*/ verts[i][1][3] = 1.0f; /*Q*/ -- cgit v1.2.3 From ffedd28c9c9f218efb989deb38451c3bfc0b1e0f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Apr 2010 13:09:01 -0600 Subject: progs/tests: added some debug code (disabled) --- progs/tests/zreaddraw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/progs/tests/zreaddraw.c b/progs/tests/zreaddraw.c index 7740695bb6..4d27b3a505 100644 --- a/progs/tests/zreaddraw.c +++ b/progs/tests/zreaddraw.c @@ -102,6 +102,19 @@ static void Display(void) /* read back scaled depth image */ glReadPixels(100, 0, 400, 400, GL_DEPTH_COMPONENT, GL_FLOAT, depth2); + + /* debug */ + if (0) { + int i; + float *z = depth2 + 400 * 200; + printf("z at y=200:\n"); + for (i = 0; i < 400; i++) { + printf("%5.3f ", z[i]); + if ((i + 1) % 12 == 0) + printf("\n"); + } + } + /* draw as luminance */ glPixelZoom(1.0, 1.0); glWindowPos2i(100, 0); -- cgit v1.2.3 From 3ad9a98ec2646caa283b6634fda38c482de33bab Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Apr 2010 13:10:51 -0600 Subject: docs: initial 7.8.2 release notes --- docs/relnotes-7.8.2.html | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/relnotes-7.8.2.html diff --git a/docs/relnotes-7.8.2.html b/docs/relnotes-7.8.2.html new file mode 100644 index 0000000000..85c132a29f --- /dev/null +++ b/docs/relnotes-7.8.2.html @@ -0,0 +1,46 @@ + + +Mesa Release Notes + + + + + + + +

Mesa 7.8.2 Release Notes / April, 5, 2010

+ +

+Mesa 7.8.2 is a bug fix release which fixes bugs found since the 7.8.1 release. +

+

+Mesa 7.8.2 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

+ + +

MD5 checksums

+
+tbd
+
+ + +

New features

+

None.

+ + +

Bug fixes

+
    +
  • Fixed Gallium glDrawPixels(GL_DEPTH_COMPONENT). +
+ + +

Changes

+

None.

+ + -- cgit v1.2.3 From 21cf976ad970bb407b53a863a30efbcd1c8bbf7c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 8 Apr 2010 13:11:05 -0600 Subject: docs: link to 7.8.2 release notes --- docs/relnotes.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes.html b/docs/relnotes.html index f7e2c691f7..39b02b842f 100644 --- a/docs/relnotes.html +++ b/docs/relnotes.html @@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.

    +
  • 7.8.2 release notes
  • 7.8.1 release notes
  • 7.8 release notes
  • 7.7.1 release notes -- cgit v1.2.3 From b22a00bff4aadd390dd8af6b5b05bd2833ec7f85 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 9 Apr 2010 10:03:31 -0600 Subject: mesa: fix instruction indexing bugs We were looping over instructions but only looking at the 0th instruction's opcode. Fixes fd.o bug 27566. --- src/mesa/shader/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index f4f701b546..f77a773753 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -625,7 +625,7 @@ replace_registers(struct prog_instruction *inst, GLuint numInst, GLuint i, j; for (i = 0; i < numInst; i++) { /* src regs */ - for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) { + for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) { if (inst[i].SrcReg[j].File == oldFile && inst[i].SrcReg[j].Index == oldIndex) { inst[i].SrcReg[j].File = newFile; @@ -652,7 +652,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst, { GLuint i, j; for (i = 0; i < numInst; i++) { - for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) { + for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) { GLuint f = inst[i].SrcReg[j].File; if (f == PROGRAM_CONSTANT || f == PROGRAM_UNIFORM || -- cgit v1.2.3