RetroArch
Macros
gx2_shader_inl.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define to_QWORD(w0, w1)   (((u64)(w1) << 32ull) | (w0))
 
#define to_LE(x)   (x)
 
#define CF_DWORD0(addr)   to_LE(addr)
 
#define CF_DWORD1(popCount, cfConst, cond, count, callCount, inst)   to_LE(popCount | (cfConst << 3) | (cond << 8) | (count << 10) | (callCount << 13) | (inst << 23) | (1 << 31))
 
#define CF_ALU_WORD0(addr, kcacheBank0, kcacheBank1, kcacheMode0)   to_LE(addr | (kcacheBank0 << 22) | (kcacheBank1 << 26) | (kcacheMode0 << 30))
 
#define CF_ALU_WORD1(kcacheMode1, kcacheAddr0, kcacheAddr1, count, altConst, inst)   to_LE(kcacheMode1 | (kcacheAddr0 << 2) | (kcacheAddr1 << 10) | (count << 18) | (altConst << 25) | (inst << 26) | (1 << 31))
 
#define CF_EXP_WORD0(dstReg_and_type, srcReg, srcRel, indexGpr, elemSize)   to_LE(dstReg_and_type | (srcReg << 15) | (srcRel << 22) | (indexGpr << 23) | (elemSize << 30))
 
#define CF_EXP_WORD1(srcSelX, srcSelY, srcSelZ, srcSelW, validPixelMode, inst)   to_LE(srcSelX | (srcSelY << 3) | (srcSelZ << 6) | (srcSelW << 9) | (validPixelMode << 22) | (inst << 23) | (1 << 31))
 
#define CF_ALLOC_EXPORT_WORD0(arrayBase, type, dstReg, dstRel, indexGpr, elemSize)   to_LE(arrayBase | (type << 13) | (dstReg << 15) | (dstRel << 22) | (indexGpr << 23) | (elemSize << 30))
 
#define CF_ALLOC_EXPORT_WORD1_BUF(arraySize, writeMask, inst)   to_LE(arraySize | (writeMask << 12) | (inst << 23) | (1 << 31))
 
#define ALU_SRC_KCACHE0_BASE   0x80
 
#define ALU_SRC_KCACHE1_BASE   0xA0
 
#define CF_KCACHE_BANK_LOCK_1   0x1
 
#define CB1   0x1
 
#define CB2   0x2
 
#define _0_15   CF_KCACHE_BANK_LOCK_1
 
#define KC0(x)   (x + ALU_SRC_KCACHE0_BASE)
 
#define KC1(x)   (x + ALU_SRC_KCACHE1_BASE)
 
#define NO_BARRIER   & ~to_QWORD(0,to_LE(1 << 31))
 
#define END_OF_PROGRAM   | to_QWORD(0,to_LE(1 << 21))
 
#define VALID_PIX   | to_QWORD(0,to_LE(1 << 22))
 
#define WHOLE_QUAD_MODE   | to_QWORD(0,to_LE(1 << 30))
 
#define BURSTCNT(x)   | to_QWORD(0,to_LE(x << 17))
 
#define WRITE(x)   (x >> 2)
 
#define ARRAY_SIZE(x)   x
 
#define ELEM_SIZE(x)   x
 
#define KCACHE0(bank, mode)   | to_QWORD(CF_ALU_WORD0(0, bank, 0, mode), 0)
 
#define KCACHE1(bank, mode)   | to_QWORD(CF_ALU_WORD0(0, 0, bank, 0), CF_ALU_WORD1(mode,0, 0, 0, 0, 0))
 
#define DEACTIVATE   1
 
#define UPDATE_EXEC_MASK(mode)   | to_QWORD(0, to_LE(mode << 2))
 
#define UPDATE_PRED   | to_QWORD(0, to_LE(1ull << 3))
 
#define CLAMP   | to_QWORD(0, to_LE(1ull << 31))
 
#define ALU_LAST   | to_QWORD(to_LE(1ull << 31), 0)
 
#define ALU_WORD0(src0Sel, src0Rel, src0Chan, src0Neg, src1Sel, src1Rel, src1Chan, src1Neg, indexMode, predSel)
 
#define ALU_WORD1_OP2(src0Abs, src1Abs, updateExecuteMask, updatePred, writeMask, omod, inst, encoding, bankSwizzle, dstGpr, dstRel, dstChan, clamp)
 
#define ALU_WORD1_OP3(src2Sel, src2Rel, src2Chan, src2Neg, inst, bankSwizzle, dstGpr, dstRel, dstChan, clamp)
 
#define TEX_WORD0(inst, bcFracMode, fetchWholeQuad, resourceID, srcReg, srcRel, altConst)   to_LE(inst | (bcFracMode << 5) | (fetchWholeQuad << 7) | (resourceID << 8) | (srcReg << 16) | (srcRel << 23) | (altConst << 24))
 
#define TEX_WORD1(dstReg, dstRel, dstSelX, dstSelY, dstSelZ, dstSelW, lodBias, coordTypeX, coordTypeY, coordTypeZ, coordTypeW)
 
#define TEX_WORD2(offsetX, offsetY, offsetZ, samplerID, srcSelX, srcSelY, srcSelZ, srcSelW)   to_LE(offsetX | (offsetY << 5) | (offsetZ << 10) | (samplerID << 15) | (srcSelX << 20) | (srcSelY << 23) | (srcSelZ << 26) | (srcSelW << 29))
 
#define VTX_WORD0(inst, type, buffer_id, srcReg, srcSelX, mega)   to_LE(inst | (type << 5) | (buffer_id << 8) | (srcReg << 16) | (srcSelX << 24) | (mega << 26))
 
#define VTX_WORD1(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW)   to_LE(dstReg | (dstSelX << 9) | (dstSelY << 12) | (dstSelZ << 15) | (dstSelW << 18) | (1 << 21))
 
#define VTX_WORD2(offset, ismega)   to_LE(offset| (ismega << 19))
 
#define _x   0
 
#define _y   1
 
#define _z   2
 
#define _w   3
 
#define _0   4
 
#define _1   5
 
#define _m   7 /*mask*/
 
#define _xyzw   0b1111
 
#define _xy__   0b0011
 
#define GX2_COMP_SEL(c0, c1, c2, c3)   (((c0) << 24) | ((c1) << 16) | ((c2) << 8) | (c3))
 
#define ALU_LITERAL(v)   to_QWORD(to_LE(v), 0)
 
#define ALU_LITERAL2(v0, v1)   to_QWORD(to_LE(v0), to_LE(v1))
 
#define ALU_LITERAL3(v0, v1, v2)   ALU_LITERAL2(v0,v1),ALU_LITERAL(v2)
 
#define ALU_LITERAL4(v0, v1, v2, v3)   ALU_LITERAL2(v0,v1),ALU_LITERAL2(v2,v3)
 
#define ALU_LITERAL5(v0, v1, v2, v3, v5)   ALU_LITERAL4(v0,v1,v2,v3),ALU_LITERAL(v4)
 
#define ALU_SRC_1_DBL_L   0xF4
 
#define ALU_SRC_1_DBL_M   0xF5
 
#define ALU_SRC_0_5_DBL_L   0xF6
 
