LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Macros | Functions | Variables
xe.c File Reference
#include "xe.h"
#include "xe_internal.h"
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <malloc.h>
#include <assert.h>
#include <stdlib.h>
#include <time.h>
#include <cache.h>
#include <xenon_smc/xenon_smc.h>
#include <stdint.h>
#include <debug.h>
Include dependency graph for xe.c:

Go to the source code of this file.

Macros

#define WRITEBACK_ZONE_SIZE   0x20000
 
#define RPTR_WRITEBACK   0x10000
 
#define SCRATCH_WRITEBACK   0x10100
 
#define RINGBUFFER_PRIMARY_SIZE   (0x8000/4)
 
#define RINGBUFFER_SECONDARY_SIZE   (0x400000/4)
 
#define RINGBUFFER_SECONDARY_GUARD   (0x200000/4)
 
#define RADEON_CP_PACKET0   0x00000000
 
#define RADEON_ONE_REG_WR   (1 << 15)
 
#define CP_PACKET0(reg, n)    (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2))
 
#define CP_PACKET0_TABLE(reg, n)    (RADEON_CP_PACKET0 | RADEON_ONE_REG_WR | ((n) << 16) | ((reg) >> 2))
 
#define VBPOOL_NUM_TRIANGLES   2000
 
#define SEGMENT_SIZE   1024
 

Functions

void Xe_pSyncToDevice (struct XenosDevice *xe, volatile void *data, int len)
 
void Xe_pSyncFromDevice (struct XenosDevice *xe, volatile void *data, int len)
 
void * Xe_pAlloc (struct XenosDevice *xe, u32 *phys, int size, int align)
 
void Xe_pFree (struct XenosDevice *xe, void *ptr)
 
void Xe_pInvalidateGpuCache_Primary (struct XenosDevice *xe, int base, int size)
 
void Xe_pRBCommitPrimary (struct XenosDevice *xe)
 
void Xe_pRBKickSegment (struct XenosDevice *xe, int base, int len)
 
void Xe_pRBKick (struct XenosDevice *xe)
 
void Xe_pRBMayKick (struct XenosDevice *xe)
 
u32 Xe_pRBAlloc (struct XenosDevice *xe)
 
void Xe_pSetSurfaceClip (struct XenosDevice *xe, int offset_x, int offset_y, int sc_left, int sc_top, int sc_right, int sc_bottom)
 
void Xe_pSetBin (struct XenosDevice *xe, u32 mask_low, u32 select_low, u32 mask_hi, u32 select_hi)
 
void Xe_pWaitUntilIdle (struct XenosDevice *xe, u32 what)
 
void Xe_pDrawNonIndexed (struct XenosDevice *xe, int num_points, int primtype)
 
void Xe_pDrawIndexedPrimitive (struct XenosDevice *xe, int primtype, int num_points, u32 indexbuffer, u32 indexbuffer_size, int indextype)
 
void Xe_pSetIndexOffset (struct XenosDevice *xe, int offset)
 
void Xe_pResetRingbuffer (struct XenosDevice *xe)
 
void Xe_pSetupRingbuffer (struct XenosDevice *xe, u32 buffer_base, u32 size_in_l2qw)
 
void Xe_pLoadUcodes (struct XenosDevice *xe, const u32 *ucode0, const u32 *ucode1)
 
void Xe_pWaitReady (struct XenosDevice *xe)
 
void Xe_pWaitReady2 (struct XenosDevice *xe)
 
void Xe_pInit1 (struct XenosDevice *xe)
 
void Xe_pReset (struct XenosDevice *xe)
 
void Xe_pResetCP (struct XenosDevice *xe, u32 buffer_base, u32 size_in_l2qw)
 
void Xe_pSetup (struct XenosDevice *xe, u32 buffer_base, u32 buffer_size, const u32 *ucode0, const u32 *ucode1)
 
void Xe_pMasterInit (struct XenosDevice *xe, u32 buffer_base)
 
void Xe_pEnableWriteback (struct XenosDevice *xe, u32 addr, int blocksize)
 
void Xe_pGInit0 (struct XenosDevice *xe)
 
void Xe_pGInit1 (struct XenosDevice *xe, int arg)
 
void Xe_pGInit2 (struct XenosDevice *xe)
 
void Xe_pGInit3 (struct XenosDevice *xe)
 
void Xe_pGInit4 (struct XenosDevice *xe)
 
void Xe_pGInit5 (struct XenosDevice *xe)
 
void Xe_pGInit6 (struct XenosDevice *xe)
 
void Xe_pGInit7 (struct XenosDevice *xe)
 
void Xe_pGInit8 (struct XenosDevice *xe)
 
void Xe_pGInit9 (struct XenosDevice *xe)
 
void Xe_pGInit10 (struct XenosDevice *xe)
 
void Xe_pGInit (struct XenosDevice *xe)
 
void Xe_DirtyAluConstant (struct XenosDevice *xe, int base, int len)
 
void Xe_DirtyFetch (struct XenosDevice *xe, int base, int len)
 
struct XenosShaderXe_LoadShader (struct XenosDevice *xe, const char *filename)
 
struct XenosShaderXe_LoadShaderFromMemory (struct XenosDevice *xe, void *m)
 
void Xe_pUploadShaderConstants (struct XenosDevice *xe, struct XenosShader *s)
 
