shader: Use floating point values for coordinate scaling and comparing

On GLSL ES implicit conversion are not enabled by default. Since here the
evaluations are hard coded, just emit literal values according to the
types they are used with in the operations.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Gert Wollny 6 years ago
parent 95f10f022f
commit 3f02590aba
  1. 4
      src/vrend_shader.c

@ -1548,8 +1548,8 @@ static void emit_alpha_test(struct dump_ctx *ctx)
static void emit_pstipple_pass(struct dump_ctx *ctx)
{
emit_buf(ctx, "stip_temp = texture(pstipple_sampler, vec2(gl_FragCoord.x / 32, gl_FragCoord.y / 32)).x;\n");
emit_buf(ctx, "if (stip_temp > 0) {\n\tdiscard;\n}\n");
emit_buf(ctx, "stip_temp = texture(pstipple_sampler, vec2(gl_FragCoord.x / 32.0, gl_FragCoord.y / 32.0)).x;\n");
emit_buf(ctx, "if (stip_temp > 0.0) {\n\tdiscard;\n}\n");
}
static void emit_color_select(struct dump_ctx *ctx)

Loading…
Cancel
Save