Subversion Repositories Kolibri OS

Rev

Rev 3263 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3263 Rev 3278
Line 72... Line 72...
72
#define SRV_I915_GEM_SET_DOMAIN     29
72
#define SRV_I915_GEM_SET_DOMAIN     29
73
#define SRV_I915_GEM_MMAP           30
73
#define SRV_I915_GEM_MMAP           30
74
#define SRV_I915_GEM_THROTTLE       32
74
#define SRV_I915_GEM_THROTTLE       32
75
#define SRV_FBINFO                  33
75
#define SRV_FBINFO                  33
76
#define SRV_I915_GEM_EXECBUFFER2    34 
76
#define SRV_I915_GEM_EXECBUFFER2    34 
-
 
77
#define SRV_MASK_UPDATE             35
Line 77... Line 78...
77
 
78
 
Line 78... Line 79...
78
#define SRV_I915_GEM_MMAP_GTT       31
79
#define SRV_I915_GEM_MMAP_GTT       31
Line 110... Line 111...
110
    PIXMAN_r8g8b8x8 =    PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8),
111
    PIXMAN_r8g8b8x8 =    PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8),
111
    PIXMAN_x14r6g6b6 =   PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,6,6,6),
112
    PIXMAN_x14r6g6b6 =   PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,6,6,6),
112
    PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10),
113
    PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10),
113
    PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10),
114
    PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10),
114
    PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10),
115
    PIXMAN_x2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,10,10,10),
115
    PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10)
116
    PIXMAN_a2b10g10r10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,2,10,10,10),
-
 
117
 
-
 
118
    PIXMAN_a8 =		 PIXMAN_FORMAT(8,PIXMAN_TYPE_A,8,0,0,0)
Line 116... Line 119...
116
 
119
    
Line -... Line 120...
-
 
120
} pixman_format_code_t;
-
 
121
 
-
 
122
typedef enum _PictFormatShort {
-
 
123
 
-
 
124
    PICT_a8r8g8b8 = PIXMAN_a8r8g8b8,
-
 
125
    PICT_x8r8g8b8 = PIXMAN_x8r8g8b8,
-
 
126
    PICT_a8b8g8r8 = PIXMAN_a8b8g8r8,
-
 
127
    PICT_x8b8g8r8 = PIXMAN_x8b8g8r8,
-
 
128
    PICT_b8g8r8a8 = PIXMAN_b8g8r8a8,
-
 
129
    PICT_b8g8r8x8 = PIXMAN_b8g8r8x8,
-
 
130
 
-
 
131
/* 8bpp formats */
-
 
132
    PICT_a8 = PIXMAN_a8,
-
 
133
 
-
 
134
/* 4bpp formats */
-
 
135
} PictFormatShort;
-
 
136
 
-
 
137
#define RepeatNone                          0
-
 
138
#define RepeatNormal                        1
-
 
139
#define RepeatPad                           2
-
 
140
#define RepeatReflect                       3
-
 
141
 
-
 
142
#define PictFilterNearest	0
-
 
143
#define PictFilterBilinear	1
-
 
144
 
-
 
145
#define PictFilterFast		2
-
 
146
#define PictFilterGood		3
-
 
147
#define PictFilterBest		4
-
 
148
 
-
 
149
#define PictFilterConvolution	5
-
 
150
 
-
 
151
typedef int32_t			pixman_fixed_16_16_t;
-
 
152
typedef pixman_fixed_16_16_t	pixman_fixed_t;
-
 
153
 
-
 
154
struct pixman_transform
-
 
155
{
Line 117... Line 156...
117
} pixman_format_code_t;
156
    pixman_fixed_t	matrix[3][3];
118
 
157
};
Line 119... Line 158...
119
 
158
 
120
typedef unsigned long   Picture;
159
typedef unsigned long   Picture;
-
 
160
typedef unsigned long   PictFormat;
-
 
161
 
-
 
162
typedef struct _Pixmap  *PixmapPtr;
-
 
163
typedef struct _Picture *PicturePtr;
-
 
164
typedef struct _Drawable *DrawablePtr;
-
 
165
typedef struct _PictFormat *PictFormatPtr;
Line 121... Line 166...
121
typedef unsigned long   PictFormat;
166
 
122
 
167
typedef struct pixman_transform PictTransform, *PictTransformPtr;
123
typedef struct _Pixmap  *PixmapPtr;
168
 
