shader: Don't emit 'precise' when 'invariant' is already given in declaration

It is not necessary to emit both statements, and on a GLES 3.1 host that doesn't
support ARB_gpu_shader5 this actually breaks some shaders.

Fixes: 36c919e139
   shader: rework precise-emitting for built-ins

Fixes on the softpipe host driver:

  dEQP-GLES3.functional.shaders.qualification_order.variables.
     valid.invariant_interp_storage
     valid.invariant_interp_storage_precision
     valid.invariant_storage
     valid.invariant_storage_precision

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Signed-off-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Gert Wollny 6 years ago committed by Jakob Bornecrantz
parent 584a1e20fb
commit 860347164c
  1. 2
      src/vrend_shader.c

@ -2784,9 +2784,11 @@ get_destination_info(struct dump_ctx *ctx,
if (ctx->outputs[j].first == dst_reg->Register.Index) {
if (inst->Instruction.Precise) {
if (!ctx->outputs[j].invariant) {
ctx->outputs[j].precise = true;
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
}
}
if (ctx->glsl_ver_required >= 140 && ctx->outputs[j].name == TGSI_SEMANTIC_CLIPVERTEX) {
snprintf(dsts[i], 255, "clipv_tmp");

Loading…
Cancel
Save