diff options
author | Timothy Arceri <[email protected]> | 2016-11-20 21:44:29 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-23 14:48:04 +1100 |
commit | f86d15ed94df59e4b3cdb4099d69cdd81f52fc27 (patch) | |
tree | 5d6f13c0b405bb2ee1e79b6ed6142794cd4a6af4 /src/mesa/state_tracker/st_program.c | |
parent | c505d6d852220f4aaaee161465dd2c579647e672 (diff) |
st/mesa/glsl: change xfb_program field to last_vert_prog
Now that the i965 backend doesn't depend on this field we can
make it more generic and short circuit a bunch of code paths.
The new field will be used in a following patch for another
clean-up.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index e1242795670..fb0a138c245 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -390,9 +390,13 @@ st_translate_vertex_program(struct st_context *st, stvp->tgsi.type = PIPE_SHADER_IR_NIR; stvp->tgsi.ir.nir = nir; - st_translate_stream_output_info2(stvp->shader_program->xfb_program->sh.LinkedTransformFeedback, - stvp->result_to_output, - &stvp->tgsi.stream_output); + struct gl_program *prog = stvp->shader_program->last_vert_prog; + if (prog) { + st_translate_stream_output_info2(prog->sh.LinkedTransformFeedback, + stvp->result_to_output, + &stvp->tgsi.stream_output); + } + return true; } |