#include "main/glheader.h"
#include "main/imports.h"
#include "main/mtypes.h"
#include "prog_instruction.h"
Data Structures | |
| struct | instruction_info |
| Basic info about each instruction. More... | |
Functions | |
| void | _mesa_init_instructions (struct prog_instruction *inst, GLuint count) |
| Initialize program instruction fields to defaults. | |
| struct prog_instruction * | _mesa_alloc_instructions (GLuint numInst) |
| Allocate an array of program instructions. | |
| struct prog_instruction * | _mesa_realloc_instructions (struct prog_instruction *oldInst, GLuint numOldInst, GLuint numNewInst) |
| Reallocate memory storing an array of program instructions. | |
| struct prog_instruction * | _mesa_copy_instructions (struct prog_instruction *dest, const struct prog_instruction *src, GLuint n) |
| Copy an array of program instructions. | |
| void | _mesa_free_instructions (struct prog_instruction *inst, GLuint count) |
| Free an array of instructions. | |
| GLuint | _mesa_num_inst_src_regs (gl_inst_opcode opcode) |
| Return the number of src registers for the given instruction/opcode. | |
| GLuint | _mesa_num_inst_dst_regs (gl_inst_opcode opcode) |
| Return the number of dst registers for the given instruction/opcode. | |
| GLboolean | _mesa_is_tex_instruction (gl_inst_opcode opcode) |
| GLboolean | _mesa_check_soa_dependencies (const struct prog_instruction *inst) |
| Check if there's a potential src/dst register data dependency when using SOA execution. | |
| const char * | _mesa_opcode_string (gl_inst_opcode opcode) |
| Return string name for given program opcode. | |
Variables | |
| static struct instruction_info | InstInfo [MAX_OPCODE] |
| Instruction info. | |
| struct prog_instruction* _mesa_alloc_instructions | ( | GLuint | numInst | ) | [read] |
Allocate an array of program instructions.
| numInst | number of instructions |
| GLboolean _mesa_check_soa_dependencies | ( | const struct prog_instruction * | inst | ) |
Check if there's a potential src/dst register data dependency when using SOA execution.
Example: MOV T, T.yxwz; This would expand into: MOV t0, t1; MOV t1, t0; MOV t2, t3; MOV t3, t2; The second instruction will have the wrong value for t0 if executed as-is.
| struct prog_instruction* _mesa_copy_instructions | ( | struct prog_instruction * | dest, | |
| const struct prog_instruction * | src, | |||
| GLuint | n | |||
| ) | [read] |
Copy an array of program instructions.
| dest | pointer to destination. | |
| src | pointer to source. | |
| n | number of instructions to copy. |
| void _mesa_free_instructions | ( | struct prog_instruction * | inst, | |
| GLuint | count | |||
| ) |
Free an array of instructions.
| void _mesa_init_instructions | ( | struct prog_instruction * | inst, | |
| GLuint | count | |||
| ) |
Initialize program instruction fields to defaults.
| inst | first instruction to initialize | |
| count | number of instructions to initialize |
| GLboolean _mesa_is_tex_instruction | ( | gl_inst_opcode | opcode | ) |
| GLuint _mesa_num_inst_dst_regs | ( | gl_inst_opcode | opcode | ) |
Return the number of dst registers for the given instruction/opcode.
| GLuint _mesa_num_inst_src_regs | ( | gl_inst_opcode | opcode | ) |
Return the number of src registers for the given instruction/opcode.
| const char* _mesa_opcode_string | ( | gl_inst_opcode | opcode | ) |
Return string name for given program opcode.
| struct prog_instruction* _mesa_realloc_instructions | ( | struct prog_instruction * | oldInst, | |
| GLuint | numOldInst, | |||
| GLuint | numNewInst | |||
| ) | [read] |
Reallocate memory storing an array of program instructions.
This is used when we need to append additional instructions onto an program.
| oldInst | pointer to first of old/src instructions | |
| numOldInst | number of instructions at <oldInst> | |
| numNewInst | desired size of new instruction array. |
struct instruction_info InstInfo[MAX_OPCODE] [static] |
Instruction info.
1.5.4