#define ALU_SRC_0_5_DBL_M   0xF7
 
#define ALU_SRC_0   0xF8
 
#define ALU_SRC_1   0xF9
 
#define ALU_SRC_1_INT   0xFA
 
#define ALU_SRC_M_1_INT   0xFB
 
#define ALU_SRC_0_5   0xFC
 
#define ALU_SRC_LITERAL   0xFD
 
#define ALU_SRC_PV   0xFE
 
#define ALU_SRC_PS   0xFF
 
#define _NEG   | (1 << 12)
 
#define _ABS   | (1 << 13)
 
#define ALU_OMOD_OFF   0x0
 
#define ALU_OMOD_M2   0x1
 
#define ALU_OMOD_M4   0x2
 
#define ALU_OMOD_D2   0x3
 
#define ALU_VEC_012   0x0
 
#define ALU_VEC_021   0x1
 
#define ALU_VEC_120   0x2
 
#define ALU_VEC_102   0x3
 
#define ALU_VEC_201   0x4
 
#define ALU_VEC_210   0x5
 
#define VEC_012   | to_QWORD(0, to_LE(ALU_VEC_012 << 18))
 
#define VEC_021   | to_QWORD(0, to_LE(ALU_VEC_021 << 18))
 
#define VEC_120   | to_QWORD(0, to_LE(ALU_VEC_120 << 18))
 
#define VEC_102   | to_QWORD(0, to_LE(ALU_VEC_102 << 18))
 
#define VEC_201   | to_QWORD(0, to_LE(ALU_VEC_201 << 18))
 
#define VEC_210   | to_QWORD(0, to_LE(ALU_VEC_210 << 18))
 
#define VALID_PIX   | to_QWORD(0,to_LE(1 << 22))
 
#define ALU_SCL_210   0x0
 
#define ALU_SCL_122   0x1
 
#define ALU_SCL_212   0x2
 
#define ALU_SCL_221   0x3
 
#define SCL_210   | to_QWORD(0, to_LE(ALU_SCL_210 << 18))
 
#define SCL_122   | to_QWORD(0, to_LE(ALU_SCL_122 << 18))
 
#define SCL_212   | to_QWORD(0, to_LE(ALU_SCL_212 << 18))
 
#define SCL_221   | to_QWORD(0, to_LE(ALU_SCL_221 << 18))
 
#define FETCH_TYPE(x)   x
 
#define MINI(x)   ((x) - 1)
 
#define MEGA(x)   (MINI(x) | 0x80000000)
 
#define OFFSET(x)   x
 
#define VERTEX_DATA   0
 
#define INSTANCE_DATA   1
 
#define NO_INDEX_OFFSET   2
 
#define CF_COND_ACTIVE   0x0
 
#define CF_COND_FALSE   0x1
 
#define CF_COND_BOOL   0x2
 
#define CF_COND_NOT_BOOL   0x3
 
#define TEX_UNNORMALIZED   0x0
 
#define TEX_NORMALIZED   0x1
 
#define CF_INST_TEX   0x01
 
#define CF_INST_VTX   0x02
 
#define CF_INST_JUMP   0x0A
 
#define CF_INST_ELSE   0x0D
 
#define CF_INST_CALL_FS   0x13
 
#define CF_INST_EMIT_VERTEX   0x15
 
#define CF_INST_MEM_RING   0x26
 
#define CF_INST_ALU   0x08
 
#define CF_INST_ALU_PUSH_BEFORE   0x09
 
#define CF_INST_ALU_POP_AFTER   0x0A
 
#define OP2_INST_ADD   0x0
 
#define OP2_INST_MUL   0x1
 
#define OP2_INST_MUL_IEEE   0x2
 
#define OP2_INST_MIN   0x04
 
#define OP2_INST_MAX   0x03
 
#define OP2_INST_MAX_DX10   0x05
 
#define OP2_INST_FRACT   0x10
 
#define OP2_INST_SETGT   0x09
 
#define OP2_INST_SETE_DX10   0x0C
 
#define OP2_INST_SETGT_DX10   0x0D
 
#define OP2_INST_FLOOR   0x14
 
#define OP2_INST_MOV   0x19
 
#define OP2_INST_PRED_SETGT   0x21
 
#define OP2_INST_PRED_SETE_INT   0x42
 
#define OP2_INST_DOT4   0x50
 
#define OP2_INST_DOT4_IEEE   0x51
 
#define OP2_INST_RECIP_IEEE   0x66
 
#define OP2_INST_RECIPSQRT_IEEE   0x69
 
#define OP2_INST_SQRT_IEEE   0x6A
 
#define OP2_INST_SIN   0x6E
 
#define OP2_INST_COS   0x6F
 
#define OP3_INST_MULADD   0x10
 
#define OP3_INST_CNDGT   0x19
 
#define OP3_INST_CNDE_INT   0x1C
 
#define CF_INST_EXP   0x27
 
#define CF_INST_EXP_DONE   0x28
 
#define TEX_INST_GET_GRADIENTS_H   0x07
 
#define TEX_INST_GET_GRADIENTS_V   0x08
 
#define TEX_INST_SAMPLE   0x10
 
#define VTX_INST_FETCH   0x0
 
#define EXPORT_TYPE_PIXEL   0x0
 
#define EXPORT_TYPE_POS   0x1
 
#define EXPORT_TYPE_PARAM   0x2
 
#define EXPORT_ARRAY_BASE_POS(id)   (0x3C + id) /* [0, 3] */
 
#define EXPORT_ARRAY_BASE_PARAM(id)   id /* [0, 31] */
 
#define EXPORT_ARRAY_BASE_PIX(id)   id
 
#define POS(id)   EXPORT_ARRAY_BASE_POS(id) | (EXPORT_TYPE_POS << 13)
 
#define PARAM(id)   EXPORT_ARRAY_BASE_PARAM(id) | (EXPORT_TYPE_PARAM << 13)
 
#define PIX(id)   EXPORT_ARRAY_BASE_PIX(id) | (EXPORT_TYPE_PIXEL << 13)
 
#define POS0   POS(0)
 
#define PARAM0   PARAM(0)
 
#define PARAM1   PARAM(1)
 
#define PIX0   PIX(0)
 
#define __   (0x80) /* invalid regitser (write mask off) */
 
#define _R(x)   x
 
#define _R0   _R(0x0)
 
#define _R1   _R(0x1)
 
#define _R2   _R(0x2)
 
#define _R3   _R(0x3)
 
#define _R4   _R(0x4)
 
#define _R5   _R(0x5)
 
#define _R6   _R(0x6)
 
#define _R7   _R(0x7)
 
#define _R8   _R(0x8)
 
#define _R9   _R(0x9)
 
#define _R10   _R(0xA)
 
#define _R11   _R(0xB)
 
#define _R12   _R(0xC)
 
#define _R13   _R(0xD)
 
#define _R14   _R(0xE)
 
#define _R15   _R(0xF)
 
#define _R120   _R(0x78)
 
#define _R121   _R(0x79)
 
#define _R122   _R(0x7A)
 
#define _R123   _R(0x7B)
 
#define _R124   _R(0x7C)
 
#define _R125   _R(0x7D)
 
#define _R126   _R(0x7E)
 
#define _R127   _R(0x7F)
 
