shader: Don't require ARB_gpu_shader5 on gles for certain texture gather

operations

The GLES 3.1 standard already requires support for shadow samplers,
components, and offsets, so it is not needed to specify the requirement
for the extensions.

Closes: #40

Out of the tests that pass on the softpipe host and fail when runing it
through vtest/host:gles-softpipe this fixes the failures:
  dEQP-GLES31.functional.texture.gather.*

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent 8d6054e5d9
commit eaca8c5e2e
  1. 9
      src/vrend_shader.c

@ -2237,8 +2237,10 @@ static int translate_tex(struct dump_ctx *ctx,
} else if (inst->Instruction.Opcode == TGSI_OPCODE_TG4) {
sampler_index = 2;
ctx->shader_req_bits |= SHADER_REQ_TG4;
if (inst->Texture.NumOffsets > 1 || is_shad || (ctx->shader_req_bits & SHADER_REQ_SAMPLER_RECT))
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
if (!ctx->cfg->use_gles) {
if (inst->Texture.NumOffsets > 1 || is_shad || (ctx->shader_req_bits & SHADER_REQ_SAMPLER_RECT))
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
}
if (inst->Texture.NumOffsets == 1) {
if (inst->TexOffsets[0].File != TGSI_FILE_IMMEDIATE)
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
@ -3232,7 +3234,8 @@ get_source_info(struct dump_ctx *ctx,
if (inst->Instruction.Opcode == TGSI_OPCODE_TG4 && i == 1 && j == 0) {
if (imd->val[idx].ui > 0) {
sinfo->tg4_has_component = true;
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
if (!ctx->cfg->use_gles)
ctx->shader_req_bits |= SHADER_REQ_GPU_SHADER5;
}
}

Loading…
Cancel
Save