Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

nv30_fragprog.c File Reference

#include <stdio.h>
#include <string.h>
#include "shader_common.h"
#include "nv30_shader.h"

Include dependency graph for nv30_fragprog.c:


Defines

#define NV30FP_TX_VOP_COUNT   (sizeof(NV30FP_TX_VOP) / sizeof(struct _op_xlat))
#define NV30FP_TX_SOP_COUNT   (sizeof(NV30FP_TX_SOP) / sizeof(struct _op_xlat))

Functions

static struct _op_xlat * NV30FPGetOPTXRec (ShaderFunc *shader)
static int NV30FPHasMergedInst (ShaderFunc *shader)
static int NV30FPIsLastInst (ShaderFunc *shader)
static int NV30FPGetOffsetNext (ShaderFunc *shader)
static ShaderOpcode NV30FPGetOpcode (ShaderFunc *shader, int merged)
static unsigned int NV30FPGetOpcodeHW (ShaderFunc *shader, int slot)
static ShaderRegFile NV30FPGetDestFile (ShaderFunc *shader, int merged)
static unsigned int NV30FPGetDestID (ShaderFunc *shader, int merged)
static unsigned int NV30FPGetDestMask (ShaderFunc *shader, int merged)
static unsigned int NV30FPGetSourceHW (ShaderFunc *shader, int merged, int pos)
static ShaderRegFile NV30FPGetSourceFile (ShaderFunc *shader, int merged, int pos)
static int NV30FPGetSourceID (ShaderFunc *shader, int merged, int pos)
static int NV30FPGetSourceNegate (ShaderFunc *shader, int merged, int pos)
static int NV30FPGetSourceAbs (ShaderFunc *shader, int merged, int pos)
static ShaderRegSwz NV30FPTXSwizzle (int hwswz)
static ShaderRegSwz NV30FPGetSourceSwizzle (ShaderFunc *shader, int merged, int pos)
static int NV30FPGetSourceIndexed (ShaderFunc *shader, int merged, int pos)
static void NV30FPGetSourceConstVal (ShaderFunc *shader, int merged, int pos, float *val)
static int NV30FPGetSourceScale (ShaderFunc *shader, int merged, int pos)
static int NV30FPGetAddressRegID (ShaderFunc *shader)
static ShaderSwzComp NV30FPGetAddressRegSwizzle (ShaderFunc *shader)
static int NV30FPSupportsConditional (ShaderFunc *shader)
static int NV30FPGetConditionUpdate (ShaderFunc *shader)
static int NV30FPGetConditionTest (ShaderFunc *shader)
static ShaderCond NV30FPGetCondition (ShaderFunc *shader)
static ShaderRegSwz NV30FPGetCondRegSwizzle (ShaderFunc *shader)
static int NV30FPGetCondRegID (ShaderFunc *shader)
static int NV30FPGetBranch (ShaderFunc *shader)
static int NV30FPGetBranchElse (ShaderFunc *shader)
static int NV30FPGetBranchEnd (ShaderFunc *shader)
static int NV30FPGetLoopCount (ShaderFunc *shader)
static int NV30FPGetLoopInitial (ShaderFunc *shader)
static int NV30FPGetLoopIncrement (ShaderFunc *shader)
static ShaderPrecision NV30FPGetPrecision (ShaderFunc *shader)
static int NV30FPGetSaturate (ShaderFunc *shader)
void NV30FPInitShaderFuncs (ShaderFunc *shader)

Variables

static struct _op_xlat NV30FP_ARITH_OP []
static struct _op_xlat NV30FP_BRANCH_OP []
ShaderSwzComp NV30FP_TX_SWIZZLE [4] = { SSC_X, SSC_Y, SSC_Z, SSC_W }

Define Documentation

#define NV30FP_TX_SOP_COUNT   (sizeof(NV30FP_TX_SOP) / sizeof(struct _op_xlat))
 

#define NV30FP_TX_VOP_COUNT   (sizeof(NV30FP_TX_VOP) / sizeof(struct _op_xlat))
 


Function Documentation

static int NV30FPGetAddressRegID (  ShaderFunc *  shader  )  [static]
 