#define _t(x)   x
 
#define _t0   _t(0x0)
 
#define _s(x)   x
 
#define _s0   _s(0x0)
 
#define _b(x)   x
 
#define CALL_FS   to_QWORD(CF_DWORD0(0), CF_DWORD1(0,0,0,0,0,CF_INST_CALL_FS))
 
#define TEX(addr, cnt)   to_QWORD(CF_DWORD0(addr), CF_DWORD1(0x0, 0x0, CF_COND_ACTIVE, (cnt - 1), 0x0, CF_INST_TEX))
 
#define VTX(addr, cnt)   to_QWORD(CF_DWORD0(addr), CF_DWORD1(0x0, 0x0, CF_COND_ACTIVE, (cnt - 1), 0x0, CF_INST_VTX))
 
#define JUMP(popCount, addr)   to_QWORD(CF_DWORD0(addr), CF_DWORD1(popCount, 0x0, CF_COND_ACTIVE, 0x0, 0x0, CF_INST_JUMP))
 
#define ELSE(popCount, addr)   to_QWORD(CF_DWORD0(addr), CF_DWORD1(popCount, 0x0, CF_COND_ACTIVE, 0x0, 0x0, CF_INST_ELSE))
 
#define ALU(addr, cnt)   to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU))
 
#define ALU_PUSH_BEFORE(addr, cnt)   to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU_PUSH_BEFORE))
 
#define ALU_POP_AFTER(addr, cnt)   to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU_POP_AFTER))
 
#define EXP_DONE(dstReg_and_type, srcReg, srcSelX, srcSelY, srcSelZ, srcSelW)
 
#define EXP(dstReg_and_type, srcReg, srcSelX, srcSelY, srcSelZ, srcSelW)
 
#define MEM_RING(arrayBase, dstReg, writeMask, arraySize, elemSize)
 
#define EMIT_VERTEX   to_QWORD(0, CF_DWORD1(0, 0, 0, 0, 0, CF_INST_EMIT_VERTEX))
 
#define ALU_OP2(inst, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, omod)
 
#define ALU_OP3(inst, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)
 
#define ALU_ADD(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_ADD_x2(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)
 
#define ALU_ADD_D2(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_D2)
 
#define ALU_MUL(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_MUL_x2(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)
 
#define ALU_MUL_x4(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M4)
 
#define ALU_MUL_IEEE(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_MUL_IEEE_x2(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)
 
#define ALU_MUL_IEEE_x4(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M4)
 
#define ALU_FRACT(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_FRACT, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_FLOOR(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_FLOOR, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_SQRT_IEEE(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_SQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_SQRT_IEEE_D2(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_SQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)
 
#define ALU_MOV(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_MOV_D2(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)
 
#define ALU_MOV_x2(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_M2)
 
#define ALU_MOV_x4(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_M4)
 
#define ALU_DOT4_IEEE(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_DOT4_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_DOT4(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_DOT4, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_PRED_SETGT(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_PRED_SETGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_SETE_DX10(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_SETE_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_SETGT_DX10(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_SETGT_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_SETGT(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_SETGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_PRED_SETE_INT(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_PRED_SETE_INT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_MIN(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MIN, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_MAX(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MAX, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_MAX_DX10(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan)   ALU_OP2(OP2_INST_MAX_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)
 
#define ALU_RECIP_IEEE(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_RECIP_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_RECIPSQRT_IEEE(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_RECIPSQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_SIN(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_SIN, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_COS(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_COS, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)
 
#define ALU_COS_D2(dstGpr, dstChan, src0Sel, src0Chan)   ALU_OP2(OP2_INST_COS, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)
 
#define ALU_MULADD(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)   ALU_OP3(OP3_INST_MULADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)
 
#define ALU_CNDGT(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)   ALU_OP3(OP3_INST_CNDGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)
 
#define ALU_CNDE_INT(dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)   ALU_OP3(OP3_INST_CNDE_INT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)
 
#define TEX_SAMPLE(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW, srcReg, srcSelX, srcSelY, srcSelZ, srcSelW, resourceID, samplerID)
 
#define TEX_GET_GRADIENTS_H(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW, srcReg, srcSelX, srcSelY, srcSelZ, srcSelW, resourceID, samplerID)
 
#define TEX_GET_GRADIENTS_V(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW, srcReg, srcSelX, srcSelY, srcSelZ, srcSelW, resourceID, samplerID)
 
#define VTX_FETCH(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW, srcReg, srcSelX, buffer_id, type, mega, offset)
 
#define _x2(v)   v, v
 
#define _x4(v)   _x2(v), _x2(v)
 
#define _x8(v)   _x4(v), _x4(v)
 
#define _x16(v)   _x8(v), _x8(v)
 
#define _x9(v)   _x8(v), v
 
#define _x30(v)   _x16(v), _x8(v), _x4(v),_x2(v)
 
#define _x31(v)   _x30(v), v
 

Macro Definition Documentation

◆ _0

#define _0   4

◆ _0_15

#define _0_15   CF_KCACHE_BANK_LOCK_1

◆ _1

#define _1   5

◆ __

#define __   (0x80) /* invalid regitser (write mask off) */

◆ _ABS

#define _ABS   | (1 << 13)

◆ _b

#define _b (   x)    x

◆ _m

#define _m   7 /*mask*/

◆ _NEG

#define _NEG   | (1 << 12)

◆ _R

#define _R (   x)    x

◆ _R0

#define _R0   _R(0x0)

◆ _R1

#define _R1   _R(0x1)

◆ _R10

#define _R10   _R(0xA)

◆ _R11

#define _R11   _R(0xB)

◆ _R12

#define _R12   _R(0xC)

◆ _R120

#define _R120   _R(0x78)

◆ _R121

#define _R121   _R(0x79)

◆ _R122

#define _R122   _R(0x7A)

◆ _R123

#define _R123   _R(0x7B)

◆ _R124

#define _R124   _R(0x7C)

◆ _R125

#define _R125   _R(0x7D)

◆ _R126

#define _R126   _R(0x7E)

◆ _R127

#define _R127   _R(0x7F)

◆ _R13

#define _R13   _R(0xD)

◆ _R14

#define _R14   _R(0xE)

◆ _R15

#define _R15   _R(0xF)

◆ _R2

#define _R2   _R(0x2)

◆ _R3

#define _R3   _R(0x3)

◆ _R4

#define _R4   _R(0x4)

◆ _R5

#define _R5   _R(0x5)

◆ _R6

#define _R6   _R(0x6)

◆ _R7

#define _R7   _R(0x7)

◆ _R8

#define _R8   _R(0x8)

◆ _R9

#define _R9   _R(0x9)

◆ _s

#define _s (   x)    x

◆ _s0

#define _s0   _s(0x0)

◆ _t

#define _t (   x)    x

◆ _t0

#define _t0   _t(0x0)

◆ _w

#define _w   3

◆ _x

#define _x   0

◆ _x16

#define _x16 (   v)    _x8(v), _x8(v)

◆ _x2

#define _x2 (   v)    v, v

◆ _x30

#define _x30 (   v)    _x16(v), _x8(v), _x4(v),_x2(v)

◆ _x31

#define _x31 (   v)    _x30(v), v

◆ _x4