int Xe_VBFCalcSize (struct XenosDevice *xe, const struct XenosVBFElement *fmt)
 
int Xe_pVBFNrComponents (struct XenosDevice *xe, const struct XenosVBFElement *fmt)
 
int Xe_VBFCalcStride (struct XenosDevice *xe, const struct XenosVBFFormat *fmt)
 
void Xe_pInvalidateGpuCache (struct XenosDevice *xe, int base, int size)
 
void Xe_pInvalidateGpuCacheAll (struct XenosDevice *xe, int base, int size)
 
void Xe_pUnlock (struct XenosDevice *xe, struct XenosLock *lock)
 
void Xe_pLock (struct XenosDevice *xe, struct XenosLock *lock, void *addr, u32 phys, int size, int flags)
 
void Xe_ShaderApplyVFetchPatches (struct XenosDevice *xe, struct XenosShader *sh, unsigned int index, const struct XenosVBFFormat *fmt)
 
void Xe_InstantiateShader (struct XenosDevice *xe, struct XenosShader *sh, unsigned int index)
 
int Xe_GetShaderLength (struct XenosDevice *xe, void *sh)
 
void Xe_Init (struct XenosDevice *xe)
 
void Xe_SetRenderTarget (struct XenosDevice *xe, struct XenosSurface *rt)
 
void Xe_pSetEDRAMLayout (struct XenosDevice *xe)
 
void Xe_pSetClearValues (struct XenosDevice *xe)
 
void Xe_ResolveInto (struct XenosDevice *xe, struct XenosSurface *surface, int source, int clear)
 
void Xe_Clear (struct XenosDevice *xe, int flags)
 
void Xe_Resolve (struct XenosDevice *xe)
 
void VERTEX_FETCH (u32 *dst, u32 base, int len)
 
void TEXTURE_FETCH (u32 *dst, u32 base, int width, int height, int pitch, int tiled, int format, u32 base_mip, int anisop, int filter, int uaddr, int vaddr)
 
void Xe_pLoadShader (struct XenosDevice *xe, int base, int type, int size)
 
void Xe_pAlign (struct XenosDevice *xe)
 
void Xe_pBlockUntilIdle (struct XenosDevice *xe)
 
void Xe_pStep (struct XenosDevice *xe, int x)
 
void Xe_pStuff (struct XenosDevice *xe)
 
void Xe_Fatal (struct XenosDevice *xe, const char *fmt,...)
 
struct XenosSurfaceXe_GetFramebufferSurface (struct XenosDevice *xe)
 
void Xe_SetFrameBufferSurface (struct XenosDevice *xe, struct XenosSurface *fb)
 
void Xe_Execute (struct XenosDevice *xe)
 
void Xe_pDebugSync (struct XenosDevice *xe)
 
void Xe_Sync (struct XenosDevice *xe)
 
void Xe_pUploadALUConstants (struct XenosDevice *xe)
 
void Xe_pUploadFetchConstants (struct XenosDevice *xe)
 
void Xe_pUploadClipPlane (struct XenosDevice *xe)
 
void Xe_pUploadIntegerConstants (struct XenosDevice *xe)
 
void Xe_pUploadControl (struct XenosDevice *xe)
 
void Xe_pUploadShader (struct XenosDevice *xe)
 
void Xe_pInitControl (struct XenosDevice *xe)
 
void Xe_SetZFunc (struct XenosDevice *xe, int z_func)
 
void Xe_SetZWrite (struct XenosDevice *xe, int zw)
 
void Xe_SetZEnable (struct XenosDevice *xe, int ze)
 
void Xe_SetFillMode (struct XenosDevice *xe, int front, int back)
 
void Xe_SetBlendControl (struct XenosDevice *xe, int col_src, int col_op, int col_dst, int alpha_src, int alpha_op, int alpha_dst)
 
void Xe_SetSrcBlend (struct XenosDevice *xe, unsigned int blend)
 
void Xe_SetDestBlend (struct XenosDevice *xe, unsigned int blend)
 
void Xe_SetBlendOp (struct XenosDevice *xe, unsigned int blendop)
 
void Xe_SetSrcBlendAlpha (struct XenosDevice *xe, unsigned int blend)
 
void Xe_SetDestBlendAlpha (struct XenosDevice *xe, unsigned int blend)
 
void Xe_SetBlendOpAlpha (struct XenosDevice *xe, unsigned int blendop)
 
void Xe_SetCullMode (struct XenosDevice *xe, unsigned int cullmode)
 
void Xe_SetAlphaTestEnable (struct XenosDevice *xe, int enable)
 
void Xe_SetAlphaFunc (struct XenosDevice *xe, unsigned int func)
 
void Xe_SetAlphaRef (struct XenosDevice *xe, float alpharef)
 
void Xe_SetStencilFunc (struct XenosDevice *xe, int bfff, unsigned int func)
 
void Xe_SetStencilEnable (struct XenosDevice *xe, unsigned int enable)
 
void Xe_SetStencilOp (struct XenosDevice *xe, int bfff, int fail, int zfail, int pass)
 
void Xe_SetStencilRef (struct XenosDevice *xe, int bfff, int ref)
 
void Xe_SetStencilMask (struct XenosDevice *xe, int bfff, int mask)
 
