diff options
author | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-13 21:43:09 +0200 |
---|---|---|
committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2008-06-14 04:11:05 +0200 |
commit | 4ba1c7d84826aaa07114872560cab3a428949499 (patch) | |
tree | 3b4f8715315334abbb005069da4dae28ed4c836f /src/mesa/drivers/dri/r300/r300_context.h | |
parent | defadd9c03c726d1e79bd911de07a2682bf78b01 (diff) |
r300_fragprog: Refactoring and cleanup
Refactor so that r300_pfs_compile_state "owns"/holds a pointer to
r300_fragment_program instead of the other way round. This is more natural from
an object orientation point of view.
Move the compiled hardware state into r300_fragment_program_code, in
anticipation of on-the-fly program recompilation based on external OpenGL
state.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_context.h')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 2d51bad52e..05efb813e5 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -657,17 +657,9 @@ struct r300_vertex_program_cont { struct r300_pfs_compile_state; /** - * Store everything about a fragment program that is needed - * to render with that program. + * Stores an R300 fragment program in its compiled-to-hardware form. */ -struct r300_fragment_program { - struct gl_fragment_program mesa_program; - - GLcontext *ctx; - GLboolean translated; - GLboolean error; - struct r300_pfs_compile_state *cs; - +struct r300_fragment_program_code { struct { int length; GLuint inst[PFS_MAX_TEX_INST]; @@ -708,6 +700,19 @@ struct r300_fragment_program { int const_nr; int max_temp_idx; +}; + +/** + * Store everything about a fragment program that is needed + * to render with that program. + */ +struct r300_fragment_program { + struct gl_fragment_program mesa_program; + + GLboolean translated; + GLboolean error; + + struct r300_fragment_program_code code; GLboolean WritesDepth; GLuint optimization; |