shader: Fix swizzles for interpolatAt* calls

These swizzles were applied to the wrong argument. When we start to use
the component masks for inputs, this becomes relevant.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-By: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago committed by Gert Wollny
parent 4dc3eb5ed8
commit 0f9885ead5
  1. 6
      src/vrend_shader.c

@ -4168,15 +4168,15 @@ iter_instruction(struct tgsi_iterate_context *iter,
break; break;
} }
case TGSI_OPCODE_INTERP_CENTROID: case TGSI_OPCODE_INTERP_CENTROID:
emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtCentroid(%s))%s));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], src_swizzle0); emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtCentroid(%s)%s)));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], src_swizzle0);
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5; ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
break; break;
case TGSI_OPCODE_INTERP_SAMPLE: case TGSI_OPCODE_INTERP_SAMPLE:
emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtSample(%s, %s.x))%s));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], srcs[1], src_swizzle0); emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtSample(%s, %s.x)%s)));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], srcs[1], src_swizzle0);
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5; ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
break; break;
case TGSI_OPCODE_INTERP_OFFSET: case TGSI_OPCODE_INTERP_OFFSET:
emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtOffset(%s, %s.xy))%s));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], srcs[1], src_swizzle0); emit_buff(ctx, "%s = %s(%s(vec4(interpolateAtOffset(%s, %s.xy)%s)));\n", dsts[0], get_string(dinfo.dstconv), get_string(dinfo.dtypeprefix), srcs[0], srcs[1], src_swizzle0);
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5; ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
break; break;
case TGSI_OPCODE_UMUL_HI: case TGSI_OPCODE_UMUL_HI:

Loading…
Cancel
Save