5#ifndef __RSX_PROGRAM_H__
6#define __RSX_PROGRAM_H__
20#define PARAM_FLOAT3x4 10
21#define PARAM_FLOAT4x4 11
22#define PARAM_FLOAT3x3 12
23#define PARAM_FLOAT4x3 13
24#define PARAM_SAMPLER1D 14
25#define PARAM_SAMPLER2D 15
26#define PARAM_SAMPLER3D 16
27#define PARAM_SAMPLERCUBE 17
28#define PARAM_SAMPLERRECT 18
29#define PARAM_UNKNOWN 0xff
s32 rsxVertexProgramGetConstIndex(const rsxVertexProgram *vp, const char *name)
Get index of vertex program const from its name.
rsxConstOffsetTable * rsxFragmentProgramGetConstOffsetTable(const rsxFragmentProgram *fp, u32 table_off)
Get const offset table from a fragment program.
u16 rsxVertexProgramGetNumAttrib(const rsxVertexProgram *vp)
Get the count of vertex program attributes.
rsxProgramAttrib * rsxVertexProgramGetAttribs(const rsxVertexProgram *vp)
Get the list of vertex program attributes.
rsxProgramConst * rsxVertexProgramGetConst(const rsxVertexProgram *vp, const char *name)
Get const value of vertex program const from its name.
s32 rsxFragmentProgramGetConstIndex(const rsxFragmentProgram *fp, const char *name)
Get index of fragment program const from its name.
u16 rsxFragmentProgramGetNumConst(const rsxFragmentProgram *fp)
Get the count of fragment program consts.
rsxProgramAttrib * rsxFragmentProgramGetAttrib(const rsxFragmentProgram *fp, const char *name)
Get attribute value of fragment program attribute from its name.
struct rsx_vp rsxVertexProgram
Vertex program data structure.
struct rsx_fp rsxFragmentProgram
Fragment program data structure.
struct rsx_co_table rsxConstOffsetTable
Table of const offsets.
void rsxVertexProgramGetUCode(const rsxVertexProgram *vp, void **ucode, u32 *size)
Get Ucode from RSX vertex program.
rsxProgramConst * rsxFragmentProgramGetConst(const rsxFragmentProgram *fp, const char *name)
Get const value of fragment program const from its name.
s32 rsxFragmentProgramGetAttribIndex(const rsxFragmentProgram *fp, const char *name)
Get index of fragment program attribute from its name.
u16 rsxFragmentProgramGetNumAttrib(const rsxFragmentProgram *fp)
Get the count of fragment program attributes.
s32 rsxVertexProgramGetAttribIndex(const rsxVertexProgram *vp, const char *name)
Get index of vertex program attribute from its name.
struct rsx_attrib rsxProgramAttrib
Table of program attributes.
rsxProgramConst * rsxFragmentProgramGetConsts(const rsxFragmentProgram *fp)
Get the list of fragment program consts.
rsxProgramAttrib * rsxFragmentProgramGetAttribs(const rsxFragmentProgram *fp)
Get the list of fragment program attributes.
u16 rsxVertexProgramGetNumConst(const rsxVertexProgram *vp)
Get the count of vertex program consts.
struct rsx_const rsxProgramConst
Program const data structure.
rsxProgramAttrib * rsxVertexProgramGetAttrib(const rsxVertexProgram *vp, const char *name)
Get attribute value of vertex program attribute from its name.
rsxProgramConst * rsxVertexProgramGetConsts(const rsxVertexProgram *vp)
Get the list of vertex program consts.
void rsxFragmentProgramGetUCode(const rsxFragmentProgram *fp, void **ucode, u32 *size)
Get Ucode from RSX fragment program.
Table of program attributes.
u32 name_off
offset of attribute name.
u32 index
attribute index.
u32 num
number of elements in the array.
u32 offset[]
array of const offsets.
Program const data structure.
u8 count
number of elements in the const.
u8 type
program const type.
u8 _pad0
unused padding byte, most be 0.
u32 name_off
offset of name.
u32 index
program const id.
union rsx_const::@1 values[4]
array of element values.
u8 is_internal
internal flag.
Fragment program data structure.
u16 num_regs
number of used registers in the fragment program
u16 magic
magic identifier
u32 fp_control
fragment program control mask
u16 _pad1
unused padding word. most be 0
u16 _pad0
unused padding word. most be 0
u16 texcoord3D
bit mask of used 3D texture coords in the fragment program
u32 const_off
offset to the constant name table
u16 num_const
number of used constants in the fragment program
u32 attr_off
offset to the attribute name table
u16 num_attr
number of used input attributes in the fragment program
u16 num_insn
number of fragment program instructions
u16 texcoord2D
bit mask of used 2D texture coords in the fragment program
u16 texcoords
bit mask of all used texture coords in the fragment program
u32 ucode_off
offset to the shaders's micro code
Vertex program data structure.
u16 num_insn
number of vertex shader instructions
u16 insn_start
start address to load the vertex program to
u16 num_const
number of used constants in the vertex program
u16 num_regs
number of used registers in the vertex program
u16 magic
magic identifier
u16 const_start
start address in vertex shader's constant block memory
u32 const_off
offset to the constant name table
u16 num_attr
number of used input attributes in the vertex program
u32 input_mask
mask of input attributes in the vertex shader
u32 ucode_off
offset to the shader's micro code
u32 attr_off
offset to the attribute name table
u32 output_mask
mask of result attributes passed to the fragment shader
u16 _pad0
unused padding word. most be 0