void Xe_SetStencilWriteMask (struct XenosDevice *xe, int bfff, int writemask)
 
void Xe_SetScissor (struct XenosDevice *xe, int enable, int left, int top, int right, int bottom)
 
void Xe_SetClipPlaneEnables (struct XenosDevice *xe, int enables)
 
void Xe_SetClipPlane (struct XenosDevice *xe, int idx, float *plane)
 
void Xe_InvalidateState (struct XenosDevice *xe)
 
void Xe_SetShader (struct XenosDevice *xe, int type, struct XenosShader *sh, int index)
 
void Xe_pSetState (struct XenosDevice *xe)
 
void Xe_SetTexture (struct XenosDevice *xe, int index, struct XenosSurface *tex)
 
void Xe_SetClearColor (struct XenosDevice *xe, u32 clearcolor)
 
struct XenosVertexBufferXe_CreateVertexBuffer (struct XenosDevice *xe, int size)
 
void Xe_DestroyVertexBuffer (struct XenosDevice *xe, struct XenosVertexBuffer *vb)
 
struct XenosVertexBufferXe_VBPoolAlloc (struct XenosDevice *xe, int size)
 
void Xe_VBPoolAdd (struct XenosDevice *xe, struct XenosVertexBuffer *vb)
 
void Xe_VBReclaim (struct XenosDevice *xe)
 
void Xe_VBBegin (struct XenosDevice *xe, int pitch)
 
void Xe_VBPut (struct XenosDevice *xe, void *data, int len)
 
struct XenosVertexBufferXe_VBEnd (struct XenosDevice *xe)
 
void Xe_Draw (struct XenosDevice *xe, struct XenosVertexBuffer *vb, struct XenosIndexBuffer *ib)
 
int Xe_pCalcVtxCount (struct XenosDevice *xe, int primtype, int primcnt)
 
void Xe_DrawIndexedPrimitive (struct XenosDevice *xe, int type, int base_index, int min_index, int num_vertices, int start_index, int primitive_count)
 
void Xe_DrawPrimitive (struct XenosDevice *xe, int type, int start, int primitive_count)
 
void Xe_SetStreamSource (struct XenosDevice *xe, int index, struct XenosVertexBuffer *vb, int offset, int stride)
 
void Xe_SetIndices (struct XenosDevice *xe, struct XenosIndexBuffer *ib)
 
struct XenosIndexBufferXe_CreateIndexBuffer (struct XenosDevice *xe, int length, int format)
 
void Xe_DestroyIndexBuffer (struct XenosDevice *xe, struct XenosIndexBuffer *ib)
 
void * Xe_VB_Lock (struct XenosDevice *xe, struct XenosVertexBuffer *vb, int offset, int size, int flags)
 
void Xe_VB_Unlock (struct XenosDevice *xe, struct XenosVertexBuffer *vb)
 
void * Xe_IB_Lock (struct XenosDevice *xe, struct XenosIndexBuffer *ib, int offset, int size, int flags)
 
void Xe_IB_Unlock (struct XenosDevice *xe, struct XenosIndexBuffer *ib)
 
void Xe_SetVertexShaderConstantF (struct XenosDevice *xe, int start, const float *data, int count)
 
void Xe_SetPixelShaderConstantF (struct XenosDevice *xe, int start, const float *data, int count)
 
void Xe_SetVertexShaderConstantB (struct XenosDevice *xe, int index, int value)
 
void Xe_SetPixelShaderConstantB (struct XenosDevice *xe, int index, int value)
 
struct XenosSurfaceXe_CreateTexture (struct XenosDevice *xe, unsigned int width, unsigned int height, unsigned int levels, int format, int tiled)
 
void Xe_DestroyTexture (struct XenosDevice *xe, struct XenosSurface *surface)
 
void * Xe_Surface_LockRect (struct XenosDevice *xe, struct XenosSurface *surface, int x, int y, int w, int h, int flags)
 
void Xe_Surface_Unlock (struct XenosDevice *xe, struct XenosSurface *surface)
 
int Xe_IsVBlank (struct XenosDevice *xe)
 

Variables

u32 xenos_ucode0 []
 
u32 xenos_ucode1 []
 
int stat_alu_uploaded = 0
 

Macro Definition Documentation

◆ CP_PACKET0

#define CP_PACKET0 (   reg,
 
)     (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2))

Definition at line 28 of file xe.c.

◆ CP_PACKET0_TABLE

#define CP_PACKET0_TABLE (   reg,
 
)     (RADEON_CP_PACKET0 | RADEON_ONE_REG_WR | ((n) << 16) | ((reg) >> 2))

Definition at line 30 of file xe.c.

◆ RADEON_CP_PACKET0

#define RADEON_CP_PACKET0   0x00000000

Definition at line 25 of file xe.c.

◆ RADEON_ONE_REG_WR

#define RADEON_ONE_REG_WR   (1 << 15)

Definition at line 26 of file xe.c.

◆ RINGBUFFER_PRIMARY_SIZE

#define RINGBUFFER_PRIMARY_SIZE   (0x8000/4)

Definition at line 21 of file xe.c.

◆ RINGBUFFER_SECONDARY_GUARD

#define RINGBUFFER_SECONDARY_GUARD   (0x200000/4)

Definition at line 23 of file xe.c.