#define _x4 (   v)    _x2(v), _x2(v)

◆ _x8

#define _x8 (   v)    _x4(v), _x4(v)

◆ _x9

#define _x9 (   v)    _x8(v), v

◆ _xy__

#define _xy__   0b0011

◆ _xyzw

#define _xyzw   0b1111

◆ _y

#define _y   1

◆ _z

#define _z   2

◆ ALU

#define ALU (   addr,
  cnt 
)    to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU))

◆ ALU_ADD

#define ALU_ADD (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_ADD_D2

#define ALU_ADD_D2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_D2)

◆ ALU_ADD_x2

#define ALU_ADD_x2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_ADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)

◆ ALU_CNDE_INT

#define ALU_CNDE_INT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan,
  src2Sel,
  src2Chan 
)    ALU_OP3(OP3_INST_CNDE_INT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)

◆ ALU_CNDGT

#define ALU_CNDGT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan,
  src2Sel,
  src2Chan 
)    ALU_OP3(OP3_INST_CNDGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)

◆ ALU_COS

#define ALU_COS (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_COS, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_COS_D2

#define ALU_COS_D2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_COS, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)

◆ ALU_DOT4

#define ALU_DOT4 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_DOT4, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_DOT4_IEEE

#define ALU_DOT4_IEEE (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_DOT4_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_FLOOR

#define ALU_FLOOR (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_FLOOR, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_FRACT

#define ALU_FRACT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_FRACT, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_LAST

#define ALU_LAST   | to_QWORD(to_LE(1ull << 31), 0)

◆ ALU_LITERAL

#define ALU_LITERAL (   v)    to_QWORD(to_LE(v), 0)

◆ ALU_LITERAL2

#define ALU_LITERAL2 (   v0,
  v1 
)    to_QWORD(to_LE(v0), to_LE(v1))

◆ ALU_LITERAL3

#define ALU_LITERAL3 (   v0,
  v1,
  v2 
)    ALU_LITERAL2(v0,v1),ALU_LITERAL(v2)

◆ ALU_LITERAL4

#define ALU_LITERAL4 (   v0,
  v1,
  v2,
  v3 
)    ALU_LITERAL2(v0,v1),ALU_LITERAL2(v2,v3)

◆ ALU_LITERAL5

#define ALU_LITERAL5 (   v0,
  v1,
  v2,
  v3,
  v5 
)    ALU_LITERAL4(v0,v1,v2,v3),ALU_LITERAL(v4)

◆ ALU_MAX

#define ALU_MAX (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MAX, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_MAX_DX10

#define ALU_MAX_DX10 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MAX_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_MIN

#define ALU_MIN (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MIN, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_MOV

#define ALU_MOV (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_MOV_D2

#define ALU_MOV_D2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)

◆ ALU_MOV_x2

#define ALU_MOV_x2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_M2)

◆ ALU_MOV_x4

#define ALU_MOV_x4 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_MOV, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_M4)

◆ ALU_MUL

#define ALU_MUL (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_MUL_IEEE

#define ALU_MUL_IEEE (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_MUL_IEEE_x2

#define ALU_MUL_IEEE_x2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)

◆ ALU_MUL_IEEE_x4

#define ALU_MUL_IEEE_x4 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL_IEEE, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M4)

◆ ALU_MUL_x2

#define ALU_MUL_x2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M2)

◆ ALU_MUL_x4

#define ALU_MUL_x4 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_MUL, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_M4)

◆ ALU_MULADD

#define ALU_MULADD (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan,
  src2Sel,
  src2Chan 
)    ALU_OP3(OP3_INST_MULADD, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, src2Sel, src2Chan)

◆ ALU_OMOD_D2

#define ALU_OMOD_D2   0x3

◆ ALU_OMOD_M2

#define ALU_OMOD_M2   0x1

◆ ALU_OMOD_M4

#define ALU_OMOD_M4   0x2

◆ ALU_OMOD_OFF

#define ALU_OMOD_OFF   0x0

◆ ALU_OP2

#define ALU_OP2 (   inst,
  dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan,
  omod 
)
Value:
to_QWORD(ALU_WORD0(((src0Sel) & ((1 << 13) - 1)), 0x0, src0Chan, 0x0, ((src1Sel) & ((1 << 13) - 1)), 0x0, src1Chan, 0x0, 0x0, 0x0), \
ALU_WORD1_OP2(((src0Sel) >> 13), ((src1Sel) >> 13), 0x0, 0x0, (((dstGpr&__) >> 7) ^ 0x1), omod, inst, 0x0, 0x0, dstGpr, 0x0, dstChan, 0x0))
#define ALU_WORD1_OP2(src0Abs, src1Abs, updateExecuteMask, updatePred, writeMask, omod, inst, encoding, bankSwizzle, dstGpr, dstRel, dstChan, clamp)
Definition: gx2_shader_inl.h:85
#define ALU_WORD0(src0Sel, src0Rel, src0Chan, src0Neg, src1Sel, src1Rel, src1Chan, src1Neg, indexMode, predSel)
Definition: gx2_shader_inl.h:81
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define __
Definition: gx2_shader_inl.h:270

◆ ALU_OP3

#define ALU_OP3 (   inst,
  dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan,
  src2Sel,
  src2Chan 
)
Value:
to_QWORD(ALU_WORD0(src0Sel, 0x0, src0Chan, 0x0, src1Sel, 0x0, src1Chan, 0x0, 0x0, 0x0), \
ALU_WORD1_OP3(src2Sel, 0x0, src2Chan, 0x0, inst, 0x0, dstGpr, 0x0, dstChan, 0x0))
#define ALU_WORD0(src0Sel, src0Rel, src0Chan, src0Neg, src1Sel, src1Rel, src1Chan, src1Neg, indexMode, predSel)
Definition: gx2_shader_inl.h:81
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define ALU_WORD1_OP3(src2Sel, src2Rel, src2Chan, src2Neg, inst, bankSwizzle, dstGpr, dstRel, dstChan, clamp)
Definition: gx2_shader_inl.h:89

◆ ALU_POP_AFTER

#define ALU_POP_AFTER (   addr,
  cnt 
)    to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU_POP_AFTER))

◆ ALU_PRED_SETE_INT

#define ALU_PRED_SETE_INT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_PRED_SETE_INT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_PRED_SETGT

#define ALU_PRED_SETGT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_PRED_SETGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_PUSH_BEFORE

#define ALU_PUSH_BEFORE (   addr,
  cnt 
)    to_QWORD(CF_ALU_WORD0(addr, 0x0, 0x0, 0x0), CF_ALU_WORD1(0x0, 0x0, 0x0, (cnt - 1), 0x0, CF_INST_ALU_PUSH_BEFORE))

◆ ALU_RECIP_IEEE

#define ALU_RECIP_IEEE (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_RECIP_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_RECIPSQRT_IEEE

#define ALU_RECIPSQRT_IEEE (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_RECIPSQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_SCL_122

#define ALU_SCL_122   0x1

◆ ALU_SCL_210

#define ALU_SCL_210   0x0

◆ ALU_SCL_212

#define ALU_SCL_212   0x2

◆ ALU_SCL_221

#define ALU_SCL_221   0x3

◆ ALU_SETE_DX10

