shader: remove partial 1D texture GLES workaround

The function emit_sampler_decl() considers that GLES does not have 1D
textures, but it ignores the fact that we can have a range passed into
the function.

This workaround predates the correct fix in vrend_shader_samplertypeconv()
which returns a "2D" literal as needed.

Drop this partial workaround.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
macos/master
Emil Velikov 6 years ago committed by Emil Velikov
parent 4e764b66fa
commit de2bbb7fc0
  1. 5
      src/vrend_shader.c

@ -5438,10 +5438,7 @@ static void emit_sampler_decl(struct dump_ctx *ctx,
stc = vrend_shader_samplertypeconv(ctx->cfg->use_gles, sampler->tgsi_sampler_type); stc = vrend_shader_samplertypeconv(ctx->cfg->use_gles, sampler->tgsi_sampler_type);
is_shad = samplertype_is_shadow(sampler->tgsi_sampler_type); is_shad = samplertype_is_shadow(sampler->tgsi_sampler_type);
/* GLES does not support 1D textures -- we use a 2D texture and set the parameter set to 0.5 */ if (range)
if (ctx->cfg->use_gles && sampler->tgsi_sampler_type == TGSI_TEXTURE_1D)
emit_hdrf(ctx, "uniform highp %csampler2D %ssamp%d;\n", ptc, sname, i);
else 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 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);

Loading…
Cancel
Save