◆ RINGBUFFER_SECONDARY_SIZE

#define RINGBUFFER_SECONDARY_SIZE   (0x400000/4)

Definition at line 22 of file xe.c.

◆ RPTR_WRITEBACK

#define RPTR_WRITEBACK   0x10000

Definition at line 18 of file xe.c.

◆ SCRATCH_WRITEBACK

#define SCRATCH_WRITEBACK   0x10100

Definition at line 19 of file xe.c.

◆ SEGMENT_SIZE

#define SEGMENT_SIZE   1024

Definition at line 136 of file xe.c.

◆ VBPOOL_NUM_TRIANGLES

#define VBPOOL_NUM_TRIANGLES   2000

Definition at line 33 of file xe.c.

◆ WRITEBACK_ZONE_SIZE

#define WRITEBACK_ZONE_SIZE   0x20000

Definition at line 16 of file xe.c.

Function Documentation

◆ TEXTURE_FETCH()

void TEXTURE_FETCH ( u32 dst,
u32  base,
int  width,
int  height,
int  pitch,
int  tiled,
int  format,
u32  base_mip,
int  anisop,
int  filter,
int  uaddr,
int  vaddr 
)

Definition at line 1187 of file xe.c.

◆ VERTEX_FETCH()

void VERTEX_FETCH ( u32 dst,
u32  base,
int  len 
)

Definition at line 1181 of file xe.c.

◆ Xe_Clear()

void Xe_Clear ( struct XenosDevice xe,
int  flags 
)

Definition at line 1167 of file xe.c.

◆ Xe_CreateIndexBuffer()

struct XenosIndexBuffer * Xe_CreateIndexBuffer ( struct XenosDevice xe,
int  length,
int  format 
)

Definition at line 1974 of file xe.c.

◆ Xe_CreateTexture()

struct XenosSurface * Xe_CreateTexture ( struct XenosDevice xe,
unsigned int  width,
unsigned int  height,
unsigned int  levels,
int  format,
int  tiled 
)

Definition at line 2066 of file xe.c.

◆ Xe_CreateVertexBuffer()

struct XenosVertexBuffer * Xe_CreateVertexBuffer ( struct XenosDevice xe,
int  size 
)

Definition at line 1763 of file xe.c.

◆ Xe_DestroyIndexBuffer()

void Xe_DestroyIndexBuffer ( struct XenosDevice xe,
struct XenosIndexBuffer ib 
)

Definition at line 1985 of file xe.c.

◆ Xe_DestroyTexture()

void Xe_DestroyTexture ( struct XenosDevice xe,
struct XenosSurface surface 
)

Definition at line 2102 of file xe.c.

◆ Xe_DestroyVertexBuffer()

void Xe_DestroyVertexBuffer ( struct XenosDevice xe,
struct XenosVertexBuffer vb 
)

Definition at line 1777 of file xe.c.

◆ Xe_DirtyAluConstant()

void Xe_DirtyAluConstant ( struct XenosDevice xe,
int  base,
int  len 
)

Definition at line 570 of file xe.c.

◆ Xe_DirtyFetch()

void Xe_DirtyFetch ( struct XenosDevice xe,
int  base,
int  len 
)

Definition at line 583 of file xe.c.

◆ Xe_Draw()

void Xe_Draw ( struct XenosDevice xe,
struct XenosVertexBuffer vb,
struct XenosIndexBuffer ib 
)

Definition at line 1880 of file xe.c.

◆ Xe_DrawIndexedPrimitive()

void Xe_DrawIndexedPrimitive ( struct XenosDevice xe,
int  type,
int  base_index,
int  min_index,
int  num_vertices,
int  start_index,
int  primitive_count 
)

Definition at line 1926 of file xe.c.

◆ Xe_DrawPrimitive()

void Xe_DrawPrimitive ( struct XenosDevice xe,
int  type,
int  start,
int  primitive_count 
)

Definition at line 1943 of file xe.c.

◆ Xe_Execute()

void Xe_Execute ( struct XenosDevice xe)

Definition at line 1278 of file xe.c.

◆ Xe_Fatal()

void Xe_Fatal ( struct XenosDevice xe,
const char *  fmt,
  ... 
)

Definition at line 1241 of file xe.c.

◆ Xe_GetFramebufferSurface()

struct XenosSurface * Xe_GetFramebufferSurface ( struct XenosDevice xe)

Definition at line 1252 of file xe.c.

◆ Xe_GetShaderLength()

int Xe_GetShaderLength ( struct XenosDevice xe,
void *  sh 
)

Definition at line 949 of file xe.c.

◆ Xe_IB_Lock()

void * Xe_IB_Lock ( struct XenosDevice xe,
struct XenosIndexBuffer ib,
int  offset,
int  size,
int  flags 
)

Definition at line 2002 of file xe.c.

◆ Xe_IB_Unlock()

void Xe_IB_Unlock ( struct XenosDevice xe,
struct XenosIndexBuffer ib 
)

Definition at line 2008 of file xe.c.

◆ Xe_Init()

void Xe_Init ( struct XenosDevice xe)

Definition at line 956 of file xe.c.

◆ Xe_InstantiateShader()

void Xe_InstantiateShader ( struct XenosDevice xe,
struct XenosShader sh,
unsigned int  index 
)

Definition at line 935 of file xe.c.