#define ALU_SETE_DX10 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_SETE_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_SETGT

#define ALU_SETGT (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_SETGT, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_SETGT_DX10

#define ALU_SETGT_DX10 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan,
  src1Sel,
  src1Chan 
)    ALU_OP2(OP2_INST_SETGT_DX10, dstGpr, dstChan, src0Sel, src0Chan, src1Sel, src1Chan, ALU_OMOD_OFF)

◆ ALU_SIN

#define ALU_SIN (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_SIN, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_SQRT_IEEE

#define ALU_SQRT_IEEE (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_SQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_OFF)

◆ ALU_SQRT_IEEE_D2

#define ALU_SQRT_IEEE_D2 (   dstGpr,
  dstChan,
  src0Sel,
  src0Chan 
)    ALU_OP2(OP2_INST_SQRT_IEEE, dstGpr, dstChan, src0Sel, src0Chan, ALU_SRC_0, 0x0, ALU_OMOD_D2)

◆ ALU_SRC_0

#define ALU_SRC_0   0xF8

◆ ALU_SRC_0_5

#define ALU_SRC_0_5   0xFC

◆ ALU_SRC_0_5_DBL_L

#define ALU_SRC_0_5_DBL_L   0xF6

◆ ALU_SRC_0_5_DBL_M

#define ALU_SRC_0_5_DBL_M   0xF7

◆ ALU_SRC_1

#define ALU_SRC_1   0xF9

◆ ALU_SRC_1_DBL_L

#define ALU_SRC_1_DBL_L   0xF4

◆ ALU_SRC_1_DBL_M

#define ALU_SRC_1_DBL_M   0xF5

◆ ALU_SRC_1_INT

#define ALU_SRC_1_INT   0xFA

◆ ALU_SRC_KCACHE0_BASE

#define ALU_SRC_KCACHE0_BASE   0x80

◆ ALU_SRC_KCACHE1_BASE

#define ALU_SRC_KCACHE1_BASE   0xA0

◆ ALU_SRC_LITERAL

#define ALU_SRC_LITERAL   0xFD

◆ ALU_SRC_M_1_INT

#define ALU_SRC_M_1_INT   0xFB

◆ ALU_SRC_PS

#define ALU_SRC_PS   0xFF

◆ ALU_SRC_PV

#define ALU_SRC_PV   0xFE

◆ ALU_VEC_012

#define ALU_VEC_012   0x0

◆ ALU_VEC_021

#define ALU_VEC_021   0x1

◆ ALU_VEC_102

#define ALU_VEC_102   0x3

◆ ALU_VEC_120

#define ALU_VEC_120   0x2

◆ ALU_VEC_201

#define ALU_VEC_201   0x4

◆ ALU_VEC_210

#define ALU_VEC_210   0x5

◆ ALU_WORD0

#define ALU_WORD0 (   src0Sel,
  src0Rel,
  src0Chan,
  src0Neg,
  src1Sel,
  src1Rel,
  src1Chan,
  src1Neg,
  indexMode,
  predSel 
)
Value:
to_LE(src0Sel | ((src0Rel) << 9) | ((src0Chan) << 10) | ((src0Neg) << 12) | ((src1Sel) << 13) | ((src1Rel) << 22) \
| ((src1Chan) << 23) | ((src1Neg) << 25) | ((indexMode) << 26) | ((predSel) << 29))
#define to_LE(x)
Definition: gx2_shader_inl.h:24

◆ ALU_WORD1_OP2

#define ALU_WORD1_OP2 (   src0Abs,
  src1Abs,
  updateExecuteMask,
  updatePred,
  writeMask,
  omod,
  inst,
  encoding,
  bankSwizzle,
  dstGpr,
  dstRel,
  dstChan,
  clamp 
)
Value:
to_LE(src0Abs | (src1Abs << 1) | (updateExecuteMask << 2) | (updatePred << 3) | (writeMask << 4) | (omod << 5) | (inst << 7) | \
(encoding << 15) | (bankSwizzle << 18) | ((dstGpr&0x7F) << 21) | (dstRel << 28) | ((dstChan&0x3) << 29) | (clamp << 31))
#define to_LE(x)
Definition: gx2_shader_inl.h:24
JSON_Encoding encoding
Definition: jsonsax_full.h:274
GLenum clamp
Definition: glext.h:6856

◆ ALU_WORD1_OP3

#define ALU_WORD1_OP3 (   src2Sel,
  src2Rel,
  src2Chan,
  src2Neg,
  inst,
  bankSwizzle,
  dstGpr,
  dstRel,
  dstChan,
  clamp 
)
Value:
to_LE(src2Sel | (src2Rel << 9) | (src2Chan << 10) | (src2Neg << 12) | (inst << 13) | \
(bankSwizzle << 18) | ((dstGpr&0x7F) << 21) | (dstRel << 28) | ((dstChan&0x3) << 29) | (clamp << 31))
#define to_LE(x)
Definition: gx2_shader_inl.h:24
GLenum clamp
Definition: glext.h:6856

◆ ARRAY_SIZE

#define ARRAY_SIZE (   x)    x

◆ BURSTCNT

#define BURSTCNT (   x)    | to_QWORD(0,to_LE(x << 17))

◆ CALL_FS

#define CALL_FS   to_QWORD(CF_DWORD0(0), CF_DWORD1(0,0,0,0,0,CF_INST_CALL_FS))

◆ CB1

#define CB1   0x1

◆ CB2

#define CB2   0x2

◆ CF_ALLOC_EXPORT_WORD0

#define CF_ALLOC_EXPORT_WORD0 (   arrayBase,
  type,
  dstReg,
  dstRel,
  indexGpr,
  elemSize 
)    to_LE(arrayBase | (type << 13) | (dstReg << 15) | (dstRel << 22) | (indexGpr << 23) | (elemSize << 30))

◆ CF_ALLOC_EXPORT_WORD1_BUF

#define CF_ALLOC_EXPORT_WORD1_BUF (   arraySize,
  writeMask,
  inst 
)    to_LE(arraySize | (writeMask << 12) | (inst << 23) | (1 << 31))

◆ CF_ALU_WORD0

#define CF_ALU_WORD0 (   addr,
  kcacheBank0,
  kcacheBank1,
  kcacheMode0 
)    to_LE(addr | (kcacheBank0 << 22) | (kcacheBank1 << 26) | (kcacheMode0 << 30))

◆ CF_ALU_WORD1

#define CF_ALU_WORD1 (   kcacheMode1,
  kcacheAddr0,
  kcacheAddr1,
  count,
  altConst,
  inst 
)    to_LE(kcacheMode1 | (kcacheAddr0 << 2) | (kcacheAddr1 << 10) | (count << 18) | (altConst << 25) | (inst << 26) | (1 << 31))

◆ CF_COND_ACTIVE

#define CF_COND_ACTIVE   0x0

◆ CF_COND_BOOL

#define CF_COND_BOOL   0x2

◆ CF_COND_FALSE

#define CF_COND_FALSE   0x1

◆ CF_COND_NOT_BOOL

#define CF_COND_NOT_BOOL   0x3

◆ CF_DWORD0

#define CF_DWORD0 (   addr)    to_LE(addr)

◆ CF_DWORD1

