shaders: include prefix for samplepos and tesscoord

Otherwise, we risk missing stuff like negation modifiers.

Fixes the following dEQP failures for me:
- dEQP-GLES31.functional.tessellation.common_edge.quads_equal_spacing
- dEQP-GLES31.functional.tessellation.common_edge.quads_fractional_odd_spacing
- dEQP-GLES31.functional.tessellation.common_edge.quads_fractional_even_spacing

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
macos/master
Erik Faye-Lund 7 years ago committed by Dave Airlie
parent d9779aa53a
commit 7c9be01c56
  1. 3
      src/vrend_shader.c

@ -2648,7 +2648,8 @@ get_source_info(struct dump_ctx *ctx,
ctx->system_values[j].glsl_name, src->Register.SwizzleW);
} else if (ctx->system_values[j].name == TGSI_SEMANTIC_SAMPLEPOS ||
ctx->system_values[j].name == TGSI_SEMANTIC_TESSCOORD) {
snprintf(srcs[i], 255, "vec4(%s.%c, %s.%c, %s.%c, %s.%c)",
snprintf(srcs[i], 255, "%s(vec4(%s.%c, %s.%c, %s.%c, %s.%c))",
prefix,
ctx->system_values[j].glsl_name, get_swiz_char(src->Register.SwizzleX),
ctx->system_values[j].glsl_name, get_swiz_char(src->Register.SwizzleY),
ctx->system_values[j].glsl_name, get_swiz_char(src->Register.SwizzleZ),

Loading…
Cancel
Save