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

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/util/u_simple_screen.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:
1
 
/**************************************************************************
2
 
 *
3
 
 * Copyright 2009 VMware, Inc.
4
 
 * All Rights Reserved.
5
 
 *
6
 
 * Permission is hereby granted, free of charge, to any person obtaining a
7
 
 * copy of this software and associated documentation files (the
8
 
 * "Software"), to deal in the Software without restriction, including
9
 
 * without limitation the rights to use, copy, modify, merge, publish,
10
 
 * distribute, sub license, and/or sell copies of the Software, and to
11
 
 * permit persons to whom the Software is furnished to do so, subject to
12
 
 * the following conditions:
13
 
 *
14
 
 * The above copyright notice and this permission notice (including the
15
 
 * next paragraph) shall be included in all copies or substantial portions
16
 
 * of the Software.
17
 
 *
18
 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19
 
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
 
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21
 
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22
 
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23
 
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24
 
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
 
 *
26
 
 **************************************************************************/
27
 
 
28
 
#include "u_simple_screen.h"
29
 
 
30
 
#include "pipe/p_screen.h"
31
 
#include "pipe/p_state.h"
32
 
#include "util/u_simple_screen.h"
33
 
 
34
 
 
35
 
static struct pipe_buffer *
36
 
pass_buffer_create(struct pipe_screen *screen,
37
 
                   unsigned alignment,
38
 
                   unsigned usage,
39
 
                   unsigned size)
40
 
{
41
 
   struct pipe_buffer *buffer =
42
 
      screen->winsys->buffer_create(screen->winsys, alignment, usage, size);
43
 
 
44
 
   buffer->screen = screen;
45
 
 
46
 
   return buffer;
47
 
}
48
 
 
49
 
static struct pipe_buffer *
50
 
pass_user_buffer_create(struct pipe_screen *screen,
51
 
                        void *ptr,
52
 
                        unsigned bytes)
53
 
{
54
 
   struct pipe_buffer *buffer =
55
 
      screen->winsys->user_buffer_create(screen->winsys, ptr, bytes);
56
 
 
57
 
   buffer->screen = screen;
58
 
 
59
 
   return buffer;
60
 
}
61
 
 
62
 
static struct pipe_buffer *
63
 
pass_surface_buffer_create(struct pipe_screen *screen,
64
 
                           unsigned width, unsigned height,
65
 
                           enum pipe_format format,
66
 
                           unsigned usage,
67
 
                           unsigned tex_usage,
68
 
                           unsigned *stride)
69
 
{
70
 
   struct pipe_buffer *buffer =
71
 
      screen->winsys->surface_buffer_create(screen->winsys, width, height,
72
 
                                            format, usage, tex_usage, stride);
73
 
 
74
 
   buffer->screen = screen;
75
 
 
76
 
   return buffer;
77
 
}
78
 
 
79
 
static void *
80
 
pass_buffer_map(struct pipe_screen *screen,
81
 
                struct pipe_buffer *buf,
82
 
                unsigned usage)
83
 
{
84
 
   return screen->winsys->buffer_map(screen->winsys, buf, usage);
85
 
}
86
 
 
87
 
static void
88
 
pass_buffer_unmap(struct pipe_screen *screen,
89
 
                  struct pipe_buffer *buf)
90
 
{
91
 
   screen->winsys->buffer_unmap(screen->winsys, buf);
92
 
}
93
 
 
94
 
static void
95
 
pass_buffer_destroy(struct pipe_buffer *buf)
96
 
{
97
 
   buf->screen->winsys->buffer_destroy(buf);
98
 
}
99
 
 
100
 
 
101
 
static void
102
 
pass_flush_frontbuffer(struct pipe_screen *screen,
103
 
                       struct pipe_surface *surf,
104
 
                       void *context_private)
105
 
{
106
 
   screen->winsys->flush_frontbuffer(screen->winsys, surf, context_private);
107
 
}
108
 
 
109
 
static void
110
 
pass_fence_reference(struct pipe_screen *screen,
111
 
                     struct pipe_fence_handle **ptr,
112
 
                     struct pipe_fence_handle *fence)
113
 
{
114
 
   screen->winsys->fence_reference(screen->winsys, ptr, fence);
115
 
}
116
 
 
117
 
static int
118
 
pass_fence_signalled(struct pipe_screen *screen,
119
 
                     struct pipe_fence_handle *fence,
120
 
                     unsigned flag)
121
 
{
122
 
   return screen->winsys->fence_signalled(screen->winsys, fence, flag);
123
 
}
124
 
 
125
 
static int
126
 
pass_fence_finish(struct pipe_screen *screen,
127
 
                  struct pipe_fence_handle *fence,
128
 
                  unsigned flag)
129
 
{
130
 
   return screen->winsys->fence_finish(screen->winsys, fence, flag);
131
 
}
132
 
 
133
 
void
134
 
u_simple_screen_init(struct pipe_screen *screen)
135
 
{
136
 
   screen->buffer_create = pass_buffer_create;
137
 
   screen->user_buffer_create = pass_user_buffer_create;
138
 
   screen->surface_buffer_create = pass_surface_buffer_create;
139
 
 
140
 
   screen->buffer_map = pass_buffer_map;
141
 
   screen->buffer_unmap = pass_buffer_unmap;
142
 
   screen->buffer_destroy = pass_buffer_destroy;
143
 
   screen->flush_frontbuffer = pass_flush_frontbuffer;
144
 
   screen->fence_reference = pass_fence_reference;
145
 
   screen->fence_signalled = pass_fence_signalled;
146
 
   screen->fence_finish = pass_fence_finish;
147
 
}
148
 
 
149
 
const char *
150
 
u_simple_screen_winsys_name(struct pipe_screen *screen)
151
 
{
152
 
   return screen->winsys->get_name(screen->winsys);
153
 
}