#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "re.h"
#include "shader_common.h"
#include "nv_hw.h"
Include dependency graph for disasm_shader.c:
Data Structures | |
struct | _opcode_info |
void | shader_init_funcs (void) |
Initialise the shader. | |
Defines | |
#define | CHECK_RANGE(idx, arr) |
#define | NODS (1<<0) |
#define | BRANCH_TR (1<<1) |
#define | BRANCH_EL (1<<2) |
#define | BRANCH_EN (1<<3) |
#define | BRANCH_RE (1<<4) |
#define | BRANCH_ALL (BRANCH_TR|BRANCH_EL|BRANCH_EN) |
#define | COUNT_INC (1<<4) |
#define | COUNT_IND (1<<5) |
#define | COUNT_NUM (1<<6) |
#define | COUNT_ALL (COUNT_INC|COUNT_IND|COUNT_NUM) |
#define | SFR_STRING(idx) CHECK_RANGE((idx), SFR_STRING) |
#define | SWZ_STRING(idx) CHECK_RANGE((idx), SWZ_STRING) |
#define | SP_STRING(idx) CHECK_RANGE((idx), SP_STRING) |
#define | SC_STRING(idx) CHECK_RANGE((idx), SC_STRING) |
#define | APPEND(str) strncat(buf[merged], str, sizeof(buf[merged])) |
Functions | |
static struct _opcode_info * | _get_op_info (int op) |
const char * | disasm_shader_halfop (ShaderFunc *shader, int merged) |
const char * | disasm_shader_inst (ShaderFunc *shader) |
void | shader_buffer_printf (ShaderFunc *shader, unsigned int *buf) |
const char * | vshader_set_next_id (unsigned int id, void *data) |
const char * | vshader_set_inst0 (unsigned int id, void *data) |
const char * | vshader_set_inst1 (unsigned int id, void *data) |
const char * | vshader_set_inst2 (unsigned int id, void *data) |
const char * | vshader_set_inst3_print (unsigned int id, void *data) |
const char * | fshader_from_agp (unsigned int id, void *data) |
Variables | |
static unsigned int | inst [4] |
static ShaderFunc | vp |
static ShaderFunc | fp |
static unsigned int | iaddr |
static struct _opcode_info | ops [] |
static const char * | _SFR_STRING [] |
static const char * | _SWZ_STRING [] |
static const char * | _SP_STRING [] |
static const char * | _SC_STRING [] |
|
|
|
|
|
|
|
|
|
|
|
|
|
Value: ((idx)<sizeof(_##arr)/sizeof(const char *)) \ ? _##arr[(idx)] : #arr"_OOB" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Initialise the shader. Please see Vertex and fragment programs ("Shaders") |
|
|
|
|
|
|
|
|
|
|
|
Initial value: |
|
Initial value: { [SR_POSITION ] = "position", [SR_WEIGHT ] = "weight", [SR_NORMAL ] = "normal", [SR_COL0 ] = "color", [SR_COL1 ] = "color.secondary", [SR_BFC0 ] = "bfc", [SR_BFC1 ] = "bfc.secondary", [SR_FOGCOORD ] = "fogcoord", [SR_POINTSZ ] = "pointsize", [SR_TEXCOORD0] = "texcoord[0]", [SR_TEXCOORD1] = "texcoord[1]", [SR_TEXCOORD2] = "texcoord[2]", [SR_TEXCOORD3] = "texcoord[3]", [SR_TEXCOORD4] = "texcoord[4]", [SR_TEXCOORD5] = "texcoord[5]", [SR_TEXCOORD6] = "texcoord[6]", [SR_TEXCOORD7] = "texcoord[7]", [SR_FRAGDATA0] = "data[0]", [SR_FRAGDATA1] = "data[1]", [SR_FRAGDATA2] = "data[2]", [SR_FRAGDATA3] = "data[3]" } |
|
Initial value: { [SP_FLOAT32] = "R", [SP_FLOAT16] = "H", [SP_FIXED12] = "X", [SP_UNKNOWN] = "?" } |
|
Initial value: |
|
|
|
|
|
|
|
|
|
|