◆ Xe_InvalidateState()

void Xe_InvalidateState ( struct XenosDevice xe)

Definition at line 1657 of file xe.c.

◆ Xe_IsVBlank()

int Xe_IsVBlank ( struct XenosDevice xe)

Definition at line 2141 of file xe.c.

◆ Xe_LoadShader()

struct XenosShader * Xe_LoadShader ( struct XenosDevice xe,
const char *  filename 
)

Definition at line 596 of file xe.c.

◆ Xe_LoadShaderFromMemory()

struct XenosShader * Xe_LoadShaderFromMemory ( struct XenosDevice xe,
void *  m 
)

Definition at line 613 of file xe.c.

◆ Xe_pAlign()

void Xe_pAlign ( struct XenosDevice xe)

Definition at line 1217 of file xe.c.

◆ Xe_pAlloc()

void * Xe_pAlloc ( struct XenosDevice xe,
u32 phys,
int  size,
int  align 
)

Definition at line 62 of file xe.c.

◆ Xe_pBlockUntilIdle()

void Xe_pBlockUntilIdle ( struct XenosDevice xe)

Definition at line 1223 of file xe.c.

◆ Xe_pCalcVtxCount()

int Xe_pCalcVtxCount ( struct XenosDevice xe,
int  primtype,
int  primcnt 
)

Definition at line 1909 of file xe.c.

◆ Xe_pDebugSync()

void Xe_pDebugSync ( struct XenosDevice xe)

Definition at line 1284 of file xe.c.

◆ Xe_pDrawIndexedPrimitive()

void Xe_pDrawIndexedPrimitive ( struct XenosDevice xe,
int  primtype,
int  num_points,
u32  indexbuffer,
u32  indexbuffer_size,
int  indextype 
)

Definition at line 190 of file xe.c.

◆ Xe_pDrawNonIndexed()

void Xe_pDrawNonIndexed ( struct XenosDevice xe,
int  num_points,
int  primtype 
)

Definition at line 183 of file xe.c.

◆ Xe_pEnableWriteback()

void Xe_pEnableWriteback ( struct XenosDevice xe,
u32  addr,
int  blocksize 
)

Definition at line 387 of file xe.c.

◆ Xe_pFree()

void Xe_pFree ( struct XenosDevice xe,
void *  ptr 
)

Definition at line 78 of file xe.c.

◆ Xe_pGInit()

void Xe_pGInit ( struct XenosDevice xe)

Definition at line 554 of file xe.c.

◆ Xe_pGInit0()

void Xe_pGInit0 ( struct XenosDevice xe)

Definition at line 398 of file xe.c.

◆ Xe_pGInit1()

void Xe_pGInit1 ( struct XenosDevice xe,
int  arg 
)

Definition at line 443 of file xe.c.

◆ Xe_pGInit10()

void Xe_pGInit10 ( struct XenosDevice xe)

Definition at line 540 of file xe.c.

◆ Xe_pGInit2()

void Xe_pGInit2 ( struct XenosDevice xe)

Definition at line 454 of file xe.c.

◆ Xe_pGInit3()

void Xe_pGInit3 ( struct XenosDevice xe)

Definition at line 464 of file xe.c.

◆ Xe_pGInit4()

void Xe_pGInit4 ( struct XenosDevice xe)

Definition at line 472 of file xe.c.

◆ Xe_pGInit5()

void Xe_pGInit5 ( struct XenosDevice xe)

Definition at line 482 of file xe.c.

◆ Xe_pGInit6()

void Xe_pGInit6 ( struct XenosDevice xe)

Definition at line 500 of file xe.c.

◆ Xe_pGInit7()

void Xe_pGInit7 ( struct XenosDevice xe)

Definition at line 509 of file xe.c.

◆ Xe_pGInit8()

void Xe_pGInit8 ( struct XenosDevice xe)

Definition at line 517 of file xe.c.

◆ Xe_pGInit9()

void Xe_pGInit9 ( struct XenosDevice xe)

Definition at line 522 of file xe.c.

◆ Xe_pInit1()

void Xe_pInit1 ( struct XenosDevice xe)

Definition at line 270 of file xe.c.

◆ Xe_pInitControl()

void Xe_pInitControl ( struct XenosDevice xe)

Definition at line 1403 of file xe.c.

◆ Xe_pInvalidateGpuCache()

void Xe_pInvalidateGpuCache ( struct XenosDevice xe,
int  base,
int  size 
)

Definition at line 732 of file xe.c.

◆ Xe_pInvalidateGpuCache_Primary()

void Xe_pInvalidateGpuCache_Primary ( struct XenosDevice xe,
int  base,
int  size 
)

Definition at line 83 of file xe.c.

◆ Xe_pInvalidateGpuCacheAll()

void Xe_pInvalidateGpuCacheAll ( struct XenosDevice xe,
int  base,
int  size 
)

Definition at line 742 of file xe.c.

◆ Xe_pLoadShader()

void Xe_pLoadShader ( struct XenosDevice xe,
int  base,
int  type,
int  size 
)

Definition at line 1210 of file xe.c.

◆ Xe_pLoadUcodes()

void Xe_pLoadUcodes ( struct XenosDevice xe,
const u32 ucode0,
const u32 ucode1 
)

Definition at line 224 of file xe.c.

