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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/svga/svga_pipe_blit.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:
23
23
 *
24
24
 **********************************************************/
25
25
 
26
 
#include "svga_screen_texture.h"
 
26
#include "svga_resource_texture.h"
27
27
#include "svga_context.h"
28
28
#include "svga_debug.h"
29
29
#include "svga_cmd.h"
 
30
#include "svga_surface.h"
30
31
 
31
32
#define FILE_DEBUG_FLAG DEBUG_BLIT
32
33
 
33
34
 
 
35
/* XXX I got my doubts about this, should maybe use svga_texture_copy_handle directly? */
34
36
static void svga_surface_copy(struct pipe_context *pipe,
35
 
                              struct pipe_surface *dest,
36
 
                              unsigned destx, unsigned desty,
37
 
                              struct pipe_surface *src,
38
 
                              unsigned srcx, unsigned srcy,
 
37
                              struct pipe_resource* dst_tex,
 
38
                              struct pipe_subresource subdst,
 
39
                              unsigned dstx, unsigned dsty, unsigned dstz,
 
40
                              struct pipe_resource* src_tex,
 
41
                              struct pipe_subresource subsrc,
 
42
                              unsigned srcx, unsigned srcy, unsigned srcz,
39
43
                              unsigned width, unsigned height)
40
44
{
41
45
   struct svga_context *svga = svga_context(pipe);
 
46
   struct pipe_screen *screen = pipe->screen;
42
47
   SVGA3dCopyBox *box;
43
48
   enum pipe_error ret;
 
49
   struct pipe_surface *srcsurf, *dstsurf;
44
50
 
45
51
   svga_hwtnl_flush_retry( svga );
46
52
 
 
53
   srcsurf = screen->get_tex_surface(screen, src_tex,
 
54
                                     subsrc.face, subsrc.level, srcz,
 
55
                                     PIPE_BIND_SAMPLER_VIEW);
 
56
 
 
57
   dstsurf = screen->get_tex_surface(screen, dst_tex,
 
58
                                     subdst.face, subdst.level, dstz,
 
59
                                     PIPE_BIND_RENDER_TARGET);
 
60
 
47
61
   SVGA_DBG(DEBUG_DMA, "blit to sid %p (%d,%d), from sid %p (%d,%d) sz %dx%d\n",
48
 
            svga_surface(dest)->handle,
49
 
            destx, desty,
50
 
            svga_surface(src)->handle,
 
62
            svga_surface(dstsurf)->handle,
 
63
            dstx, dsty,
 
64
            svga_surface(srcsurf)->handle,
51
65
            srcx, srcy,
52
66
            width, height);
53
67
 
54
68
   ret = SVGA3D_BeginSurfaceCopy(svga->swc,
55
 
                                 src,
56
 
                                 dest,
 
69
                                 srcsurf,
 
70
                                 dstsurf,
57
71
                                 &box,
58
72
                                 1);
59
73
   if(ret != PIPE_OK) {
61
75
      svga_context_flush(svga, NULL);
62
76
 
63
77
      ret = SVGA3D_BeginSurfaceCopy(svga->swc,
64
 
                                    src,
65
 
                                    dest,
 
78
                                    srcsurf,
 
79
                                    dstsurf,
66
80
                                    &box,
67
81
                                    1);
68
82
      assert(ret == PIPE_OK);
69
83
   }
70
84
 
71
 
   box->x = destx;
72
 
   box->y = desty;
 
85
   box->x = dstx;
 
86
   box->y = dsty;
73
87
   box->z = 0;
74
88
   box->w = width;
75
89
   box->h = height;
80
94
 
81
95
   SVGA_FIFOCommitAll(svga->swc);
82
96
 
83
 
   svga_surface(dest)->dirty = TRUE;
84
 
   svga_propagate_surface(pipe, dest);
 
97
   svga_surface(dstsurf)->dirty = TRUE;
 
98
   svga_propagate_surface(pipe, dstsurf);
 
99
 
 
100
   pipe_surface_reference(&srcsurf, NULL);
 
101
   pipe_surface_reference(&dstsurf, NULL);
 
102
 
85
103
}
86
104
 
87
105
 
88
106
void
89
107
svga_init_blit_functions(struct svga_context *svga)
90
108
{
91
 
   svga->pipe.surface_copy = svga_surface_copy;
 
109
   svga->pipe.resource_copy_region = svga_surface_copy;
92
110
}