virgl: also remove dimension on indirect.
authorDave Airlie <airlied@redhat.com>
Mon, 13 Nov 2017 20:52:06 +0000 (06:52 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 31 Jan 2018 02:24:11 +0000 (12:24 +1000)
This fixes some dEQP tests that generated bad shaders.

Fixes: b6f6ead19 (virgl: drop const dimensions on first block.)
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/virgl/virgl_tgsi.c

index aa483ade5df8a01bf23daf22ca27d74dccf7377e..ca0591322da779f87c561729d8667723babce1a3 100644 (file)
@@ -76,7 +76,6 @@ virgl_tgsi_transform_instruction(struct tgsi_transform_context *ctx,
    for (unsigned i = 0; i < inst->Instruction.NumSrcRegs; i++) {
       if (inst->Src[i].Register.File == TGSI_FILE_CONSTANT &&
           inst->Src[i].Register.Dimension &&
-          !inst->Src[i].Register.Indirect &&
           inst->Src[i].Dimension.Index == 0)
          inst->Src[i].Register.Dimension = 0;
    }