~ubuntu-branches/ubuntu/natty/mesa/natty-proposed

« back to all changes in this revision

Viewing changes to src/mesa/drivers/common/meta.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Hooker, Robert Hooker, Christopher James Halse Rogers
  • Date: 2010-09-14 08:55:40 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100914085540-m4fpl0hdjlfd4jgz
Tags: 7.9~git20100909-0ubuntu1
[ Robert Hooker ]
* New upstream git snapshot up to commit 94118fe2d4b1e5 (LP: #631413)
* New features include ATI HD5xxx series support in r600, and a vastly
  improved glsl compiler.
* Remove pre-generated .pc's, use the ones generated at build time
  instead.
* Remove all references to mesa-utils now that its no longer shipped
  with the mesa source.
* Disable the experimental ARB_fragment_shader option by default on
  i915, it exposes incomplete functionality that breaks KDE compositing
  among other things. It can be enabled via driconf still. (LP: #628930).

[ Christopher James Halse Rogers ]
* debian/patches/04_osmesa_version.diff:
  - Refresh for new upstream
* Bugs fixed in this release:
  - Fixes severe rendering corruption in Unity on radeon (LP: #628727,
    LP: #596292, LP: #599741, LP: #630315, LP: #613694, LP: #599741).
  - Also fixes rendering in gnome-shell (LP: #578619).
  - Flickering in OpenGL apps on radeon (LP: #626943, LP: #610541).
  - Provides preliminary support for new intel chips (LP: #601052).
* debian/rules:
  - Update configure flags to match upstream reshuffling.
  - Explicitly remove gallium DRI drivers that we don't want to ship.
* Update debian/gbp.conf for this Maverick-specific packaging
* libegl1-mesa-dri-x11,kms: There are no longer separate kms or x11 drivers
  for EGL, libegl1-mesa-drivers now contains a single driver that provides
  both backends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "main/glheader.h"
35
35
#include "main/mtypes.h"
36
36
#include "main/imports.h"
 
37
#include "main/arbprogram.h"
37
38
#include "main/arrayobj.h"
38
39
#include "main/blend.h"
39
40
#include "main/bufferobj.h"
51
52
#include "main/polygon.h"
52
53
#include "main/readpix.h"
53
54
#include "main/scissor.h"
54
 
#include "main/shaders.h"
 
55
#include "main/shaderapi.h"
55
56
#include "main/state.h"
56
57
#include "main/stencil.h"
57
58
#include "main/texobj.h"
61
62
#include "main/texstate.h"
62
63
#include "main/varray.h"
63
64
#include "main/viewport.h"
64
 
#include "shader/program.h"
65
 
#include "shader/arbprogram.h"
 
65
#include "program/program.h"
66
66
#include "swrast/swrast.h"
67
67
#include "drivers/common/meta.h"
68
68
 
430
430
   if (state & META_SHADER) {
431
431
      if (ctx->Extensions.ARB_vertex_program) {
432
432
         save->VertexProgramEnabled = ctx->VertexProgram.Enabled;
433
 
         save->VertexProgram = ctx->VertexProgram.Current;
 
433
         _mesa_reference_vertprog(ctx, &save->VertexProgram,
 
434
                                  ctx->VertexProgram.Current);
434
435
         _mesa_set_enable(ctx, GL_VERTEX_PROGRAM_ARB, GL_FALSE);
435
436
      }
436
437
 
437
438
      if (ctx->Extensions.ARB_fragment_program) {
438
439
         save->FragmentProgramEnabled = ctx->FragmentProgram.Enabled;
439
 
         save->FragmentProgram = ctx->FragmentProgram.Current;
 
440
         _mesa_reference_fragprog(ctx, &save->FragmentProgram,
 
441
                                  ctx->FragmentProgram.Current);
440
442
         _mesa_set_enable(ctx, GL_FRAGMENT_PROGRAM_ARB, GL_FALSE);
441
443
      }
442
444
 
664
666
                          save->VertexProgramEnabled);
665
667
         _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, 
666
668
                                  save->VertexProgram);
 
669
         _mesa_reference_vertprog(ctx, &save->VertexProgram, NULL);
667
670
      }
668
671
 
669
672
      if (ctx->Extensions.ARB_fragment_program) {
671
674
                          save->FragmentProgramEnabled);
672
675
         _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
673
676
                                  save->FragmentProgram);
 
677
         _mesa_reference_fragprog(ctx, &save->FragmentProgram, NULL);
674
678
      }
675
679
 
676
680
      if (ctx->Extensions.ARB_shader_objects) {
721
725
      for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
722
726
         _mesa_reference_texobj(&ctx->Texture.Unit[0].CurrentTex[tgt],
723
727
                                save->CurrentTexture[tgt]);
 
728
         _mesa_reference_texobj(&save->CurrentTexture[tgt], NULL);
724
729
      }
725
730
 
726
731
      /* Re-enable textures, texgen */
2082
2087
   }
2083
2088
 
2084
2089
   bitmap1 = _mesa_map_pbo_source(ctx, &unpackSave, bitmap1);
2085
 
   if (!bitmap1)
 
2090
   if (!bitmap1) {
 
2091
      _mesa_meta_end(ctx);
2086
2092
      return;
 
2093
   }
2087
2094
 
2088
2095
   bitmap8 = (GLubyte *) calloc(1, width * height);
2089
2096
   if (bitmap8) {
2393
2400
         break;
2394
2401
      }
2395
2402
 
 
2403
      /* Set MaxLevel large enough to hold the new level when we allocate it  */
 
2404
      _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, dstLevel);
 
2405
 
2396
2406
      /* Create empty dest image */
2397
2407
      if (target == GL_TEXTURE_1D) {
2398
2408
         _mesa_TexImage1D(target, dstLevel, srcImage->InternalFormat,
2560
2570
      return;
2561
2571
   }
2562
2572
 
2563
 
   if (texImage->TexFormat == MESA_FORMAT_NONE)
2564
 
      texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx,
2565
 
                                                            internalFormat,
2566
 
                                                            format,
2567
 
                                                            type);
2568
 
 
2569
2573
   _mesa_unlock_texture(ctx, texObj); /* need to unlock first */
2570
2574
 
2571
2575
   /*
2594
2598
                              postConvWidth, postConvHeight, 1,
2595
2599
                              border, internalFormat);
2596
2600
 
 
2601
   _mesa_choose_texture_format(ctx, texObj, texImage, target, level,
 
2602
                               internalFormat, GL_NONE, GL_NONE);
 
2603
 
2597
2604
   /*
2598
2605
    * Store texture data (with pixel transfer ops)
2599
2606
    */