diff options
author | Brian <[email protected]> | 2007-09-18 19:37:36 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-18 19:38:35 -0600 |
commit | bb611c5f1f6aec7ac51d4fa3301422b47f6de795 (patch) | |
tree | a50b77cdfd0b62b4872465bd1a346ba0fbab1a38 /src/mesa/state_tracker/st_program.h | |
parent | 63be96bdc7e9f388a5c49295bd7e150462fd003a (diff) |
Checkpoint: rework shader input/output register mapping.
This is a step toward removing TGSI_ATTRIB_ tokens.
Basically, when translating Mesa programs to TGSI programs, pass in input and
output register re-maps, plus interpolation info.
There's some known breakage (cubemap.c) so more to be done...
Diffstat (limited to 'src/mesa/state_tracker/st_program.h')
-rw-r--r-- | src/mesa/state_tracker/st_program.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index a2f114b1bab..68ceba4d787 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -61,13 +61,20 @@ struct st_fragment_program struct st_vertex_program { - struct gl_vertex_program Base; - GLboolean error; /* If program is malformed for any reason. */ + struct gl_vertex_program Base; /**< The Mesa vertex program */ + GLboolean error; /**< Set if program is malformed for any reason. */ - GLuint id; /* String id, for tracking - * ProgramStringNotify changes. - */ + GLuint id; /**< String id, for tracking ProgramStringNotify changes. */ + + /** maps a Mesa VERT_ATTRIB_x to a packed TGSI input index */ + GLuint input_to_index[MAX_VERTEX_PROGRAM_ATTRIBS]; + /** maps a TGSI input index back to a Mesa VERT_ATTRIB_x */ + GLuint index_to_input[MAX_VERTEX_PROGRAM_ATTRIBS]; + + GLuint output_to_index[MAX_VERTEX_PROGRAM_ATTRIBS]; + GLuint index_to_output[MAX_VERTEX_PROGRAM_ATTRIBS]; + /** The program in TGSI format */ struct tgsi_token tokens[ST_FP_MAX_TOKENS]; GLboolean dirty; |