diff options
author | Roland Scheidegger <sroland@vmware.com> | 2009-12-14 18:36:33 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2009-12-14 18:36:33 +0100 |
commit | a0127b6ced257919180ba3a1bf534b68d9c750be (patch) | |
tree | 2b7393c210947a009b654c07da9c4732cc51bade /src/mesa/state_tracker/st_program.c | |
parent | a08e348a84f57ed5e8bf5888f1ce13934d2ce8fa (diff) |
gallium: more work for edgeflags changes
fixes, cleanups, etc.
not working yet
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 876d92539e..24f2387429 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -193,6 +193,7 @@ st_translate_vertex_program(struct st_context *st, struct st_vp_varient *vpv = CALLOC_STRUCT(st_vp_varient); struct pipe_context *pipe = st->pipe; struct ureg_program *ureg; + enum pipe_error error; ureg = ureg_create( TGSI_PROCESSOR_VERTEX ); if (ureg == NULL) @@ -215,18 +216,18 @@ st_translate_vertex_program(struct st_context *st, stvp->output_semantic_name, stvp->output_semantic_index ); - if (ret) + if (error) goto fail; /* Edgeflags will be the last input: */ - if (key.passthrough_edgeflags) { + if (key->passthrough_edgeflags) { ureg_MOV( ureg, ureg_DECL_output( ureg, TGSI_SEMANTIC_EDGEFLAG, 0 ), ureg_DECL_next_vs_input(ureg)); } - tokens = ureg_get_tokens( ureg, NULL ); + vpv->state.tokens = ureg_get_tokens( ureg, NULL ); ureg_destroy( ureg ); vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->state); @@ -266,6 +267,7 @@ st_translate_fragment_program(struct st_context *st, GLuint defaultInputMapping[FRAG_ATTRIB_MAX]; GLuint interpMode[16]; /* XXX size? */ GLuint attr; + enum pipe_error error; const GLbitfield inputsRead = stfp->Base.Base.InputsRead; struct ureg_program *ureg; GLuint vslot = 0; @@ -404,12 +406,13 @@ st_translate_fragment_program(struct st_context *st, ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT ); if (ureg == NULL) - return NULL; + return; - stfp->state.tokens = + error = st_translate_mesa_program(st->ctx, TGSI_PROCESSOR_FRAGMENT, + ureg, &stfp->Base.Base, /* inputs */ fs_num_inputs, @@ -423,6 +426,8 @@ st_translate_fragment_program(struct st_context *st, fs_output_semantic_name, fs_output_semantic_index ); + stfp->state.tokens = ureg_get_tokens( ureg, NULL ); + ureg_destroy( ureg ); stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->state); if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { |