LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
xe.h
Go to the documentation of this file.
1#ifndef __xe_h
2#define __xe_h
3
4#include <xetypes.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10#define XE_MAX_INDICES_PER_DRAW 65535
11
12#define SHADER_TYPE_PIXEL 1
13#define SHADER_TYPE_VERTEX 0
14
15#define XE_PRIMTYPE_POINTLIST 1
16#define XE_PRIMTYPE_LINELIST 2
17#define XE_PRIMTYPE_LINESTRIP 3
18#define XE_PRIMTYPE_TRIANGLELIST 4
19#define XE_PRIMTYPE_TRIANGLEFAN 5
20#define XE_PRIMTYPE_TRIANGLESTRIP 6
21#define XE_PRIMTYPE_RECTLIST 8
22#define XE_PRIMTYPE_QUADLIST 13
23
24#define XE_CMP_NEVER 0
25#define XE_CMP_LESS 1
26#define XE_CMP_EQUAL 2
27#define XE_CMP_LESSEQUAL 3
28#define XE_CMP_GREATER 4
29#define XE_CMP_NOTEQUAL 5
30#define XE_CMP_GREATEREQUAL 6
31#define XE_CMP_ALWAYS 7
32
33#define XE_BLEND_ZERO 0
34#define XE_BLEND_ONE 1
35#define XE_BLEND_SRCCOLOR 4
36#define XE_BLEND_INVSRCCOLOR 5
37#define XE_BLEND_SRCALPHA 6
38#define XE_BLEND_INVSRCALPHA 7
39#define XE_BLEND_DESTCOLOR 8
40#define XE_BLEND_INVDESTCOLOR 9
41#define XE_BLEND_DESTALPHA 10
42#define XE_BLEND_INVDESTALPHA 11
43#define XE_BLEND_BLENDFACTOR 12
44#define XE_BLEND_INVBLENDFACTOR 13
45#define XE_BLEND_CONSTANTALPHA 14
46#define XE_BLEND_INVCONSTANTALPHA 15
47#define XE_BLEND_SRCALPHASAT 16
48
49#define XE_CULL_NONE 0
50#define XE_CULL_CW 2
51#define XE_CULL_CCW 6
52
53#define XE_BLENDOP_ADD 0
54#define XE_BLENDOP_SUBTRACT 1
55#define XE_BLENDOP_REVSUBTRACT 4
56#define XE_BLENDOP_MIN 2
57#define XE_BLENDOP_MAX 3
58
59#define XE_STENCILOP_KEEP 0
60#define XE_STENCILOP_ZERO 1
61#define XE_STENCILOP_REPLACE 2
62#define XE_STENCILOP_INCRSAT 3
63#define XE_STENCILOP_DECRSAT 4
64#define XE_STENCILOP_INVERT 5
65#define XE_STENCILOP_INCR 6
66#define XE_STENCILOP_DECR 7
67
68#define XE_TEXADDR_WRAP 0
69#define XE_TEXADDR_MIRROR 1
70#define XE_TEXADDR_CLAMP 2
71#define XE_TEXADDR_MIRRORONCE 3
72#define XE_TEXADDR_BORDER_HALF 4
73#define XE_TEXADDR_MIRRORONCE_BORDER_HALF 5
74#define XE_TEXADDR_BORDER 6
75#define XE_TEXADDR_MIRRORONCE_BORDER 7
76
77#define XE_CLIP_ENABLE_PLANE0 0x0001
78#define XE_CLIP_ENABLE_PLANE1 0x0002
79#define XE_CLIP_ENABLE_PLANE2 0x0004
80#define XE_CLIP_ENABLE_PLANE3 0x0008
81#define XE_CLIP_ENABLE_PLANE4 0x0010
82#define XE_CLIP_ENABLE_PLANE5 0x0020
83#define XE_CLIP_MASTER_DISABLE 0x10000
84
85#define XE_FILL_POINT 0x01
86#define XE_FILL_WIREFRAME 0x25
87#define XE_FILL_SOLID 0x00
88
90{
91 void *start;
93 int size;
94 int flags;
95};
96
97#define XE_SHADER_MAX_INSTANCES 16
98
99#pragma pack(push,1)
100
102{
103 void *shader;
105 /* we might need more than once instance if we want to use a shader with different VBFs */
108};
109
110 /* the shader file format */
112{
115
117
119
121};
122
124{
127
129};
130
132{
134};
135
136#pragma pack(pop)
137
138#define SWIZZLE_XYZW 0x688
139#define SWIZZLE_XYZ1 0xA88 // 101 010 001 000
140#define SWIZZLE_XY01 0xA08 // 101 000 001 000
141#define SWIZZLE_XY__ 0xFC8 // 111 111 001 000
142#define SWIZZLE_XYZ_ 0xEC8 // 111 010 001 000
143#define SWIZZLE_XYZ0 0x0C8 // 000 010 001 000
144#define SWIZZLE_XY0_ 0xE08 // 111 000 001 000
145
146 /* each vertex buffer element fills FOUR FLOAT components.
147 the 'usage' specifies which of them (position, color, texuv, ..)
148 the 'fmt' specified in which form they lie in memory. if you
149 specify float3, the remaining component will be filled up with
150 the 0 or 1, according to the swizzling.
151 */
152
153#define XE_TYPE_FLOAT2 37
154#define XE_TYPE_FLOAT3 57
155#define XE_TYPE_FLOAT4 38
156#define XE_TYPE_UBYTE4 6
157
158 /* the usage must match the shader */
159#define XE_USAGE_POSITION 0
160#define XE_USAGE_BLENDWEIGHTS 1
161#define XE_USAGE_BLENDINDICES 2
162#define XE_USAGE_NORMAL 3
163#define XE_USAGE_PSIZE 4
164#define XE_USAGE_TEXCOORD 5
165#define XE_USAGE_TANGENT 6
166#define XE_USAGE_BINORMAL 7
167#define XE_USAGE_TESSFACTOR 8
168#define XE_USAGE_POSITIONT 9
169#define XE_USAGE_COLOR 10
170#define XE_USAGE_FOG 11
171#define XE_USAGE_DEPTH 12
172#define XE_USAGE_SAMPLE 13
173
174 /* texture formats */
175#define XE_FMT_MASK 0x3F
176#define XE_FMT_8 2
177#define XE_FMT_8888 6
178#define XE_FMT_5551 3
179#define XE_FMT_565 4
180#define XE_FMT_16161616 26
181#define XE_FMT_ARGB 0x80
182#define XE_FMT_BGRA 0x00
183
184#define XE_FMT_16BE 0x40
185
187{
188 int usage; /* XE_USAGE */
189 int index;
190 int fmt; /* XE_TYPE */
191};
192
194{
195 int num;
196 struct XenosVBFElement e[10];
197};
198
200{
203 int bypp;
204
207
208 void *base;
209
211};
212
214{
217 int size, space; /* in DWORDs */
218 void *base;
219
221
223};
224
225#define XE_FMT_INDEX16 0
226#define XE_FMT_INDEX32 1
227
229{
231 int indices; /* actual size, in indices */
232 int size; /* in bytes */
233 void *base;
234 int fmt; /* 0 for 16bit, 1 for 32bit */
235
237};
238
240{
241 float alu_constants[256 * 4 * 2];
243
244 u32 alu_dirty; /* 16 * 4 constants per bit */
245 u32 fetch_dirty; /* 3 * 2 per bit */
246
247 float clipplane[6*4];
248
251 unsigned int alpharef; // should be moved into state
252
253 struct XenosShader *vs, *ps;
255
256#define DIRTY_ALU 0x0001
257#define DIRTY_FETCH 0x0002
258#define DIRTY_CLIP 0x0004
259#define DIRTY_INTEGER 0x0008
260#define DIRTY_CONTROL 0x0010
261#define DIRTY_SHADER 0x0020
262#define DIRTY_MISC 0x0040
263 int dirty;
264
265 /* private */
267 volatile void *rb, *rb_primary, *rb_secondary;
270
271 volatile unsigned int *regs;
272
275
278
281
285
288
291
295
297
300};
301
302void Xe_Init(struct XenosDevice *xe);
303void __attribute__((noreturn)) Xe_Fatal(struct XenosDevice *xe, const char *fmt, ...);
304
305void Xe_SetRenderTarget(struct XenosDevice *xe, struct XenosSurface *rt);
306void Xe_Resolve(struct XenosDevice *xe);
307
308#define XE_SOURCE_COLOR 0
309#define XE_SOURCE_DS 4
310
311#define XE_CLEAR_COLOR 1
312#define XE_CLEAR_DS 2
313
314void Xe_ResolveInto(struct XenosDevice *xe, struct XenosSurface *surface, int source, int clear);
315
316 /* Xe_Clear always clears the complete rendertarget. No excuses. If you want arbitrary targets, use traditional draw.
317 (reason: resolve cannot handle arbitrary shapes) */
318void Xe_Clear(struct XenosDevice *xe, int flags);
320void Xe_SetFrameBufferSurface(struct XenosDevice *xe, struct XenosSurface *fb);
321
322void Xe_Execute(struct XenosDevice *xe);
323void Xe_Sync(struct XenosDevice *xe);
324void Xe_SetClearColor(struct XenosDevice *xe, u32 clearcolor);
325
326void Xe_DirtyAluConstant(struct XenosDevice *xe, int base, int len);
327void Xe_DirtyFetch(struct XenosDevice *xe, int base, int len);
328struct XenosShader *Xe_LoadShader(struct XenosDevice *xe, const char *filename);
329struct XenosShader *Xe_LoadShaderFromMemory(struct XenosDevice *xe, void *shader);
330void Xe_InstantiateShader(struct XenosDevice *xe, struct XenosShader *sh, unsigned int index);
331int Xe_GetShaderLength(struct XenosDevice *xe, void *sh);
332void Xe_ShaderApplyVFetchPatches(struct XenosDevice *xe, struct XenosShader *sh, unsigned int index, const struct XenosVBFFormat *fmt);
333
334int Xe_VBFCalcStride(struct XenosDevice *xe, const struct XenosVBFFormat *fmt);
335int Xe_VBFCalcSize(struct XenosDevice *xe, const struct XenosVBFElement *fmt);
336
337void Xe_SetZFunc(struct XenosDevice *xe, int z_func);
338void Xe_SetZWrite(struct XenosDevice *xe, int zw);
339void Xe_SetZEnable(struct XenosDevice *xe, int zw);
340void Xe_SetFillMode(struct XenosDevice *xe, int front, int back);
341void Xe_SetBlendControl(struct XenosDevice *xe, int col_src, int col_op, int col_dst, int alpha_src, int alpha_op, int alpha_dst);
342void Xe_SetSrcBlend(struct XenosDevice *xe, unsigned int blend);
343void Xe_SetDestBlend(struct XenosDevice *xe, unsigned int blend);
344void Xe_SetBlendOp(struct XenosDevice *xe, unsigned int blendop);
345void Xe_SetSrcBlendAlpha(struct XenosDevice *xe, unsigned int blend);
346void Xe_SetDestBlendAlpha(struct XenosDevice *xe, unsigned int blend);
347void Xe_SetBlendOpAlpha(struct XenosDevice *xe, unsigned int blendop);
348void Xe_SetCullMode(struct XenosDevice *xe, unsigned int cullmode);
349void Xe_SetAlphaTestEnable(struct XenosDevice *xe, int enable);
350void Xe_SetAlphaFunc(struct XenosDevice *xe, unsigned int func);
351void Xe_SetAlphaRef(struct XenosDevice *xe, float alpharef);
352void Xe_SetScissor(struct XenosDevice *xe, int enable, int left, int top, int right, int bottom);
353
354 /* bfff is a bitfield {backface,frontface} */
355void Xe_SetStencilEnable(struct XenosDevice *xe, unsigned int enable);
356void Xe_SetStencilFunc(struct XenosDevice *xe, int bfff, unsigned int func);
357
358 /* -1 to leave old value */
359void Xe_SetStencilOp(struct XenosDevice *xe, int bfff, int fail, int zfail, int pass);
360
361void Xe_SetStencilRef(struct XenosDevice *xe, int bfff, int ref);
362void Xe_SetStencilMask(struct XenosDevice *xe, int bfff, int mask);
363void Xe_SetStencilWriteMask(struct XenosDevice *xe, int bfff, int writemask);
364
365void Xe_SetClipPlaneEnables(struct XenosDevice *xe, int enables); // enables is a set of 1<<plane_index
366void Xe_SetClipPlane(struct XenosDevice *xe, int idx, float * plane);
367
368void Xe_InvalidateState(struct XenosDevice *xe);
369void Xe_SetShader(struct XenosDevice *xe, int type, struct XenosShader *sh, int instance);
370void Xe_SetTexture(struct XenosDevice *xe, int index, struct XenosSurface *tex);
371
372struct XenosVertexBuffer *Xe_VBPoolAlloc(struct XenosDevice *xe, int size);
373void Xe_VBPoolAdd(struct XenosDevice *xe, struct XenosVertexBuffer *vb);
374void Xe_VBReclaim(struct XenosDevice *xe);
375void Xe_VBBegin(struct XenosDevice *xe, int pitch); /* pitch, len is nr of vertices */
376void Xe_VBPut(struct XenosDevice *xe, void *data, int len);
377struct XenosVertexBuffer *Xe_VBEnd(struct XenosDevice *xe);
378void Xe_Draw(struct XenosDevice *xe, struct XenosVertexBuffer *vb, struct XenosIndexBuffer *ib);
379
380
381void Xe_SetIndices(struct XenosDevice *de, struct XenosIndexBuffer *ib);
382void Xe_DrawIndexedPrimitive(struct XenosDevice *xe, int type, int base_index, int min_index, int num_vertices, int start_index, int primitive_count);
383void Xe_DrawPrimitive(struct XenosDevice *xe, int type, int start, int primitive_count);
384
385void Xe_SetStreamSource(struct XenosDevice *xe, int index, struct XenosVertexBuffer *vb, int offset, int stride);
386
387struct XenosIndexBuffer *Xe_CreateIndexBuffer(struct XenosDevice *xe, int length, int format);
388void Xe_DestroyIndexBuffer(struct XenosDevice *xe, struct XenosIndexBuffer *ib);
389
391void Xe_DestroyVertexBuffer(struct XenosDevice *xe, struct XenosVertexBuffer *vb);
392
393#define XE_LOCK_READ 1
394#define XE_LOCK_WRITE 2
395
396void *Xe_VB_Lock(struct XenosDevice *xe, struct XenosVertexBuffer *vb, int offset, int size, int flags);
397void Xe_VB_Unlock(struct XenosDevice *xe, struct XenosVertexBuffer *vb);
398
399void *Xe_IB_Lock(struct XenosDevice *xe, struct XenosIndexBuffer *ib, int offset, int size, int flags);
400void Xe_IB_Unlock(struct XenosDevice *xe, struct XenosIndexBuffer *ib);
401
402void Xe_SetVertexShaderConstantF(struct XenosDevice *xe, int start, const float *data, int count); /* count = number of 4 floats */
403void Xe_SetPixelShaderConstantF(struct XenosDevice *xe, int start, const float *data, int count); /* count = number of 4 floats */
404
405void Xe_SetVertexShaderConstantB(struct XenosDevice *xe, int index, int value);
406void Xe_SetPixelShaderConstantB(struct XenosDevice *xe, int index, int value);
407
408struct XenosSurface *Xe_CreateTexture(struct XenosDevice *xe, unsigned int width, unsigned int height, unsigned int levels, int format, int tiled);
409void Xe_DestroyTexture(struct XenosDevice *xe, struct XenosSurface *surface);
410void *Xe_Surface_LockRect(struct XenosDevice *xe, struct XenosSurface *surface, int x, int y, int w, int h, int flags);
411void Xe_Surface_Unlock(struct XenosDevice *xe, struct XenosSurface *surface);
412
413int Xe_IsVBlank(struct XenosDevice *xe);
414
415#ifdef __cplusplus
416};
417#endif
418
419#endif
uint16_t length
Definition: ata.h:4
uint32_t width
Definition: console.c:3
#define base
uint32_t height
Definition: console.c:4
u32 size
Definition: iso9660.c:537
unsigned int __mf_uintptr_t __attribute__((__mode__(__pointer__)))
Definition: mf-runtime.h:34
int dirty
Definition: xe.h:263
int rb_primary_wptr
Definition: xe.h:268
struct XenosSurface default_fb
Definition: xe.h:274
int vb_current_pitch
Definition: xe.h:287
int rb_secondary_boundary
Definition: xe.h:269
u32 stencildata[2]
Definition: xe.h:250
int last_wptr
Definition: xe.h:277
struct XenosSurface tex_fb
Definition: xe.h:273
int scissor_enable
Definition: xe.h:298
int vp_xres
Definition: xe.h:279
int edram_hizpitch
Definition: xe.h:296
int scissor_ltrb[4]
Definition: xe.h:299
struct XenosVertexBuffer * current_vb
Definition: xe.h:294
struct XenosVertexBuffer * vb_pool_after_frame
Definition: xe.h:290
volatile void * rb_secondary
Definition: xe.h:267
struct XenosVertexBuffer * vb_current
Definition: xe.h:286
int edram_colorformat
Definition: xe.h:296
int rb_secondary_wptr
Definition: xe.h:268
int frameidx
Definition: xe.h:280
int msaa_samples
Definition: xe.h:284
u32 fetch_dirty
Definition: xe.h:245
int tris_drawn
Definition: xe.h:292
u32 clear_stencil_z
Definition: xe.h:283
struct XenosShader * ps
Definition: xe.h:253
struct XenosSurface * rt
Definition: xe.h:276
u32 fetch_constants[96 *2]
Definition: xe.h:242
u32 clear_color
Definition: xe.h:282
int edram_color0base
Definition: xe.h:296
u32 alu_dirty
Definition: xe.h:244
float clipplane[6 *4]
Definition: xe.h:247
volatile void * rb
Definition: xe.h:267
struct XenosIndexBuffer * current_ib
Definition: xe.h:293
float alu_constants[256 *4 *2]
Definition: xe.h:241
struct XenosShader * vs
Definition: xe.h:253
struct XenosVertexBuffer * vb_head
Definition: xe.h:286
u32 rb_secondary_base
Definition: xe.h:266
volatile unsigned int * regs
Definition: xe.h:271
int vs_index
Definition: xe.h:254
u32 controlpacket[9]
Definition: xe.h:250
int edram_depthbase
Definition: xe.h:296
volatile void * rb_primary
Definition: xe.h:267
unsigned int alpharef
Definition: xe.h:251
int edram_pitch
Definition: xe.h:296
struct XenosVertexBuffer * vb_pool
Definition: xe.h:289
u32 integer_constants[10 *4]
Definition: xe.h:249
int vp_yres
Definition: xe.h:279
int size
Definition: xe.h:232
u32 phys_base
Definition: xe.h:230
void * base
Definition: xe.h:233
struct XenosLock lock
Definition: xe.h:236
int indices
Definition: xe.h:231
Definition: xe.h:90
u32 phys
Definition: xe.h:92
void * start
Definition: xe.h:91
int flags
Definition: xe.h:94
int size
Definition: xe.h:93
u32 unk1[4]
Definition: xe.h:128
u32 sh_off
Definition: xe.h:125
u32 program_control
Definition: xe.h:126
u32 context_misc
Definition: xe.h:126
u32 sh_size
Definition: xe.h:125
u32 unk1[3]
Definition: xe.h:116
u32 offset
Definition: xe.h:114
u32 off_constants
Definition: xe.h:118
u32 off_shader
Definition: xe.h:118
u32 unk2[2]
Definition: xe.h:120
u32 cnt_vfetch
Definition: xe.h:133
u32 context_misc
Definition: xe.h:106
u32 size
Definition: xe.h:104
u32 shader_phys[XE_SHADER_MAX_INSTANCES]
Definition: xe.h:106
void * shader
Definition: xe.h:103
u32 program_control
Definition: xe.h:106
u32 shader_phys_size
Definition: xe.h:106
void * shader_instance[XE_SHADER_MAX_INSTANCES]
Definition: xe.h:107
int use_filtering
Definition: xe.h:205
struct XenosLock lock
Definition: xe.h:210
int u_addressing
Definition: xe.h:206
int v_addressing
Definition: xe.h:206
int wpitch
Definition: xe.h:201
int format
Definition: xe.h:201
int width
Definition: xe.h:201
void * base
Definition: xe.h:208
int height
Definition: xe.h:201
int bypp
Definition: xe.h:203
u32 ptr
Definition: xe.h:202
int hpitch
Definition: xe.h:201
int tiled
Definition: xe.h:201
u32 ptr_mip
Definition: xe.h:202
int fmt
Definition: xe.h:190
int index
Definition: xe.h:189
int usage
Definition: xe.h:188
struct XenosVBFElement e[10]
Definition: xe.h:196
int num
Definition: xe.h:195
struct XenosLock lock
Definition: xe.h:220
struct XenosVertexBuffer * next
Definition: xe.h:222
u32 phys_base
Definition: xe.h:215
void * base
Definition: xe.h:218
int vertices
Definition: xe.h:216
void Xe_Fatal(struct XenosDevice *xe, const char *fmt,...)
Definition: xe.c:1241
void Xe_SetStencilFunc(struct XenosDevice *xe, int bfff, unsigned int func)
Definition: xe.c:1534
void * Xe_IB_Lock(struct XenosDevice *xe, struct XenosIndexBuffer *ib, int offset, int size, int flags)
Definition: xe.c:2002
void Xe_InstantiateShader(struct XenosDevice *xe, struct XenosShader *sh, unsigned int index)
Definition: xe.c:935
void Xe_Draw(struct XenosDevice *xe, struct XenosVertexBuffer *vb, struct XenosIndexBuffer *ib)
Definition: xe.c:1880
void Xe_VBPut(struct XenosDevice *xe, void *data, int len)
Definition: xe.c:1831
void Xe_SetZWrite(struct XenosDevice *xe, int zw)
Definition: xe.c:1429
void Xe_Surface_Unlock(struct XenosDevice *xe, struct XenosSurface *surface)
Definition: xe.c:2135
void Xe_DirtyAluConstant(struct XenosDevice *xe, int base, int len)
Definition: xe.c:570
int Xe_GetShaderLength(struct XenosDevice *xe, void *sh)
Definition: xe.c:949
int Xe_VBFCalcStride(struct XenosDevice *xe, const struct XenosVBFFormat *fmt)
Definition: xe.c:723
void Xe_InvalidateState(struct XenosDevice *xe)
Definition: xe.c:1657
void Xe_DirtyFetch(struct XenosDevice *xe, int base, int len)
Definition: xe.c:583
void Xe_DrawIndexedPrimitive(struct XenosDevice *xe, int type, int base_index, int min_index, int num_vertices, int start_index, int primitive_count)
Definition: xe.c:1926
void Xe_SetStencilEnable(struct XenosDevice *xe, unsigned int enable)
Definition: xe.c:1550
void Xe_SetVertexShaderConstantB(struct XenosDevice *xe, int index, int value)
Definition: xe.c:2038
struct XenosIndexBuffer * Xe_CreateIndexBuffer(struct XenosDevice *xe, int length, int format)
Definition: xe.c:1974
void * Xe_VB_Lock(struct XenosDevice *xe, struct XenosVertexBuffer *vb, int offset, int size, int flags)
Definition: xe.c:1991
void Xe_SetShader(struct XenosDevice *xe, int type, struct XenosShader *sh, int instance)
Definition: xe.c:1665
void Xe_SetCullMode(struct XenosDevice *xe, unsigned int cullmode)
Definition: xe.c:1505
void Xe_ResolveInto(struct XenosDevice *xe, struct XenosSurface *surface, int source, int clear)
Definition: xe.c:1069
void Xe_SetSrcBlend(struct XenosDevice *xe, unsigned int blend)
Definition: xe.c:1457
void Xe_DestroyTexture(struct XenosDevice *xe, struct XenosSurface *surface)
Definition: xe.c:2102
void Xe_SetStencilOp(struct XenosDevice *xe, int bfff, int fail, int zfail, int pass)
Definition: xe.c:1558
void Xe_SetPixelShaderConstantB(struct XenosDevice *xe, int index, int value)
Definition: xe.c:2051
void Xe_Sync(struct XenosDevice *xe)
Definition: xe.c:1302
void Xe_SetBlendControl(struct XenosDevice *xe, int col_src, int col_op, int col_dst, int alpha_src, int alpha_op, int alpha_dst)
Definition: xe.c:1451
struct XenosShader * Xe_LoadShader(struct XenosDevice *xe, const char *filename)
Definition: xe.c:596
struct XenosSurface * Xe_GetFramebufferSurface(struct XenosDevice *xe)
Definition: xe.c:1252
void Xe_DestroyVertexBuffer(struct XenosDevice *xe, struct XenosVertexBuffer *vb)
Definition: xe.c:1777
void Xe_DrawPrimitive(struct XenosDevice *xe, int type, int start, int primitive_count)
Definition: xe.c:1943
void Xe_VBReclaim(struct XenosDevice *xe)
Definition: xe.c:1814
void Xe_SetDestBlend(struct XenosDevice *xe, unsigned int blend)
Definition: xe.c:1465
void Xe_SetSrcBlendAlpha(struct XenosDevice *xe, unsigned int blend)
Definition: xe.c:1481
struct XenosVertexBuffer * Xe_VBPoolAlloc(struct XenosDevice *xe, int size)
Definition: xe.c:1783
void Xe_SetClearColor(struct XenosDevice *xe, u32 clearcolor)
Definition: xe.c:1758
void Xe_SetAlphaTestEnable(struct XenosDevice *xe, int enable)
Definition: xe.c:1513
void Xe_SetZEnable(struct XenosDevice *xe, int zw)
Definition: xe.c:1435
void Xe_Init(struct XenosDevice *xe)
Definition: xe.c:956
void Xe_SetScissor(struct XenosDevice *xe, int enable, int left, int top, int right, int bottom)
Definition: xe.c:1633
void Xe_Execute(struct XenosDevice *xe)
Definition: xe.c:1278
void Xe_SetClipPlane(struct XenosDevice *xe, int idx, float *plane)
Definition: xe.c:1650
void Xe_SetBlendOp(struct XenosDevice *xe, unsigned int blendop)
Definition: xe.c:1473
void Xe_SetStreamSource(struct XenosDevice *xe, int index, struct XenosVertexBuffer *vb, int offset, int stride)
Definition: xe.c:1959
void Xe_DestroyIndexBuffer(struct XenosDevice *xe, struct XenosIndexBuffer *ib)
Definition: xe.c:1985
struct XenosVertexBuffer * Xe_VBEnd(struct XenosDevice *xe)
Definition: xe.c:1863
void Xe_SetStencilMask(struct XenosDevice *xe, int bfff, int mask)
Definition: xe.c:1613
void Xe_IB_Unlock(struct XenosDevice *xe, struct XenosIndexBuffer *ib)
Definition: xe.c:2008
void Xe_ShaderApplyVFetchPatches(struct XenosDevice *xe, struct XenosShader *sh, unsigned int index, const struct XenosVBFFormat *fmt)
Definition: xe.c:788
void Xe_SetFrameBufferSurface(struct XenosDevice *xe, struct XenosSurface *fb)
Definition: xe.c:1257
void * Xe_Surface_LockRect(struct XenosDevice *xe, struct XenosSurface *surface, int x, int y, int w, int h, int flags)
Definition: xe.c:2108
void Xe_SetFillMode(struct XenosDevice *xe, int front, int back)
Definition: xe.c:1441
void Xe_SetDestBlendAlpha(struct XenosDevice *xe, unsigned int blend)
Definition: xe.c:1489
void Xe_Resolve(struct XenosDevice *xe)
Definition: xe.c:1175
void Xe_SetVertexShaderConstantF(struct XenosDevice *xe, int start, const float *data, int count)
Definition: xe.c:2013
void Xe_SetClipPlaneEnables(struct XenosDevice *xe, int enables)
Definition: xe.c:1643
void Xe_SetIndices(struct XenosDevice *de, struct XenosIndexBuffer *ib)
Definition: xe.c:1969
int Xe_VBFCalcSize(struct XenosDevice *xe, const struct XenosVBFElement *fmt)
Definition: xe.c:689
int Xe_IsVBlank(struct XenosDevice *xe)
Definition: xe.c:2141
void Xe_VBBegin(struct XenosDevice *xe, int pitch)
Definition: xe.c:1824
void Xe_SetStencilRef(struct XenosDevice *xe, int bfff, int ref)
Definition: xe.c:1603
void Xe_SetBlendOpAlpha(struct XenosDevice *xe, unsigned int blendop)
Definition: xe.c:1497
void Xe_SetPixelShaderConstantF(struct XenosDevice *xe, int start, const float *data, int count)
Definition: xe.c:2025
void Xe_SetAlphaFunc(struct XenosDevice *xe, unsigned int func)
Definition: xe.c:1520
void Xe_VBPoolAdd(struct XenosDevice *xe, struct XenosVertexBuffer *vb)
Definition: xe.c:1805
void const char void Xe_SetRenderTarget(struct XenosDevice *xe, struct XenosSurface *rt)
Definition: xe.c:998
void Xe_VB_Unlock(struct XenosDevice *xe, struct XenosVertexBuffer *vb)
Definition: xe.c:1997
void Xe_SetZFunc(struct XenosDevice *xe, int z_func)
Definition: xe.c:1423
void Xe_SetAlphaRef(struct XenosDevice *xe, float alpharef)
Definition: xe.c:1528
void Xe_SetStencilWriteMask(struct XenosDevice *xe, int bfff, int writemask)
Definition: xe.c:1623
void Xe_Clear(struct XenosDevice *xe, int flags)
Definition: xe.c:1167
void const char * fmt
Definition: xe.h:303
void Xe_SetTexture(struct XenosDevice *xe, int index, struct XenosSurface *tex)
Definition: xe.c:1748
#define XE_SHADER_MAX_INSTANCES
Definition: xe.h:97
struct XenosSurface * Xe_CreateTexture(struct XenosDevice *xe, unsigned int width, unsigned int height, unsigned int levels, int format, int tiled)
Definition: xe.c:2066
struct XenosVertexBuffer * Xe_CreateVertexBuffer(struct XenosDevice *xe, int length)
Definition: xe.c:1763
struct XenosShader * Xe_LoadShaderFromMemory(struct XenosDevice *xe, void *shader)
Definition: xe.c:613
u8 type
Definition: xenos_edid.h:1
union @15 data
uint32_t u32
32bit unsigned integer
Definition: xetypes.h:14