◆ Xe_pLock()

void Xe_pLock ( struct XenosDevice xe,
struct XenosLock lock,
void *  addr,
u32  phys,
int  size,
int  flags 
)

Definition at line 764 of file xe.c.

◆ Xe_pMasterInit()

void Xe_pMasterInit ( struct XenosDevice xe,
u32  buffer_base 
)

Definition at line 361 of file xe.c.

◆ Xe_pRBAlloc()

u32 Xe_pRBAlloc ( struct XenosDevice xe)

Definition at line 149 of file xe.c.

◆ Xe_pRBCommitPrimary()

void Xe_pRBCommitPrimary ( struct XenosDevice xe)

Definition at line 97 of file xe.c.

◆ Xe_pRBKick()

void Xe_pRBKick ( struct XenosDevice xe)

Definition at line 117 of file xe.c.

◆ Xe_pRBKickSegment()

void Xe_pRBKickSegment ( struct XenosDevice xe,
int  base,
int  len 
)

Definition at line 108 of file xe.c.

◆ Xe_pRBMayKick()

void Xe_pRBMayKick ( struct XenosDevice xe)

Definition at line 138 of file xe.c.

◆ Xe_pReset()

void Xe_pReset ( struct XenosDevice xe)

Definition at line 282 of file xe.c.

◆ Xe_pResetCP()

void Xe_pResetCP ( struct XenosDevice xe,
u32  buffer_base,
u32  size_in_l2qw 
)

Definition at line 303 of file xe.c.

◆ Xe_pResetRingbuffer()

void Xe_pResetRingbuffer ( struct XenosDevice xe)

Definition at line 208 of file xe.c.

◆ Xe_pSetBin()

void Xe_pSetBin ( struct XenosDevice xe,
u32  mask_low,
u32  select_low,
u32  mask_hi,
u32  select_hi 
)

Definition at line 165 of file xe.c.

◆ Xe_pSetClearValues()

void Xe_pSetClearValues ( struct XenosDevice xe)

Definition at line 1038 of file xe.c.

◆ Xe_pSetEDRAMLayout()

void Xe_pSetEDRAMLayout ( struct XenosDevice xe)

Definition at line 1030 of file xe.c.

◆ Xe_pSetIndexOffset()

void Xe_pSetIndexOffset ( struct XenosDevice xe,
int  offset 
)

Definition at line 202 of file xe.c.

◆ Xe_pSetState()

void Xe_pSetState ( struct XenosDevice xe)

Definition at line 1688 of file xe.c.

◆ Xe_pSetSurfaceClip()

void Xe_pSetSurfaceClip ( struct XenosDevice xe,
int  offset_x,
int  offset_y,
int  sc_left,
int  sc_top,
int  sc_right,
int  sc_bottom 
)

Definition at line 157 of file xe.c.

◆ Xe_pSetup()

void Xe_pSetup ( struct XenosDevice xe,
u32  buffer_base,
u32  buffer_size,
const u32 ucode0,
const u32 ucode1 
)

Definition at line 336 of file xe.c.

◆ Xe_pSetupRingbuffer()

void Xe_pSetupRingbuffer ( struct XenosDevice xe,
u32  buffer_base,
u32  size_in_l2qw 
)

Definition at line 216 of file xe.c.

◆ Xe_pStep()

void Xe_pStep ( struct XenosDevice xe,
int  x 
)

Definition at line 1228 of file xe.c.

◆ Xe_pStuff()

void Xe_pStuff ( struct XenosDevice xe)

Definition at line 1233 of file xe.c.

◆ Xe_pSyncFromDevice()

void Xe_pSyncFromDevice ( struct XenosDevice xe,
volatile void *  data,
int  len 
)

Definition at line 57 of file xe.c.

◆ Xe_pSyncToDevice()

void Xe_pSyncToDevice ( struct XenosDevice xe,
volatile void *  data,
int  len 
)

Definition at line 52 of file xe.c.

◆ Xe_pUnlock()

void Xe_pUnlock ( struct XenosDevice xe,
struct XenosLock lock 
)

Definition at line 752 of file xe.c.

◆ Xe_pUploadALUConstants()

void Xe_pUploadALUConstants ( struct XenosDevice xe)

Definition at line 1310 of file xe.c.

◆ Xe_pUploadClipPlane()

void Xe_pUploadClipPlane ( struct XenosDevice xe)

Definition at line 1358 of file xe.c.

◆ Xe_pUploadControl()

void Xe_pUploadControl ( struct XenosDevice xe)

Definition at line 1372 of file xe.c.

◆ Xe_pUploadFetchConstants()

void Xe_pUploadFetchConstants ( struct XenosDevice xe)

Definition at line 1334 of file xe.c.

◆ Xe_pUploadIntegerConstants()

void Xe_pUploadIntegerConstants ( struct XenosDevice xe)

Definition at line 1365 of file xe.c.

◆ Xe_pUploadShader()

void Xe_pUploadShader ( struct XenosDevice xe)

Definition at line 1378 of file xe.c.

◆ Xe_pUploadShaderConstants()

void Xe_pUploadShaderConstants ( struct XenosDevice xe,
struct XenosShader s 
)

Definition at line 631 of file xe.c.

◆ Xe_pVBFNrComponents()