#define CF_DWORD1 (   popCount,
  cfConst,
  cond,
  count,
  callCount,
  inst 
)    to_LE(popCount | (cfConst << 3) | (cond << 8) | (count << 10) | (callCount << 13) | (inst << 23) | (1 << 31))

◆ CF_EXP_WORD0

#define CF_EXP_WORD0 (   dstReg_and_type,
  srcReg,
  srcRel,
  indexGpr,
  elemSize 
)    to_LE(dstReg_and_type | (srcReg << 15) | (srcRel << 22) | (indexGpr << 23) | (elemSize << 30))

◆ CF_EXP_WORD1

#define CF_EXP_WORD1 (   srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW,
  validPixelMode,
  inst 
)    to_LE(srcSelX | (srcSelY << 3) | (srcSelZ << 6) | (srcSelW << 9) | (validPixelMode << 22) | (inst << 23) | (1 << 31))

◆ CF_INST_ALU

#define CF_INST_ALU   0x08

◆ CF_INST_ALU_POP_AFTER

#define CF_INST_ALU_POP_AFTER   0x0A

◆ CF_INST_ALU_PUSH_BEFORE

#define CF_INST_ALU_PUSH_BEFORE   0x09

◆ CF_INST_CALL_FS

#define CF_INST_CALL_FS   0x13

◆ CF_INST_ELSE

#define CF_INST_ELSE   0x0D

◆ CF_INST_EMIT_VERTEX

#define CF_INST_EMIT_VERTEX   0x15

◆ CF_INST_EXP

#define CF_INST_EXP   0x27

◆ CF_INST_EXP_DONE

#define CF_INST_EXP_DONE   0x28

◆ CF_INST_JUMP

#define CF_INST_JUMP   0x0A

◆ CF_INST_MEM_RING

#define CF_INST_MEM_RING   0x26

◆ CF_INST_TEX

#define CF_INST_TEX   0x01

◆ CF_INST_VTX

#define CF_INST_VTX   0x02

◆ CF_KCACHE_BANK_LOCK_1

#define CF_KCACHE_BANK_LOCK_1   0x1

◆ CLAMP

#define CLAMP   | to_QWORD(0, to_LE(1ull << 31))

◆ DEACTIVATE

#define DEACTIVATE   1

◆ ELEM_SIZE

#define ELEM_SIZE (   x)    x

◆ ELSE

#define ELSE (   popCount,
  addr 
)    to_QWORD(CF_DWORD0(addr), CF_DWORD1(popCount, 0x0, CF_COND_ACTIVE, 0x0, 0x0, CF_INST_ELSE))

◆ EMIT_VERTEX

#define EMIT_VERTEX   to_QWORD(0, CF_DWORD1(0, 0, 0, 0, 0, CF_INST_EMIT_VERTEX))

◆ END_OF_PROGRAM

#define END_OF_PROGRAM   | to_QWORD(0,to_LE(1 << 21))

◆ EXP

#define EXP (   dstReg_and_type,
  srcReg,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW 
)
Value:
to_QWORD(CF_EXP_WORD0(dstReg_and_type, srcReg, 0x0, 0x0, 0x0), \
CF_EXP_WORD1(srcSelX, srcSelY, srcSelZ, srcSelW, 0x0, CF_INST_EXP))
#define CF_EXP_WORD0(dstReg_and_type, srcReg, srcRel, indexGpr, elemSize)
Definition: gx2_shader_inl.h:38
#define CF_EXP_WORD1(srcSelX, srcSelY, srcSelZ, srcSelW, validPixelMode, inst)
Definition: gx2_shader_inl.h:41
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define CF_INST_EXP
Definition: gx2_shader_inl.h:240

◆ EXP_DONE

#define EXP_DONE (   dstReg_and_type,
  srcReg,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW 
)
Value:
to_QWORD(CF_EXP_WORD0(dstReg_and_type, srcReg, 0x0, 0x0, 0x0), \
CF_EXP_WORD1(srcSelX, srcSelY, srcSelZ, srcSelW, 0x0, CF_INST_EXP_DONE))
#define CF_INST_EXP_DONE
Definition: gx2_shader_inl.h:241
#define CF_EXP_WORD0(dstReg_and_type, srcReg, srcRel, indexGpr, elemSize)
Definition: gx2_shader_inl.h:38
#define CF_EXP_WORD1(srcSelX, srcSelY, srcSelZ, srcSelW, validPixelMode, inst)
Definition: gx2_shader_inl.h:41
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23

◆ EXPORT_ARRAY_BASE_PARAM

#define EXPORT_ARRAY_BASE_PARAM (   id)    id /* [0, 31] */

◆ EXPORT_ARRAY_BASE_PIX

#define EXPORT_ARRAY_BASE_PIX (   id)    id

◆ EXPORT_ARRAY_BASE_POS

#define EXPORT_ARRAY_BASE_POS (   id)    (0x3C + id) /* [0, 3] */

◆ EXPORT_TYPE_PARAM

#define EXPORT_TYPE_PARAM   0x2

◆ EXPORT_TYPE_PIXEL

#define EXPORT_TYPE_PIXEL   0x0

◆ EXPORT_TYPE_POS

#define EXPORT_TYPE_POS   0x1

◆ FETCH_TYPE

#define FETCH_TYPE (   x)    x

◆ GX2_COMP_SEL

#define GX2_COMP_SEL (   c0,
  c1,
  c2,
  c3 
)    (((c0) << 24) | ((c1) << 16) | ((c2) << 8) | (c3))

◆ INSTANCE_DATA

#define INSTANCE_DATA   1

◆ JUMP

#define JUMP (   popCount,
  addr 
)    to_QWORD(CF_DWORD0(addr), CF_DWORD1(popCount, 0x0, CF_COND_ACTIVE, 0x0, 0x0, CF_INST_JUMP))

◆ KC0

#define KC0 (   x)    (x + ALU_SRC_KCACHE0_BASE)

◆ KC1

#define KC1 (   x)    (x + ALU_SRC_KCACHE1_BASE)

◆ KCACHE0

#define KCACHE0 (   bank,
  mode 
)    | to_QWORD(CF_ALU_WORD0(0, bank, 0, mode), 0)

◆ KCACHE1

#define KCACHE1 (   bank,
  mode 
)    | to_QWORD(CF_ALU_WORD0(0, 0, bank, 0), CF_ALU_WORD1(mode,0, 0, 0, 0, 0))

◆ MEGA

#define MEGA (   x)    (MINI(x) | 0x80000000)

◆ MEM_RING

