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

« back to all changes in this revision

Viewing changes to src/gallium/drivers/identity/id_objects.h

  • 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:
31
31
 
32
32
#include "pipe/p_compiler.h"
33
33
#include "pipe/p_state.h"
34
 
#include "pipe/p_video_state.h"
35
34
 
36
35
#include "id_screen.h"
37
36
 
38
 
 
39
 
struct identity_buffer
 
37
struct identity_context;
 
38
 
 
39
 
 
40
struct identity_resource
40
41
{
41
 
   struct pipe_buffer base;
 
42
   struct pipe_resource base;
42
43
 
43
 
   struct pipe_buffer *buffer;
 
44
   struct pipe_resource *resource;
44
45
};
45
46
 
46
47
 
47
 
struct identity_texture
 
48
struct identity_sampler_view
48
49
{
49
 
   struct pipe_texture base;
 
50
   struct pipe_sampler_view base;
50
51
 
51
 
   struct pipe_texture *texture;
 
52
   struct pipe_sampler_view *sampler_view;
52
53
};
53
54
 
54
55
 
68
69
};
69
70
 
70
71
 
71
 
struct identity_video_surface
72
 
{
73
 
   struct pipe_video_surface base;
74
 
 
75
 
   struct pipe_video_surface *video_surface;
76
 
};
77
 
 
78
 
 
79
 
static INLINE struct identity_buffer *
80
 
identity_buffer(struct pipe_buffer *_buffer)
81
 
{
82
 
   if(!_buffer)
 
72
static INLINE struct identity_resource *
 
73
identity_resource(struct pipe_resource *_resource)
 
74
{
 
75
   if(!_resource)
83
76
      return NULL;
84
 
   (void)identity_screen(_buffer->screen);
85
 
   return (struct identity_buffer *)_buffer;
 
77
   (void)identity_screen(_resource->screen);
 
78
   return (struct identity_resource *)_resource;
86
79
}
87
80
 
88
 
static INLINE struct identity_texture *
89
 
identity_texture(struct pipe_texture *_texture)
 
81
static INLINE struct identity_sampler_view *
 
82
identity_sampler_view(struct pipe_sampler_view *_sampler_view)
90
83
{
91
 
   if(!_texture)
 
84
   if (!_sampler_view) {
92
85
      return NULL;
93
 
   (void)identity_screen(_texture->screen);
94
 
   return (struct identity_texture *)_texture;
 
86
   }
 
87
   return (struct identity_sampler_view *)_sampler_view;
95
88
}
96
89
 
97
90
static INLINE struct identity_surface *
99
92
{
100
93
   if(!_surface)
101
94
      return NULL;
102
 
   (void)identity_texture(_surface->texture);
 
95
   (void)identity_resource(_surface->texture);
103
96
   return (struct identity_surface *)_surface;
104
97
}
105
98
 
108
101
{
109
102
   if(!_transfer)
110
103
      return NULL;
111
 
   (void)identity_texture(_transfer->texture);
 
104
   (void)identity_resource(_transfer->resource);
112
105
   return (struct identity_transfer *)_transfer;
113
106
}
114
107
 
115
 
static INLINE struct identity_video_surface *
116
 
identity_video_surface(struct pipe_video_surface *_video_surface)
117
 
{
118
 
   if (!_video_surface) {
 
108
static INLINE struct pipe_resource *
 
109
identity_resource_unwrap(struct pipe_resource *_resource)
 
110
{
 
111
   if(!_resource)
 
112
      return NULL;
 
113
   return identity_resource(_resource)->resource;
 
114
}
 
115
 
 
116
static INLINE struct pipe_sampler_view *
 
117
identity_sampler_view_unwrap(struct pipe_sampler_view *_sampler_view)
 
118
{
 
119
   if (!_sampler_view) {
119
120
      return NULL;
120
121
   }
121
 
   (void)identity_screen(_video_surface->screen);
122
 
   return (struct identity_video_surface *)_video_surface;
123
 
}
124
 
 
125
 
static INLINE struct pipe_buffer *
126
 
identity_buffer_unwrap(struct pipe_buffer *_buffer)
127
 
{
128
 
   if(!_buffer)
129
 
      return NULL;
130
 
   return identity_buffer(_buffer)->buffer;
131
 
}
132
 
 
133
 
static INLINE struct pipe_texture *
134
 
identity_texture_unwrap(struct pipe_texture *_texture)
135
 
{
136
 
   if(!_texture)
137
 
      return NULL;
138
 
   return identity_texture(_texture)->texture;
 
122
   return identity_sampler_view(_sampler_view)->sampler_view;
139
123
}
140
124
 
141
125
static INLINE struct pipe_surface *
155
139
}
156
140
 
157
141
 
158
 
struct pipe_buffer *
159
 
identity_buffer_create(struct identity_screen *id_screen,
160
 
                       struct pipe_buffer *buffer);
161
 
 
162
 
void
163
 
identity_buffer_destroy(struct identity_buffer *id_buffer);
164
 
 
165
 
struct pipe_texture *
166
 
identity_texture_create(struct identity_screen *id_screen,
167
 
                        struct pipe_texture *texture);
168
 
 
169
 
void
170
 
identity_texture_destroy(struct identity_texture *id_texture);
 
142
struct pipe_resource *
 
143
identity_resource_create(struct identity_screen *id_screen,
 
144
                         struct pipe_resource *resource);
 
145
 
 
146
void
 
147
identity_resource_destroy(struct identity_resource *id_resource);
171
148
 
172
149
struct pipe_surface *
173
 
identity_surface_create(struct identity_texture *id_texture,
 
150
identity_surface_create(struct identity_resource *id_resource,
174
151
                        struct pipe_surface *surface);
175
152
 
176
153
void
177
154
identity_surface_destroy(struct identity_surface *id_surface);
178
155
 
 
156
struct pipe_sampler_view *
 
157
identity_sampler_view_create(struct identity_context *id_context,
 
158
                             struct identity_resource *id_resource,
 
159
                             struct pipe_sampler_view *view);
 
160
 
 
161
void
 
162
identity_sampler_view_destroy(struct identity_context *id_context,
 
163
                              struct identity_sampler_view *id_sampler_view);
 
164
 
179
165
struct pipe_transfer *
180
 
identity_transfer_create(struct identity_texture *id_texture,
 
166
identity_transfer_create(struct identity_context *id_context,
 
167
                         struct identity_resource *id_resource,
181
168
                         struct pipe_transfer *transfer);
182
169
 
183
170
void
184
 
identity_transfer_destroy(struct identity_transfer *id_transfer);
185
 
 
186
 
struct pipe_video_surface *
187
 
identity_video_surface_create(struct identity_screen *id_screen,
188
 
                              struct pipe_video_surface *video_surface);
189
 
 
190
 
void
191
 
identity_video_surface_destroy(struct identity_video_surface *id_video_surface);
 
171
identity_transfer_destroy(struct identity_context *id_context,
 
172
                          struct identity_transfer *id_transfer);
192
173
 
193
174
 
194
175
#endif /* ID_OBJECTS_H */