diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2018-08-02 13:23:54 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-08-13 15:45:45 +1000 |
commit | 2d6249846d3cf66b943c752f10fc2d81d1c08824 (patch) | |
tree | cd5ea04fdb47e9f3697752155cf90ce0f4802115 | |
parent | b6cbb42afe6991e9101f10c2298dedfc817135bf (diff) | |
download | virglrenderer-2d6249846d3cf66b943c752f10fc2d81d1c08824.tar.gz |
shader: add missing precision specifier
In GLES, these need a precision specifier, otherwise we get
compile errors.
This fixes a shader-compile error on OpenGL ES 3.1.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | src/vrend_shader.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vrend_shader.c b/src/vrend_shader.c index 625109b8..fe83eccf 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -4126,7 +4126,7 @@ static void *emit_sampler_decl(struct dump_ctx *ctx, char *glsl_hdr, uint32_t i, /* GLES does not support 1D textures -- we use a 2D texture and set the parameter set to 0.5 */ if (ctx->cfg->use_gles && texture_type == TGSI_TEXTURE_1D) - snprintf(buf, 255, "uniform %csampler2D %ssamp%d;\n", ptc, sname, i); + snprintf(buf, 255, "uniform highp %csampler2D %ssamp%d;\n", ptc, sname, i); else if (range) snprintf(buf, 255, "uniform %s%csampler%s %ssamp%d[%d];\n", precision, ptc, stc, sname, i, range); else |