int Xe_pVBFNrComponents ( struct XenosDevice xe,
const struct XenosVBFElement fmt 
)

Definition at line 706 of file xe.c.

◆ Xe_pWaitReady()

void Xe_pWaitReady ( struct XenosDevice xe)

Definition at line 255 of file xe.c.

◆ Xe_pWaitReady2()

void Xe_pWaitReady2 ( struct XenosDevice xe)

Definition at line 265 of file xe.c.

◆ Xe_pWaitUntilIdle()

void Xe_pWaitUntilIdle ( struct XenosDevice xe,
u32  what 
)

Definition at line 177 of file xe.c.

◆ Xe_Resolve()

void Xe_Resolve ( struct XenosDevice xe)

Definition at line 1175 of file xe.c.

◆ Xe_ResolveInto()

void Xe_ResolveInto ( struct XenosDevice xe,
struct XenosSurface surface,
int  source,
int  clear 
)

Definition at line 1069 of file xe.c.

◆ Xe_SetAlphaFunc()

void Xe_SetAlphaFunc ( struct XenosDevice xe,
unsigned int  func 
)

Definition at line 1520 of file xe.c.

◆ Xe_SetAlphaRef()

void Xe_SetAlphaRef ( struct XenosDevice xe,
float  alpharef 
)

Definition at line 1528 of file xe.c.

◆ Xe_SetAlphaTestEnable()

void Xe_SetAlphaTestEnable ( struct XenosDevice xe,
int  enable 
)

Definition at line 1513 of file xe.c.

◆ Xe_SetBlendControl()

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 at line 1451 of file xe.c.

◆ Xe_SetBlendOp()

void Xe_SetBlendOp ( struct XenosDevice xe,
unsigned int  blendop 
)

Definition at line 1473 of file xe.c.

◆ Xe_SetBlendOpAlpha()

void Xe_SetBlendOpAlpha ( struct XenosDevice xe,
unsigned int  blendop 
)

Definition at line 1497 of file xe.c.

◆ Xe_SetClearColor()

void Xe_SetClearColor ( struct XenosDevice xe,
u32  clearcolor 
)

Definition at line 1758 of file xe.c.

◆ Xe_SetClipPlane()

void Xe_SetClipPlane ( struct XenosDevice xe,
int  idx,
float *  plane 
)

Definition at line 1650 of file xe.c.

◆ Xe_SetClipPlaneEnables()

void Xe_SetClipPlaneEnables ( struct XenosDevice xe,
int  enables 
)

Definition at line 1643 of file xe.c.

◆ Xe_SetCullMode()

void Xe_SetCullMode ( struct XenosDevice xe,
unsigned int  cullmode 
)

Definition at line 1505 of file xe.c.

◆ Xe_SetDestBlend()

void Xe_SetDestBlend ( struct XenosDevice xe,
unsigned int  blend 
)

Definition at line 1465 of file xe.c.

◆ Xe_SetDestBlendAlpha()

void Xe_SetDestBlendAlpha ( struct XenosDevice xe,
unsigned int  blend 
)

Definition at line 1489 of file xe.c.

◆ Xe_SetFillMode()

void Xe_SetFillMode ( struct XenosDevice xe,
int  front,
int  back 
)

Definition at line 1441 of file xe.c.

◆ Xe_SetFrameBufferSurface()

void Xe_SetFrameBufferSurface ( struct XenosDevice xe,
struct XenosSurface fb 
)

Definition at line 1257 of file xe.c.

◆ Xe_SetIndices()

void Xe_SetIndices ( struct XenosDevice xe,
struct XenosIndexBuffer ib 
)

Definition at line 1969 of file xe.c.

◆ Xe_SetPixelShaderConstantB()

void Xe_SetPixelShaderConstantB ( struct XenosDevice xe,
int  index,
int  value 
)

Definition at line 2051 of file xe.c.

◆ Xe_SetPixelShaderConstantF()

void Xe_SetPixelShaderConstantF ( struct XenosDevice xe,
int  start,
const float *  data,
int  count 
)

Definition at line 2025 of file xe.c.

◆ Xe_SetRenderTarget()

void Xe_SetRenderTarget ( struct XenosDevice xe,
struct XenosSurface rt 
)

Definition at line 998 of file xe.c.

◆ Xe_SetScissor()

void Xe_SetScissor ( struct XenosDevice xe,
int  enable,
int  left,
int  top,
int  right,
int  bottom 
)

Definition at line 1633 of file xe.c.

◆ Xe_SetShader()

void Xe_SetShader ( struct XenosDevice xe,
int  type,
struct XenosShader sh,
int  index 
)

Definition at line 1665 of file xe.c.

◆ Xe_SetSrcBlend()

void Xe_SetSrcBlend ( struct XenosDevice xe,
unsigned int  blend 
)

Definition at line 1457 of file xe.c.

◆ Xe_SetSrcBlendAlpha()

void Xe_SetSrcBlendAlpha ( struct XenosDevice xe,
unsigned int  blend 
)

Definition at line 1481 of file xe.c.

◆ Xe_SetStencilEnable()

void Xe_SetStencilEnable ( struct XenosDevice xe,
unsigned int  enable 
)

Definition at line 1550 of file xe.c.

◆ Xe_SetStencilFunc()

void Xe_SetStencilFunc ( struct XenosDevice xe,
int  bfff,
unsigned int  func 
)

