From f820b263db0d3bc46b4ea7b41bbe026cbf990430 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 4 Apr 2010 10:24:46 -0700 Subject: mesa: update_arrays() depends on program state. It uses ctx->VertexProgram._Current. Signed-off-by: Brian Paul --- src/mesa/main/state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index 589029db58..b971cc976e 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -582,9 +582,6 @@ _mesa_update_state_locked( GLcontext *ctx ) if (new_state & _DD_NEW_SEPARATE_SPECULAR) update_separate_specular( ctx ); - if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) - update_arrays( ctx ); - if (new_state & (_NEW_BUFFERS | _NEW_VIEWPORT)) update_viewport_matrix(ctx); @@ -620,6 +617,8 @@ _mesa_update_state_locked( GLcontext *ctx ) new_prog_state |= update_program( ctx ); } + if (new_state & (_NEW_ARRAY | _NEW_PROGRAM | _NEW_BUFFER_OBJECT)) + update_arrays( ctx ); out: new_prog_state |= update_program_constants(ctx); -- cgit v1.2.3 From 88b7329cdd8f3fc22f18a84175822f81930b4d50 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 5 Apr 2010 09:49:08 -0700 Subject: mesa: set version string to 7.8.1 --- Makefile | 2 +- src/mesa/main/version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/Makefile b/Makefile index 6e64134112..c81a2ec2d9 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ ultrix-gcc: # Rules for making release tarballs -VERSION=7.8 +VERSION=7.8.1 DIRECTORY = Mesa-$(VERSION) LIB_NAME = MesaLib-$(VERSION) DEMO_NAME = MesaDemos-$(VERSION) diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index 2e1d70c461..cd760beba4 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -34,8 +34,8 @@ /* Mesa version */ #define MESA_MAJOR 7 #define MESA_MINOR 8 -#define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.8" +#define MESA_PATCH 1 +#define MESA_VERSION_STRING "7.8.1" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From 0eea33b0696cee2cdea1e63a1714cec267d9b990 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 5 Apr 2010 11:00:52 -0600 Subject: softpipe: index the correct blend/mask state index Need to check pipe_blend_state::independent_blend_enable to determine which render target/index to use when checking blend enable and colormask state. This is part of the fix for piglit/fbo-drawbuffers --- src/gallium/drivers/softpipe/sp_quad_blend.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gallium/drivers/softpipe/sp_quad_blend.c b/src/gallium/drivers/softpipe/sp_quad_blend.c index d65307b7f6..ead489393e 100644 --- a/src/gallium/drivers/softpipe/sp_quad_blend.c +++ b/src/gallium/drivers/softpipe/sp_quad_blend.c @@ -744,6 +744,8 @@ blend_fallback(struct quad_stage *qs, for (cbuf = 0; cbuf < softpipe->framebuffer.nr_cbufs; cbuf++) { + /* which blend/mask state index to use: */ + const uint blend_buf = blend->independent_blend_enable ? cbuf : 0; float dest[4][QUAD_SIZE]; struct softpipe_cached_tile *tile = sp_get_cached_tile(softpipe->cbuf_cache[cbuf], @@ -771,11 +773,11 @@ blend_fallback(struct quad_stage *qs, if (blend->logicop_enable) { logicop_quad( qs, quadColor, dest ); } - else if (blend->rt[cbuf].blend_enable) { + else if (blend->rt[blend_buf].blend_enable) { blend_quad( qs, quadColor, dest, cbuf ); } - if (blend->rt[cbuf].colormask != 0xf) + if (blend->rt[blend_buf].colormask != 0xf) colormask_quad( blend->rt[cbuf].colormask, quadColor, dest); /* Output color values -- cgit v1.2.3 From 4b39a0da89f5b07d4a24bc9ce52693e6c2acfe99 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 3 Apr 2010 13:34:29 +1000 Subject: texenvprogram: fix for ARB_draw_buffers. piglit has a test called fbo-drawbuffers, this fails for me on r300g, and fixing the texenv program to use the DATA outputs fixes it. Signed-off-by: Dave Airlie --- src/mesa/main/texenvprogram.c | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c index 7b8a8b85f2..964ba13c70 100644 --- a/src/mesa/main/texenvprogram.c +++ b/src/mesa/main/texenvprogram.c @@ -1415,6 +1415,7 @@ create_new_program(GLcontext *ctx, struct state_key *key, struct texenv_fragment_program p; GLuint unit; struct ureg cf, out; + int i; memset(&p, 0, sizeof(p)); p.state = key; @@ -1436,7 +1437,13 @@ create_new_program(GLcontext *ctx, struct state_key *key, p.program->Base.NumAddressRegs = 0; p.program->Base.Parameters = _mesa_new_parameter_list(); p.program->Base.InputsRead = 0x0; - p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR; + + if (ctx->DrawBuffer->_NumColorDrawBuffers == 1) + p.program->Base.OutputsWritten = 1 << FRAG_RESULT_COLOR; + else { + for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) + p.program->Base.OutputsWritten |= (1 << (FRAG_RESULT_DATA0 + i)); + } for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { p.src_texture[unit] = undef; @@ -1485,22 +1492,28 @@ create_new_program(GLcontext *ctx, struct state_key *key, } cf = get_source( &p, SRC_PREVIOUS, 0 ); - out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR ); - if (key->separate_specular) { - /* Emit specular add. - */ - struct ureg s = register_input(&p, FRAG_ATTRIB_COL1); - emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef ); - emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef ); - } - else if (memcmp(&cf, &out, sizeof(cf)) != 0) { - /* Will wind up in here if no texture enabled or a couple of - * other scenarios (GL_REPLACE for instance). - */ - emit_arith( &p, OPCODE_MOV, out, WRITEMASK_XYZW, 0, cf, undef, undef ); - } + for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) { + if (ctx->DrawBuffer->_NumColorDrawBuffers == 1) + out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_COLOR ); + else { + out = make_ureg( PROGRAM_OUTPUT, FRAG_RESULT_DATA0 + i ); + } + if (key->separate_specular) { + /* Emit specular add. + */ + struct ureg s = register_input(&p, FRAG_ATTRIB_COL1); + emit_arith( &p, OPCODE_ADD, out, WRITEMASK_XYZ, 0, cf, s, undef ); + emit_arith( &p, OPCODE_MOV, out, WRITEMASK_W, 0, cf, undef, undef ); + } + else if (memcmp(&cf, &out, sizeof(cf)) != 0) { + /* Will wind up in here if no texture enabled or a couple of + * other scenarios (GL_REPLACE for instance). + */ + emit_arith( &p, OPCODE_MOV, out, WRITEMASK_XYZW, 0, cf, undef, undef ); + } + } /* Finish up: */ emit_arith( &p, OPCODE_END, undef, WRITEMASK_XYZW, 0, undef, undef, undef); -- cgit v1.2.3