#define MEM_RING (   arrayBase,
  dstReg,
  writeMask,
  arraySize,
  elemSize 
)
Value:
to_QWORD(CF_ALLOC_EXPORT_WORD0(arrayBase, 0x00, dstReg, 0x00, 0x00, elemSize), \
#define CF_INST_MEM_RING
Definition: gx2_shader_inl.h:208
#define CF_ALLOC_EXPORT_WORD0(arrayBase, type, dstReg, dstRel, indexGpr, elemSize)
Definition: gx2_shader_inl.h:44
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define CF_ALLOC_EXPORT_WORD1_BUF(arraySize, writeMask, inst)
Definition: gx2_shader_inl.h:47

◆ MINI

#define MINI (   x)    ((x) - 1)

◆ NO_BARRIER

#define NO_BARRIER   & ~to_QWORD(0,to_LE(1 << 31))

◆ NO_INDEX_OFFSET

#define NO_INDEX_OFFSET   2

◆ OFFSET

#define OFFSET (   x)    x

◆ OP2_INST_ADD

#define OP2_INST_ADD   0x0

◆ OP2_INST_COS

#define OP2_INST_COS   0x6F

◆ OP2_INST_DOT4

#define OP2_INST_DOT4   0x50

◆ OP2_INST_DOT4_IEEE

#define OP2_INST_DOT4_IEEE   0x51

◆ OP2_INST_FLOOR

#define OP2_INST_FLOOR   0x14

◆ OP2_INST_FRACT

#define OP2_INST_FRACT   0x10

◆ OP2_INST_MAX

#define OP2_INST_MAX   0x03

◆ OP2_INST_MAX_DX10

#define OP2_INST_MAX_DX10   0x05

◆ OP2_INST_MIN

#define OP2_INST_MIN   0x04

◆ OP2_INST_MOV

#define OP2_INST_MOV   0x19

◆ OP2_INST_MUL

#define OP2_INST_MUL   0x1

◆ OP2_INST_MUL_IEEE

#define OP2_INST_MUL_IEEE   0x2

◆ OP2_INST_PRED_SETE_INT

#define OP2_INST_PRED_SETE_INT   0x42

◆ OP2_INST_PRED_SETGT

#define OP2_INST_PRED_SETGT   0x21

◆ OP2_INST_RECIP_IEEE

#define OP2_INST_RECIP_IEEE   0x66

◆ OP2_INST_RECIPSQRT_IEEE

#define OP2_INST_RECIPSQRT_IEEE   0x69

◆ OP2_INST_SETE_DX10

#define OP2_INST_SETE_DX10   0x0C

◆ OP2_INST_SETGT

#define OP2_INST_SETGT   0x09

◆ OP2_INST_SETGT_DX10

#define OP2_INST_SETGT_DX10   0x0D

◆ OP2_INST_SIN

#define OP2_INST_SIN   0x6E

◆ OP2_INST_SQRT_IEEE

#define OP2_INST_SQRT_IEEE   0x6A

◆ OP3_INST_CNDE_INT

#define OP3_INST_CNDE_INT   0x1C

◆ OP3_INST_CNDGT

#define OP3_INST_CNDGT   0x19

◆ OP3_INST_MULADD

#define OP3_INST_MULADD   0x10

◆ PARAM

#define PARAM (   id)    EXPORT_ARRAY_BASE_PARAM(id) | (EXPORT_TYPE_PARAM << 13)

◆ PARAM0

#define PARAM0   PARAM(0)

◆ PARAM1

#define PARAM1   PARAM(1)

◆ PIX

#define PIX (   id)    EXPORT_ARRAY_BASE_PIX(id) | (EXPORT_TYPE_PIXEL << 13)

◆ PIX0

#define PIX0   PIX(0)

◆ POS

#define POS (   id)    EXPORT_ARRAY_BASE_POS(id) | (EXPORT_TYPE_POS << 13)

◆ POS0

#define POS0   POS(0)

◆ SCL_122

#define SCL_122   | to_QWORD(0, to_LE(ALU_SCL_122 << 18))

◆ SCL_210

#define SCL_210   | to_QWORD(0, to_LE(ALU_SCL_210 << 18))

◆ SCL_212

#define SCL_212   | to_QWORD(0, to_LE(ALU_SCL_212 << 18))

◆ SCL_221

#define SCL_221   | to_QWORD(0, to_LE(ALU_SCL_221 << 18))

◆ TEX

#define TEX (   addr,
  cnt 
)    to_QWORD(CF_DWORD0(addr), CF_DWORD1(0x0, 0x0, CF_COND_ACTIVE, (cnt - 1), 0x0, CF_INST_TEX))

◆ TEX_GET_GRADIENTS_H

#define TEX_GET_GRADIENTS_H (   dstReg,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW,
  srcReg,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW,
  resourceID,
  samplerID 
)
Value:
to_QWORD(TEX_WORD0(TEX_INST_GET_GRADIENTS_H, 0x0, 0x0, resourceID, srcReg, 0x0, 0x0), \
TEX_WORD1(dstReg, 0x0, dstSelX, dstSelY, dstSelZ, dstSelW, 0x0, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED)), \
to_QWORD(TEX_WORD2(0x0, 0x0, 0x0, samplerID, _x, _y, _z, _x), 0x00000000)
#define TEX_WORD0(inst, bcFracMode, fetchWholeQuad, resourceID, srcReg, srcRel, altConst)
Definition: gx2_shader_inl.h:94
#define TEX_WORD2(offsetX, offsetY, offsetZ, samplerID, srcSelX, srcSelY, srcSelZ, srcSelW)
Definition: gx2_shader_inl.h:101
#define _z
Definition: gx2_shader_inl.h:115
#define _x
Definition: gx2_shader_inl.h:113
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define TEX_NORMALIZED
Definition: gx2_shader_inl.h:198
#define TEX_INST_GET_GRADIENTS_H
Definition: gx2_shader_inl.h:244
#define _y
Definition: gx2_shader_inl.h:114
#define TEX_WORD1(dstReg, dstRel, dstSelX, dstSelY, dstSelZ, dstSelW, lodBias, coordTypeX, coordTypeY, coordTypeZ, coordTypeW)
Definition: gx2_shader_inl.h:97

◆ TEX_GET_GRADIENTS_V

#define TEX_GET_GRADIENTS_V (   dstReg,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW,
  srcReg,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW,
  resourceID,
  samplerID 
)
Value:
to_QWORD(TEX_WORD0(TEX_INST_GET_GRADIENTS_V, 0x0, 0x0, resourceID, srcReg, 0x0, 0x0), \
TEX_WORD1(dstReg, 0x0, dstSelX, dstSelY, dstSelZ, dstSelW, 0x0, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED)), \
to_QWORD(TEX_WORD2(0x0, 0x0, 0x0, samplerID, _x, _y, _z, _x), 0x00000000)
#define TEX_WORD0(inst, bcFracMode, fetchWholeQuad, resourceID, srcReg, srcRel, altConst)
Definition: gx2_shader_inl.h:94
#define TEX_WORD2(offsetX, offsetY, offsetZ, samplerID, srcSelX, srcSelY, srcSelZ, srcSelW)
Definition: gx2_shader_inl.h:101
#define _z
Definition: gx2_shader_inl.h:115
#define _x
Definition: gx2_shader_inl.h:113
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define TEX_INST_GET_GRADIENTS_V
Definition: gx2_shader_inl.h:245
#define TEX_NORMALIZED
Definition: gx2_shader_inl.h:198
#define _y
Definition: gx2_shader_inl.h:114
#define TEX_WORD1(dstReg, dstRel, dstSelX, dstSelY, dstSelZ, dstSelW, lodBias, coordTypeX, coordTypeY, coordTypeZ, coordTypeW)
Definition: gx2_shader_inl.h:97

◆ TEX_INST_GET_GRADIENTS_H

#define TEX_INST_GET_GRADIENTS_H   0x07