Definition at line 1534 of file xe.c.

◆ Xe_SetStencilMask()

void Xe_SetStencilMask ( struct XenosDevice xe,
int  bfff,
int  mask 
)

Definition at line 1613 of file xe.c.

◆ Xe_SetStencilOp()

void Xe_SetStencilOp ( struct XenosDevice xe,
int  bfff,
int  fail,
int  zfail,
int  pass 
)

Definition at line 1558 of file xe.c.

◆ Xe_SetStencilRef()

void Xe_SetStencilRef ( struct XenosDevice xe,
int  bfff,
int  ref 
)

Definition at line 1603 of file xe.c.

◆ Xe_SetStencilWriteMask()

void Xe_SetStencilWriteMask ( struct XenosDevice xe,
int  bfff,
int  writemask 
)

Definition at line 1623 of file xe.c.

◆ Xe_SetStreamSource()

void Xe_SetStreamSource ( struct XenosDevice xe,
int  index,
struct XenosVertexBuffer vb,
int  offset,
int  stride 
)

Definition at line 1959 of file xe.c.

◆ Xe_SetTexture()

void Xe_SetTexture ( struct XenosDevice xe,
int  index,
struct XenosSurface tex 
)

Definition at line 1748 of file xe.c.

◆ Xe_SetVertexShaderConstantB()

void Xe_SetVertexShaderConstantB ( struct XenosDevice xe,
int  index,
int  value 
)

Definition at line 2038 of file xe.c.

◆ Xe_SetVertexShaderConstantF()

void Xe_SetVertexShaderConstantF ( struct XenosDevice xe,
int  start,
const float *  data,
int  count 
)

Definition at line 2013 of file xe.c.

◆ Xe_SetZEnable()

void Xe_SetZEnable ( struct XenosDevice xe,
int  ze 
)

Definition at line 1435 of file xe.c.

◆ Xe_SetZFunc()

void Xe_SetZFunc ( struct XenosDevice xe,
int  z_func 
)

Definition at line 1423 of file xe.c.

◆ Xe_SetZWrite()

void Xe_SetZWrite ( struct XenosDevice xe,
int  zw 
)

Definition at line 1429 of file xe.c.

◆ Xe_ShaderApplyVFetchPatches()

void Xe_ShaderApplyVFetchPatches ( struct XenosDevice xe,
struct XenosShader sh,
unsigned int  index,
const struct XenosVBFFormat fmt 
)

Definition at line 788 of file xe.c.

◆ Xe_Surface_LockRect()

void * Xe_Surface_LockRect ( struct XenosDevice xe,
struct XenosSurface surface,
int  x,
int  y,
int  w,
int  h,
int  flags 
)

Definition at line 2108 of file xe.c.

◆ Xe_Surface_Unlock()

void Xe_Surface_Unlock ( struct XenosDevice xe,
struct XenosSurface surface 
)

Definition at line 2135 of file xe.c.

◆ Xe_Sync()

void Xe_Sync ( struct XenosDevice xe)

Definition at line 1302 of file xe.c.

◆ Xe_VB_Lock()

void * Xe_VB_Lock ( struct XenosDevice xe,
struct XenosVertexBuffer vb,
int  offset,
int  size,
int  flags 
)

Definition at line 1991 of file xe.c.

◆ Xe_VB_Unlock()

void Xe_VB_Unlock ( struct XenosDevice xe,
struct XenosVertexBuffer vb 
)

Definition at line 1997 of file xe.c.

◆ Xe_VBBegin()

void Xe_VBBegin ( struct XenosDevice xe,
int  pitch 
)

Definition at line 1824 of file xe.c.

◆ Xe_VBEnd()

struct XenosVertexBuffer * Xe_VBEnd ( struct XenosDevice xe)

Definition at line 1863 of file xe.c.

◆ Xe_VBFCalcSize()

int Xe_VBFCalcSize ( struct XenosDevice xe,
const struct XenosVBFElement fmt 
)

Definition at line 689 of file xe.c.

◆ Xe_VBFCalcStride()

int Xe_VBFCalcStride ( struct XenosDevice xe,
const struct XenosVBFFormat fmt 
)

Definition at line 723 of file xe.c.

◆ Xe_VBPoolAdd()

void Xe_VBPoolAdd ( struct XenosDevice xe,
struct XenosVertexBuffer vb 
)

Definition at line 1805 of file xe.c.

◆ Xe_VBPoolAlloc()

struct XenosVertexBuffer * Xe_VBPoolAlloc ( struct XenosDevice xe,
int  size 
)

Definition at line 1783 of file xe.c.

◆ Xe_VBPut()

void Xe_VBPut ( struct XenosDevice xe,
void *  data,
int  len 
)

Definition at line 1831 of file xe.c.

◆ Xe_VBReclaim()

void Xe_VBReclaim ( struct XenosDevice xe)

Definition at line 1814 of file xe.c.

Variable Documentation

◆ stat_alu_uploaded

int stat_alu_uploaded = 0

Definition at line 1308 of file xe.c.

◆ xenos_ucode0

u32 xenos_ucode0[]
extern

Definition at line 3 of file ucode.c.

◆ xenos_ucode1

u32 xenos_ucode1[]
extern

Definition at line 25 of file ucode.c.