From edaf86345805514f2454de5ef8f487a1bc74e45a Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 14 Mar 2019 18:22:51 +0000 Subject: [PATCH] shader: keep precision qualifier space-free We do that across the board, plus it makes the code slightly more comprehensible. v2: update the is_shad hunk as well. Signed-off-by: Emil Velikov Reviewed-by: Gurchetan Singh (v1) --- src/vrend_shader.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vrend_shader.c b/src/vrend_shader.c index c641a4e..2e1fd73 100644 --- a/src/vrend_shader.c +++ b/src/vrend_shader.c @@ -5432,20 +5432,20 @@ static void emit_sampler_decl(struct dump_ctx *ctx, sname = tgsi_proc_to_prefix(ctx->prog_type); - precision = (ctx->cfg->use_gles) ? "highp " : " "; + precision = (ctx->cfg->use_gles) ? "highp" : ""; ptc = vrend_shader_samplerreturnconv(sampler->tgsi_sampler_return); stc = vrend_shader_samplertypeconv(ctx->cfg->use_gles, sampler->tgsi_sampler_type); is_shad = samplertype_is_shadow(sampler->tgsi_sampler_type); if (range) - emit_hdrf(ctx, "uniform %s%csampler%s %ssamp%d[%d];\n", precision, ptc, stc, sname, i, range); + emit_hdrf(ctx, "uniform %s %csampler%s %ssamp%d[%d];\n", precision, ptc, stc, sname, i, range); else - emit_hdrf(ctx, "uniform %s%csampler%s %ssamp%d;\n", precision, ptc, stc, sname, i); + emit_hdrf(ctx, "uniform %s %csampler%s %ssamp%d;\n", precision, ptc, stc, sname, i); if (is_shad) { - emit_hdrf(ctx, "uniform %svec4 %sshadmask%d;\n", precision, sname, i); - emit_hdrf(ctx, "uniform %svec4 %sshadadd%d;\n", precision, sname, i); + emit_hdrf(ctx, "uniform %s vec4 %sshadmask%d;\n", precision, sname, i); + emit_hdrf(ctx, "uniform %s vec4 %sshadadd%d;\n", precision, sname, i); ctx->shadow_samp_mask |= (1 << i); } }