}
void
-st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
- const ubyte outputMapping[],
- struct pipe_stream_output_info *so)
-{
- if (!glsl_to_tgsi->shader_program->last_vert_prog)
- return;
-
- struct gl_transform_feedback_info *info =
- glsl_to_tgsi->shader_program->last_vert_prog->sh.LinkedTransformFeedback;
- st_translate_stream_output_info2(info, outputMapping, so);
-}
-
-void
-st_translate_stream_output_info2(struct gl_transform_feedback_info *info,
+st_translate_stream_output_info(struct gl_transform_feedback_info *info,
const ubyte outputMapping[],
struct pipe_stream_output_info *so)
{
unsigned i;
+ if (!info) {
+ so->num_outputs = 0;
+ return;
+ }
+
for (i = 0; i < info->NumOutputs; i++) {
so->output[i].register_index =
outputMapping[info->Outputs[i].OutputRegister];
GLboolean st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog);
void
-st_translate_stream_output_info(struct glsl_to_tgsi_visitor *glsl_to_tgsi,
- const ubyte outputMapping[],
- struct pipe_stream_output_info *so);
-
-void
-st_translate_stream_output_info2(struct gl_transform_feedback_info *info,
+st_translate_stream_output_info(struct gl_transform_feedback_info *info,
const ubyte outputMapping[],
struct pipe_stream_output_info *so);
}
if (stvp->shader_program) {
- 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);
- }
+ st_translate_stream_output_info(stvp->Base.sh.LinkedTransformFeedback,
+ stvp->result_to_output,
+ &stvp->tgsi.stream_output);
st_store_ir_in_disk_cache(st, &stvp->Base, true);
return true;
output_semantic_name,
output_semantic_index);
- st_translate_stream_output_info(stvp->glsl_to_tgsi,
+ st_translate_stream_output_info(stvp->Base.sh.LinkedTransformFeedback,
stvp->result_to_output,
&stvp->tgsi.stream_output);
}
ureg_destroy(ureg);
- st_translate_stream_output_info(glsl_to_tgsi,
+ st_translate_stream_output_info(prog->sh.LinkedTransformFeedback,
outputMapping,
&out_state->stream_output);
}
}
- st_translate_stream_output_info2(prog->sh.LinkedTransformFeedback,
- outputMapping,
- stream_output);
+ st_translate_stream_output_info(prog->sh.LinkedTransformFeedback,
+ outputMapping,
+ stream_output);
}
/**