◆ TEX_INST_GET_GRADIENTS_V

#define TEX_INST_GET_GRADIENTS_V   0x08

◆ TEX_INST_SAMPLE

#define TEX_INST_SAMPLE   0x10

◆ TEX_NORMALIZED

#define TEX_NORMALIZED   0x1

◆ TEX_SAMPLE

#define TEX_SAMPLE (   dstReg,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW,
  srcReg,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW,
  resourceID,
  samplerID 
)
Value:
to_QWORD(TEX_WORD0(TEX_INST_SAMPLE, 0x0, 0x0, resourceID, srcReg, 0x0, 0x0), \
TEX_WORD1(dstReg, 0x0, dstSelX, dstSelY, dstSelZ, dstSelW, 0x0, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED, TEX_NORMALIZED)), \
to_QWORD(TEX_WORD2(0x0, 0x0, 0x0, samplerID, _x, _y, _0, _x), 0x00000000)
#define TEX_INST_SAMPLE
Definition: gx2_shader_inl.h:246
#define TEX_WORD0(inst, bcFracMode, fetchWholeQuad, resourceID, srcReg, srcRel, altConst)
Definition: gx2_shader_inl.h:94
#define _0
Definition: gx2_shader_inl.h:117
#define TEX_WORD2(offsetX, offsetY, offsetZ, samplerID, srcSelX, srcSelY, srcSelZ, srcSelW)
Definition: gx2_shader_inl.h:101
#define _x
Definition: gx2_shader_inl.h:113
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
#define TEX_NORMALIZED
Definition: gx2_shader_inl.h:198
#define _y
Definition: gx2_shader_inl.h:114
#define TEX_WORD1(dstReg, dstRel, dstSelX, dstSelY, dstSelZ, dstSelW, lodBias, coordTypeX, coordTypeY, coordTypeZ, coordTypeW)
Definition: gx2_shader_inl.h:97

◆ TEX_UNNORMALIZED

#define TEX_UNNORMALIZED   0x0

◆ TEX_WORD0

#define TEX_WORD0 (   inst,
  bcFracMode,
  fetchWholeQuad,
  resourceID,
  srcReg,
  srcRel,
  altConst 
)    to_LE(inst | (bcFracMode << 5) | (fetchWholeQuad << 7) | (resourceID << 8) | (srcReg << 16) | (srcRel << 23) | (altConst << 24))

◆ TEX_WORD1

#define TEX_WORD1 (   dstReg,
  dstRel,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW,
  lodBias,
  coordTypeX,
  coordTypeY,
  coordTypeZ,
  coordTypeW 
)
Value:
to_LE(dstReg | (dstRel << 7) | (dstSelX << 9) | (dstSelY << 12) | (dstSelZ << 15) | (dstSelW << 18) | \
(lodBias << 21) | (coordTypeX << 28) | (coordTypeY << 29) | (coordTypeZ << 30) | (coordTypeW << 31))
#define to_LE(x)
Definition: gx2_shader_inl.h:24

◆ TEX_WORD2

#define TEX_WORD2 (   offsetX,
  offsetY,
  offsetZ,
  samplerID,
  srcSelX,
  srcSelY,
  srcSelZ,
  srcSelW 
)    to_LE(offsetX | (offsetY << 5) | (offsetZ << 10) | (samplerID << 15) | (srcSelX << 20) | (srcSelY << 23) | (srcSelZ << 26) | (srcSelW << 29))

◆ to_LE

#define to_LE (   x)    (x)

◆ to_QWORD

#define to_QWORD (   w0,
  w1 
)    (((u64)(w1) << 32ull) | (w0))

◆ UPDATE_EXEC_MASK

#define UPDATE_EXEC_MASK (   mode)    | to_QWORD(0, to_LE(mode << 2))

◆ UPDATE_PRED

#define UPDATE_PRED   | to_QWORD(0, to_LE(1ull << 3))

◆ VALID_PIX [1/2]

#define VALID_PIX   | to_QWORD(0,to_LE(1 << 22))

◆ VALID_PIX [2/2]

#define VALID_PIX   | to_QWORD(0,to_LE(1 << 22))

◆ VEC_012

#define VEC_012   | to_QWORD(0, to_LE(ALU_VEC_012 << 18))

◆ VEC_021

#define VEC_021   | to_QWORD(0, to_LE(ALU_VEC_021 << 18))

◆ VEC_102

#define VEC_102   | to_QWORD(0, to_LE(ALU_VEC_102 << 18))

◆ VEC_120

#define VEC_120   | to_QWORD(0, to_LE(ALU_VEC_120 << 18))

◆ VEC_201

#define VEC_201   | to_QWORD(0, to_LE(ALU_VEC_201 << 18))

◆ VEC_210

#define VEC_210   | to_QWORD(0, to_LE(ALU_VEC_210 << 18))

◆ VERTEX_DATA

#define VERTEX_DATA   0

◆ VTX

#define VTX (   addr,
  cnt 
)    to_QWORD(CF_DWORD0(addr), CF_DWORD1(0x0, 0x0, CF_COND_ACTIVE, (cnt - 1), 0x0, CF_INST_VTX))

◆ VTX_FETCH

#define VTX_FETCH (   dstReg,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW,
  srcReg,
  srcSelX,
  buffer_id,
  type,
  mega,
  offset 
)
Value:
to_QWORD(VTX_WORD0(VTX_INST_FETCH, type, buffer_id, srcReg, srcSelX, mega), VTX_WORD1(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW)) , \
to_QWORD(VTX_WORD2(offset, (mega >> 31)), 0x00000000)
#define VTX_INST_FETCH
Definition: gx2_shader_inl.h:249
#define VTX_WORD1(dstReg, dstSelX, dstSelY, dstSelZ, dstSelW)
Definition: gx2_shader_inl.h:107
#define VTX_WORD2(offset, ismega)
Definition: gx2_shader_inl.h:110
#define to_QWORD(w0, w1)
Definition: gx2_shader_inl.h:23
GLenum type
Definition: glext.h:6233
#define VTX_WORD0(inst, type, buffer_id, srcReg, srcSelX, mega)
Definition: gx2_shader_inl.h:104
GLintptr offset
Definition: glext.h:6560

◆ VTX_INST_FETCH

#define VTX_INST_FETCH   0x0

◆ VTX_WORD0

#define VTX_WORD0 (   inst,
  type,
  buffer_id,
  srcReg,
  srcSelX,
  mega 
)    to_LE(inst | (type << 5) | (buffer_id << 8) | (srcReg << 16) | (srcSelX << 24) | (mega << 26))

◆ VTX_WORD1

#define VTX_WORD1 (   dstReg,
  dstSelX,
  dstSelY,
  dstSelZ,
  dstSelW 
)    to_LE(dstReg | (dstSelX << 9) | (dstSelY << 12) | (dstSelZ << 15) | (dstSelW << 18) | (1 << 21))

◆ VTX_WORD2

#define VTX_WORD2 (   offset,
  ismega 
)    to_LE(offset| (ismega << 19))

◆ WHOLE_QUAD_MODE

#define WHOLE_QUAD_MODE   | to_QWORD(0,to_LE(1 << 30))

◆ WRITE

#define WRITE (   x)    (x >> 2)