tessellation: handle output block variables.

Tested-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Elie Tournier <elie.tournier@collabora.com>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Dave Airlie 7 years ago
parent ca48872fad
commit 35d10943d7
  1. 9
      src/vrend_shader.c

@ -2093,9 +2093,18 @@ get_destination_info(struct dump_ctx *ctx,
dinfo->dtypeprefix = FLOAT_BITS_TO_INT; dinfo->dtypeprefix = FLOAT_BITS_TO_INT;
dinfo->dstconv = INT; dinfo->dstconv = INT;
} }
} else {
if (ctx->outputs[j].glsl_gl_block) {
snprintf(dsts[i], 255, "gl_out[%s].%s%s",
ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL ? "gl_InvocationID" : "0",
ctx->outputs[j].glsl_name,
ctx->outputs[j].override_no_wm ? "" : writemask);
} else if (ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL && ctx->outputs[j].name != TGSI_SEMANTIC_PATCH) {
snprintf(dsts[i], 255, "%s[gl_InvocationID]%s", ctx->outputs[j].glsl_name, ctx->outputs[j].override_no_wm ? "" : writemask);
} else { } else {
snprintf(dsts[i], 255, "%s%s", ctx->outputs[j].glsl_name, ctx->outputs[j].override_no_wm ? "" : writemask); snprintf(dsts[i], 255, "%s%s", ctx->outputs[j].glsl_name, ctx->outputs[j].override_no_wm ? "" : writemask);
dinfo->dst_override_no_wm[i] = ctx->outputs[j].override_no_wm; dinfo->dst_override_no_wm[i] = ctx->outputs[j].override_no_wm;
}
if (ctx->outputs[j].is_int) { if (ctx->outputs[j].is_int) {
if (dinfo->dtypeprefix == TYPE_CONVERSION_NONE) if (dinfo->dtypeprefix == TYPE_CONVERSION_NONE)
dinfo->dtypeprefix = FLOAT_BITS_TO_INT; dinfo->dtypeprefix = FLOAT_BITS_TO_INT;

Loading…
Cancel
Save