core | glapi | vbo | math | shader | swrast | swrast_setup | tnl | tnl_dd

prog_instruction Struct Reference

#include <prog_instruction.h>


Detailed Description

Vertex/fragment program instruction.

Data Fields

gl_inst_opcode Opcode
struct prog_src_register SrcReg [3]
struct prog_dst_register DstReg
GLuint CondUpdate:1
 Indicates that the instruction should update the condition code register.
GLuint CondDst:1
 If prog_instruction::CondUpdate is GL_TRUE, this value selects the condition code register that is to be updated.
GLuint SaturateMode:2
 Saturate each value of the vectored result to the range [0,1] or the range [-1,1].
GLuint Precision:3
 Per-instruction selectable precision: FLOAT32, FLOAT16, FIXED12.
GLint BranchTarget
 For BRA and CAL instructions, the location to jump to.
const char * Comment
 for debugging purposes
void * Data
 Arbitrary data.
GLint Aux
 for driver use (try to remove someday)
Extra fields for TEX, TXB, TXD, TXL, TXP instructions.
GLuint TexSrcUnit:5
 Source texture unit.
GLuint TexSrcTarget:3
 Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX.
GLuint TexShadow:1
 True if tex instruction should do shadow comparison.

Field Documentation

gl_inst_opcode prog_instruction::Opcode

struct prog_src_register prog_instruction::SrcReg[3] [read]

struct prog_dst_register prog_instruction::DstReg [read]

GLuint prog_instruction::CondUpdate

Indicates that the instruction should update the condition code register.

Since:
NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, NV_vertex_program2_option.

GLuint prog_instruction::CondDst

If prog_instruction::CondUpdate is GL_TRUE, this value selects the condition code register that is to be updated.

In GL_NV_fragment_program or GL_NV_vertex_program2 mode, only condition code register 0 is available. In GL_NV_vertex_program3 mode, condition code registers 0 and 1 are available.

Since:
NV_fragment_program, NV_fragment_program_option, NV_vertex_program2, NV_vertex_program2_option.

GLuint prog_instruction::SaturateMode

Saturate each value of the vectored result to the range [0,1] or the range [-1,1].

SSAT mode (i.e., saturation to the range [-1,1]) is only available in NV_fragment_program2 mode. Value is one of the SATURATE_* tokens.

Since:
NV_fragment_program, NV_fragment_program_option, NV_vertex_program3.

GLuint prog_instruction::Precision

Per-instruction selectable precision: FLOAT32, FLOAT16, FIXED12.

Since:
NV_fragment_program, NV_fragment_program_option.

GLuint prog_instruction::TexSrcUnit

Source texture unit.

GLuint prog_instruction::TexSrcTarget

Source texture target, one of TEXTURE_{1D,2D,3D,CUBE,RECT}_INDEX.

GLuint prog_instruction::TexShadow

True if tex instruction should do shadow comparison.

GLint prog_instruction::BranchTarget

For BRA and CAL instructions, the location to jump to.

For BGNLOOP, points to ENDLOOP (and vice-versa). For BRK, points to BGNLOOP (which points to ENDLOOP). For IF, points to ELSE or ENDIF. For ELSE, points to ENDIF.

const char* prog_instruction::Comment

for debugging purposes

void* prog_instruction::Data

Arbitrary data.

Used for OPCODE_PRINT and some drivers

GLint prog_instruction::Aux

for driver use (try to remove someday)


The documentation for this struct was generated from the following file:
Generated on Sun Sep 27 06:48:02 2009 for Mesa Vertex and Fragment Program code by  doxygen 1.5.4