shader: use emit_ios_generic_outputs() in emit_ios_tes()

Use the helper instead of open-coding it.

v2: use callback (Gert)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-By: Gert Wollny <gert.wollny@collabora.com>
macos/master
Emil Velikov 6 years ago committed by Emil Velikov
parent 7f1169788a
commit 4c4b8d1a21
  1. 20
      src/vrend_shader.c

@ -6310,25 +6310,7 @@ static void emit_ios_tes(struct dump_ctx *ctx)
ctx->tes_vertex_order ? "cw" : "ccw", ctx->tes_vertex_order ? "cw" : "ccw",
ctx->tes_point_mode ? ", point_mode" : ""); ctx->tes_point_mode ? ", point_mode" : "");
for (i = 0; i < ctx->num_outputs; i++) { emit_ios_generic_outputs(ctx, can_emit_generic_default);
if (!ctx->outputs[i].glsl_predefined_no_emit) {
const char *prefix = "";
if (ctx->outputs[i].name == TGSI_SEMANTIC_GENERIC ||
ctx->outputs[i].name == TGSI_SEMANTIC_COLOR ||
ctx->outputs[i].name == TGSI_SEMANTIC_BCOLOR) {
ctx->num_interps++;
prefix = INTERP_PREFIX;
}
emit_ios_generics(ctx, io_out, prefix, &ctx->outputs[i],
ctx->outputs[i].fbfetch_used ? "inout" : "out", "");
} else if (ctx->outputs[i].invariant || ctx->outputs[i].precise) {
emit_hdrf(ctx, "%s%s;\n",
ctx->outputs[i].precise ? "precise " :
(ctx->outputs[i].invariant ? "invariant " : ""),
ctx->outputs[i].glsl_name);
}
}
emit_winsys_correction(ctx); emit_winsys_correction(ctx);

Loading…
Cancel
Save