124
typedef struct _Picture *PicturePtr;
169
 
Line 152... Line 197...
152
    unsigned usage_hint;        /* see CREATE_PIXMAP_USAGE_* */
197
    unsigned usage_hint;        /* see CREATE_PIXMAP_USAGE_* */
Line 153... Line 198...
153
 
198
 
154
    PixmapPtr master_pixmap;    /* pointer to master copy of pixmap for pixmap sharing */
199
    PixmapPtr master_pixmap;    /* pointer to master copy of pixmap for pixmap sharing */
Line -... Line 200...
-
 
200
} PixmapRec;
-
 
201
 
-
 
202
typedef struct _PictFormat {
-
 
203
    uint32_t id;
-
 
204
    uint32_t format;              /* except bpp */
-
 
205
    unsigned char type;
-
 
206
    unsigned char depth;
-
 
207
//    DirectFormatRec direct;
-
 
208
//   IndexFormatRec index;
-
 
209
} PictFormatRec;
-
 
210
 
-
 
211
typedef struct _Picture {
-
 
212
    DrawablePtr pDrawable;
-
 
213
//    PictFormatPtr pFormat;
-
 
214
    PictFormatShort format;     /* PICT_FORMAT */
-
 
215
    int refcnt;
-
 
216
    uint32_t id;
-
 
217
    unsigned int repeat:1;
-
 
218
    unsigned int graphicsExposures:1;
-
 
219
    unsigned int subWindowMode:1;
-
 
220
    unsigned int polyEdge:1;
-
 
221
    unsigned int polyMode:1;
-
 
222
    unsigned int freeCompClip:1;
-
 
223
    unsigned int clientClipType:2;
-
 
224
    unsigned int componentAlpha:1;
-
 
225
    unsigned int repeatType:2;
-
 
226
    unsigned int filter:3;
-
 
227
//    unsigned int stateChanges:CPLastBit;
-
 
228
//    unsigned int unused:18 - CPLastBit;
-
 
229
 
-
 
230
//    PicturePtr alphaMap;
-
 
231
 
-
 
232
//    PictTransform *transform;
-
 
233
 
-
 
234
//    SourcePictPtr pSourcePict;
-
 
235
//    xFixed *filter_params;
-
 
236
//    int filter_nparams;
-
 
237
} PictureRec;
-
 
238
 
-
 
239
#define PolyModePrecise			    0
Line 155... Line 240...
155
} PixmapRec;
240
#define PolyModeImprecise		    1
156
 
241
 
157
 
242
 
158
struct sna_fb
243
struct sna_fb
Line 260... Line 345...
260
	       size_t cpu_bo_bytes;
345
	       size_t cpu_bo_bytes;
261
	} debug_memory;
346
	} debug_memory;
262
#endif
347
#endif
263
};
348
};
Line 264... Line -...
264
 
-
 
265
static inline int vertex_space(struct sna *sna)
-
 
266
{
-
 
267
    return sna->render.vertex_size - sna->render.vertex_used;
-
 
268
}
-
 
269
 
-
 
270
static inline void vertex_emit(struct sna *sna, float v)
-
 
271
{
-
 
272
    assert(sna->render.vertex_used < sna->render.vertex_size);
-
 
273
    sna->render.vertices[sna->render.vertex_used++] = v;
-
 
274
}
-
 
275
 
-
 
276
static inline void vertex_emit_2s(struct sna *sna, int16_t x, int16_t y)
-
 
277
{
-
 
278
    int16_t *v = (int16_t *)&sna->render.vertices[sna->render.vertex_used++];
-
 
279
    assert(sna->render.vertex_used <= sna->render.vertex_size);
-
 
280
    v[0] = x;
-
 
281
    v[1] = y;
-
 
282
}
-
 
283
 
-
 
284
static inline void batch_emit(struct sna *sna, uint32_t dword)
-
 
285
{
-
 
286
    assert(sna->kgem.mode != KGEM_NONE);
-
 
287
    assert(sna->kgem.nbatch + KGEM_BATCH_RESERVED < sna->kgem.surface);
-
 
288
    sna->kgem.batch[sna->kgem.nbatch++] = dword;
-
 
Line 289... Line 349...
289
}
349
 
290
 
350
 
291
#ifndef ARRAY_SIZE
351
#ifndef ARRAY_SIZE