i965: Add support for GL_ARB_draw_buffers_blend.
authorEric Anholt <eric@anholt.net>
Wed, 25 Apr 2012 20:19:28 +0000 (13:19 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 4 May 2012 21:00:32 +0000 (14:00 -0700)
Tested with piglit fbo-draw-buffers-blend and intel oglconform.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
docs/GL3.txt
src/mesa/drivers/dri/i965/gen6_cc.c
src/mesa/drivers/dri/intel/intel_extensions.c

index 0a860bb3c1d63f209055c075c53d926c02c3c815..5fc6c69ba4b95d02d805d23a09ce7b5be976257d 100644 (file)
@@ -88,7 +88,7 @@ GL 4.0:
 
 GLSL 4.0                                             not started
 GL_ARB_texture_query_lod                             not started
-GL_ARB_draw_buffers_blend                            DONE (r600, softpipe)
+GL_ARB_draw_buffers_blend                            DONE (i965, r600, softpipe)
 GL_ARB_draw_indirect                                 not started
 GL_ARB_gpu_shader_fp64                               not started
 GL_ARB_sample_shading                                not started
index 8a805fa6d7769ed3e24e3fe6398f50bd7597e89e..b4c5329772f25a0287317d74738676660d7637cd 100644 (file)
@@ -92,12 +92,12 @@ gen6_upload_blend_state(struct brw_context *brw)
               intel_translate_logic_op(ctx->Color.LogicOp);
         }
       } else if (ctx->Color.BlendEnabled & (1 << b) && !integer) {
-        GLenum eqRGB = ctx->Color.Blend[0].EquationRGB;
-        GLenum eqA = ctx->Color.Blend[0].EquationA;
-        GLenum srcRGB = ctx->Color.Blend[0].SrcRGB;
-        GLenum dstRGB = ctx->Color.Blend[0].DstRGB;
-        GLenum srcA = ctx->Color.Blend[0].SrcA;
-        GLenum dstA = ctx->Color.Blend[0].DstA;
+        GLenum eqRGB = ctx->Color.Blend[b].EquationRGB;
+        GLenum eqA = ctx->Color.Blend[b].EquationA;
+        GLenum srcRGB = ctx->Color.Blend[b].SrcRGB;
+        GLenum dstRGB = ctx->Color.Blend[b].DstRGB;
+        GLenum srcA = ctx->Color.Blend[b].SrcA;
+        GLenum dstA = ctx->Color.Blend[b].DstA;
 
         if (eqRGB == GL_MIN || eqRGB == GL_MAX) {
            srcRGB = dstRGB = GL_ONE;
index a50ab777e9bb00e790d184f35e6a11f6ea390721..d4713c985898be95f612788edc8e5cbb5797ae02 100644 (file)
@@ -100,6 +100,10 @@ intelInitExtensions(struct gl_context *ctx)
        (intel->gen == 7 && intel->intelScreen->kernel_has_gen7_sol_reset))
       ctx->Extensions.EXT_transform_feedback = true;
 
+   if (intel->gen >= 6) {
+      ctx->Extensions.ARB_draw_buffers_blend = true;
+   }
+
    if (intel->gen >= 5)
       ctx->Extensions.EXT_timer_query = true;