static ShaderSwzComp NV30FPGetAddressRegSwizzle (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetBranch (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetBranchElse (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetBranchEnd (  ShaderFunc *  shader  )  [static]
 

static ShaderCond NV30FPGetCondition (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetConditionTest (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetConditionUpdate (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetCondRegID (  ShaderFunc *  shader  )  [static]
 

static ShaderRegSwz NV30FPGetCondRegSwizzle (  ShaderFunc *  shader  )  [static]
 

static ShaderRegFile NV30FPGetDestFile (  ShaderFunc *  shader,
int  merged
)  [static]
 

static unsigned int NV30FPGetDestID (  ShaderFunc *  shader,
int  merged
)  [static]
 

static unsigned int NV30FPGetDestMask (  ShaderFunc *  shader,
int  merged
)  [static]
 

static int NV30FPGetLoopCount (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetLoopIncrement (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetLoopInitial (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetOffsetNext (  ShaderFunc *  shader  )  [static]
 

static ShaderOpcode NV30FPGetOpcode (  ShaderFunc *  shader,
int  merged
)  [static]
 

static unsigned int NV30FPGetOpcodeHW (  ShaderFunc *  shader,
int  slot
)  [static]
 

static struct _op_xlat* NV30FPGetOPTXRec (  ShaderFunc *  shader  )  [static]
 

static ShaderPrecision NV30FPGetPrecision (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetSaturate (  ShaderFunc *  shader  )  [static]
 

static int NV30FPGetSourceAbs (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static void NV30FPGetSourceConstVal (  ShaderFunc *  shader,
int  merged,
int  pos,
float *  val
)  [static]
 

static ShaderRegFile NV30FPGetSourceFile (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static unsigned int NV30FPGetSourceHW (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static int NV30FPGetSourceID (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static int NV30FPGetSourceIndexed (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static int NV30FPGetSourceNegate (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static int NV30FPGetSourceScale (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static ShaderRegSwz NV30FPGetSourceSwizzle (  ShaderFunc *  shader,
int  merged,
int  pos
)  [static]
 

static int NV30FPHasMergedInst (  ShaderFunc *  shader  )  [static]
 

void NV30FPInitShaderFuncs (  ShaderFunc *  shader  ) 
 

static int NV30FPIsLastInst (  ShaderFunc *  shader  )  [static]
 

static int NV30FPSupportsConditional (  ShaderFunc *  shader  )  [static]
 

static ShaderRegSwz NV30FPTXSwizzle (  int  hwswz  )  [static]
 


Variable Documentation

struct _op_xlat NV30FP_ARITH_OP[] [static]
 

Initial value:

 {
    { NV30_FP_OP_OPCODE_MOV, SOP_MOV, { 0, -1, -1 } },
    { NV30_FP_OP_OPCODE_MUL, SOP_MUL, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_ADD, SOP_ADD, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_MAD, SOP_MAD, { 0,  1,  2 } },
    { NV30_FP_OP_OPCODE_DP3, SOP_DP3, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_DP4, SOP_DP4, { 0,  1, -1 } }, 
    { NV30_FP_OP_OPCODE_DST, SOP_DST, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_MIN, SOP_MIN, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_MAX, SOP_MAX, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_SLT, SOP_SLT, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_SGE, SOP_SGE, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_FRC, SOP_FRC, { 0, -1, -1 } },
    { NV30_FP_OP_OPCODE_FLR, SOP_FLR, { 0, -1, -1 } },
    { NV30_FP_OP_OPCODE_TEX, SOP_TEX, { 0,  4, -1 } },
    { NV30_FP_OP_OPCODE_TXP, SOP_TXP, { 0,  4, -1 } },
    { NV30_FP_OP_OPCODE_TXL, SOP_TXL, { 0,  4, -1 } },
    { NV30_FP_OP_OPCODE_TXB, SOP_TXB, { 0,  4, -1 } },
    { NV30_FP_OP_OPCODE_SEQ, SOP_SEQ, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_SGT, SOP_SGT, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_SLE, SOP_SLE, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_SNE, SOP_SNE, { 0,  1, -1 } },
    { NV30_FP_OP_OPCODE_RCP, SOP_RCP, { 2, -1, -1 } },
    { NV30_FP_OP_OPCODE_LG2, SOP_LG2, { 2, -1, -1 } },
    { NV30_FP_OP_OPCODE_EX2, SOP_EX2, { 2, -1, -1 } },
    { NV30_FP_OP_OPCODE_COS, SOP_COS, { 2, -1, -1 } },
    { NV30_FP_OP_OPCODE_SIN, SOP_SIN, { 2, -1, -1 } },
    { NV30_FP_OP_OPCODE_NOP, SOP_NOP, {-1, -1, -1 } },
    { -1, -1, {}},
}

struct _op_xlat NV30FP_BRANCH_OP[] [static]
 

Initial value:

 {
    { NV30_FP_OP_BRA_OPCODE_BRK , SOP_BRK , {-1, -1, -1 } },
    { NV30_FP_OP_BRA_OPCODE_CAL , SOP_CAL , {-1, -1, -1 } },
    { NV30_FP_OP_BRA_OPCODE_IF  , SOP_IF  , {-1, -1, -1 } },
    { NV30_FP_OP_BRA_OPCODE_LOOP, SOP_LOOP, {-1, -1, -1 } },
    { NV30_FP_OP_BRA_OPCODE_REP , SOP_REP , {-1, -1, -1 } },
    { NV30_FP_OP_BRA_OPCODE_RET , SOP_RET , {-1, -1, -1 } },
    { -1, -1, {}},
}

ShaderSwzComp NV30FP_TX_SWIZZLE[4] = { SSC_X, SSC_Y, SSC_Z, SSC_W }
 


Generated on Sat Aug 19 20:40:53 2006 for Renouveau by  doxygen 1.4.4