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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2011-08-04 16:25:08 UTC
  • mfrom: (1.2.37 upstream)
  • Revision ID: james.westby@ubuntu.com-20110804162508-kujg82moxerjg1kk
Tags: 7.11-0ubuntu1
* Fake merge from Debian experimental, updating previous changelog entries.
  New upstream release fixes infrequent X crash (LP: #800778).
  Remaining Ubuntu changes:
 - debian/control
    + Drop lesstif-dev from Build-Depends; it's in Universe.
    + Comment out GLw libs since it depends on lesstif-dev.
    + Drop i686 swx11 libgl package.
    + Add libdrm-dev to mesa-common-dev Depends.
    + Drop libwayland-dev from Build-Depends; it's in Universe.
    + Update Breaks for Ubuntu versions
    + Enable llvm on armel as well as i386 and amd64
  - debian/rules
    + Use --disable-glw for swx11 targets too.
    + Don't enable motif for swx11 targets.
    + Use lzma compression for binary debs to save CD space.
    + Drop unloved mach64 driver.
    + Use --enable-shared-dricore to claw back CD space.
    + Enable llvmpipe software rasteriser.
    + Enable llvm on armel as well as i386 and amd64
  - debian/patches
    + 100_no_abi_tag.patch
    + 101_ubuntu_hidden_glname.patch
    + 103_savage-expose_fbmodes_with_nonzero_alpha.patch
  - rules, libgl1-mesa-{glx,dev,swx11,swx11-dev}.install.in,
    libgl1-mesa-{glx,swx11}.{postinst,prerm}.in, libgl1-mesa-dev.links.in:
    Install libGL.so* in /usr/lib/mesa to allow things to work with
    alternatives.
  - debian/not-installed:
    + Drop i686 files; we don't build 686-optimised packages in the first
      place.
  - debian/gbp.conf
    + Point at Ubuntu branch to make git-buildpackage less narky.
  - 113_fix_tls.diff: Fix crashes in unrelated code due to TLS usage.
  - debian/patches/111_export_searchdirs_in_dripc.diff:
    + Add drisearchdirs variable to dri.pc so the Xserver can pick up the
      alternate DRI driver dirs.
  - debian/patches/115_llvm_dynamic_linking.diff
    + Dynamically link DRI drivers to libllvm.  Saves ~6MiB per DRI driver.
  - debian/patches/116_use_shared_galliumcore.diff:
  - debian/libgl1-mesa-dri.install.in:
    + Link gallium DRI drivers against shared gallium routines to save CD
      space.
* debian/rules:
* debian/libgl1-mesa-dri-experimental.install.{i386,amd64}.in
  - Explicitly install i915g only when it has been built, matching what is
    done with r300g.
* debian/rules:
* debian/control:
* debian/libegl1-mesa{,-dev}.install.in:
* debian/libegl1-mesa.symbols:
  - Enable the Wayland EGL backend.
* debian/rules:
* debian/libegl1-mesa.{postinst,prerm,install}.in:
* debian/libegl1-mesa-dev.{install,links}.in:
* debian/libgles{1,2}-mesa.install.in:
* debian/libgles{1,2}-mesa-dev.links.in:
* debian/libopenvg1-mesa{,-dev}.install.in:
* debian/libopenvg1-mesa-dev.links.in:
  - Use alternatives for libEGL to match the handling of libGL.
    libEGL (and associated GL|ES and OpenVG libraries) now live in
    /usr/lib/$MULTIARCH/mesa-egl.  (LP: #812639)
* debian/patches/118_fix_24bpp_software_rendering.diff:
  - Cherry pick upstream patch from master fixing graphical corruption when
    using a 24bpp framebuffer and software rendering. (LP: #810339)
* debian/rules:
* debian/clean:
  - Generate xmlpool pot file and clean up other po files for
    pkgbinarymangler's benefit (LP: #410264).
* debian/patches/119_r600g_gnome_shell_rendering_fix.diff:
  - Cherry pick upstream commit fixing rendering corruption in gnome-shell
    (and therefore likely Unity as well).

Show diffs side-by-side

added added

removed removed

Lines of Context:
2124
2124
{
2125
2125
   const struct gl_renderbuffer_attachment *att;
2126
2126
   struct gl_framebuffer *buffer;
 
2127
   GLenum err;
2127
2128
   GET_CURRENT_CONTEXT(ctx);
2128
2129
 
2129
2130
   ASSERT_OUTSIDE_BEGIN_END(ctx);
2130
2131
 
 
2132
   /* The error differs in GL andd GLES. */
 
2133
   err = ctx->API == API_OPENGL ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
 
2134
 
2131
2135
   buffer = get_framebuffer_target(ctx, target);
2132
2136
   if (!buffer) {
2133
2137
      _mesa_error(ctx, GL_INVALID_ENUM,
2178
2182
      }
2179
2183
      else {
2180
2184
         assert(att->Type == GL_NONE);
2181
 
         *params = 0;
 
2185
         if (ctx->API == API_OPENGL) {
 
2186
            *params = 0;
 
2187
         } else {
 
2188
            _mesa_error(ctx, GL_INVALID_ENUM,
 
2189
                        "glGetFramebufferAttachmentParameterivEXT(pname)");
 
2190
         }
2182
2191
      }
2183
2192
      return;
2184
2193
   case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:
2186
2195
         *params = att->TextureLevel;
2187
2196
      }
2188
2197
      else if (att->Type == GL_NONE) {
2189
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2198
         _mesa_error(ctx, err,
2190
2199
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2191
2200
      }
2192
2201
      else {
2204
2213
         }
2205
2214
      }
2206
2215
      else if (att->Type == GL_NONE) {
2207
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2216
         _mesa_error(ctx, err,
2208
2217
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2209
2218
      }
2210
2219
      else {
2222
2231
         }
2223
2232
      }
2224
2233
      else if (att->Type == GL_NONE) {
2225
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2234
         _mesa_error(ctx, err,
2226
2235
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2227
2236
      }
2228
2237
      else {
2236
2245
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2237
2246
      }
2238
2247
      else if (att->Type == GL_NONE) {
2239
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2248
         _mesa_error(ctx, err,
2240
2249
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2241
2250
      }
2242
2251
      else {
2257
2266
         return;
2258
2267
      }
2259
2268
      else if (att->Type == GL_NONE) {
2260
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2269
         _mesa_error(ctx, err,
2261
2270
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2262
2271
      }
2263
2272
      else {
2282
2291
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2283
2292
      }
2284
2293
      else if (att->Type == GL_NONE) {
2285
 
         _mesa_error(ctx, GL_INVALID_OPERATION,
 
2294
         _mesa_error(ctx, err,
2286
2295
                     "glGetFramebufferAttachmentParameterivEXT(pname)");
2287
2296
      }
2288
2297
      else if (att->Texture) {
2584
2593
      }
2585
2594
   }
2586
2595
 
 
2596
   if (!mask) {
 
2597
      return;
 
2598
   }
 
2599
 
2587
2600
   ASSERT(ctx->Driver.BlitFramebuffer);
2588
2601
   ctx->Driver.BlitFramebuffer(ctx,
2589
2602
                               srcX0, srcY0, srcX1, srcY1,