~ubuntu-branches/ubuntu/precise/mesa/precise-updates

« back to all changes in this revision

Viewing changes to src/mesa/main/blend.c

  • Committer: Package Import Robot
  • Author(s): Robert Hooker
  • Date: 2012-02-02 12:05:48 UTC
  • mfrom: (1.7.1) (3.3.27 sid)
  • Revision ID: package-import@ubuntu.com-20120202120548-nvkma85jq0h4coix
Tags: 8.0~rc2-0ubuntu4
Drop drisearchdir handling, it is no longer needed with multiarch
and dri-alternates being removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
 * \return GL_TRUE if legal, GL_FALSE otherwise.
286
286
 */
287
287
static GLboolean
288
 
legal_blend_equation(const struct gl_context *ctx,
289
 
                     GLenum mode, GLboolean is_separate)
 
288
legal_blend_equation(const struct gl_context *ctx, GLenum mode)
290
289
{
291
290
   switch (mode) {
292
291
   case GL_FUNC_ADD:
 
292
   case GL_FUNC_SUBTRACT:
 
293
   case GL_FUNC_REVERSE_SUBTRACT:
293
294
      return GL_TRUE;
294
295
   case GL_MIN:
295
296
   case GL_MAX:
296
297
      return ctx->Extensions.EXT_blend_minmax;
297
 
   case GL_LOGIC_OP:
298
 
      /* glBlendEquationSeparate cannot take GL_LOGIC_OP as a parameter.
299
 
       */
300
 
      return ctx->Extensions.EXT_blend_logic_op && !is_separate;
301
 
   case GL_FUNC_SUBTRACT:
302
 
   case GL_FUNC_REVERSE_SUBTRACT:
303
 
      return ctx->Extensions.EXT_blend_subtract;
304
298
   default:
305
299
      return GL_FALSE;
306
300
   }
320
314
      _mesa_debug(ctx, "glBlendEquation(%s)\n",
321
315
                  _mesa_lookup_enum_by_nr(mode));
322
316
 
323
 
   if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
 
317
   if (!legal_blend_equation(ctx, mode)) {
324
318
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
325
319
      return;
326
320
   }
370
364
      return;
371
365
   }
372
366
 
373
 
   if (!legal_blend_equation(ctx, mode, GL_FALSE)) {
 
367
   if (!legal_blend_equation(ctx, mode)) {
374
368
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi");
375
369
      return;
376
370
   }
408
402
      return;
409
403
   }
410
404
 
411
 
   if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
 
405
   if (!legal_blend_equation(ctx, modeRGB)) {
412
406
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)");
413
407
      return;
414
408
   }
415
409
 
416
 
   if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
 
410
   if (!legal_blend_equation(ctx, modeA)) {
417
411
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)");
418
412
      return;
419
413
   }
464
458
      return;
465
459
   }
466
460
 
467
 
   if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) {
 
461
   if (!legal_blend_equation(ctx, modeRGB)) {
468
462
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)");
469
463
      return;
470
464
   }
471
465
 
472
 
   if (!legal_blend_equation(ctx, modeA, GL_TRUE)) {
 
466
   if (!legal_blend_equation(ctx, modeA)) {
473
467
      _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)");
474
468
      return;
475
469
   }
795
789
   ctx->Color.IndexMask = ~0u;
796
790
   memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask));
797
791
   ctx->Color.ClearIndex = 0;
798
 
   ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 );
799
 
   ASSIGN_4V( ctx->Color.ClearColorUnclamped, 0, 0, 0, 0 );
 
792
   ASSIGN_4V( ctx->Color.ClearColor.f, 0, 0, 0, 0 );
800
793
   ctx->Color.AlphaEnabled = GL_FALSE;
801
794
   ctx->Color.AlphaFunc = GL_ALWAYS;
802
795
   ctx->Color.AlphaRef = 0;
813
806
   ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 );
814
807
   ctx->Color.IndexLogicOpEnabled = GL_FALSE;
815
808
   ctx->Color.ColorLogicOpEnabled = GL_FALSE;
816
 
   ctx->Color._LogicOpEnabled = GL_FALSE;
817
809
   ctx->Color.LogicOp = GL_COPY;
818
810
   ctx->Color.DitherFlag = GL_TRUE;
819
811