Mesa (main): virgl: Extend integer write out output fix to all non-move integers ops

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Apr 14 12:38:38 UTC 2022


Module: Mesa
Branch: main
Commit: 36f12c85c84364d7f1ea797512462e7c7e47a260
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=36f12c85c84364d7f1ea797512462e7c7e47a260

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Wed Apr 13 12:04:33 2022 +0200

virgl: Extend integer write out output fix to all non-move integers ops

The host virglrenderer can only handle moves to integer outputs, all
ALU opt that create integer outputs are created with extra code to convert
to float for the temporaries, and this breaks the output write
handling.

Fixes:
  spec at arb_sample_shading@builtin-gl-sample-mask *
  spec at arb_sample_shading@builtin-gl-sample-mask-simple *

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15921>

---

 src/gallium/drivers/virgl/virgl_tgsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/virgl/virgl_tgsi.c b/src/gallium/drivers/virgl/virgl_tgsi.c
index 747ac0e043b..aa755b58ddd 100644
--- a/src/gallium/drivers/virgl/virgl_tgsi.c
+++ b/src/gallium/drivers/virgl/virgl_tgsi.c
@@ -385,8 +385,7 @@ virgl_tgsi_transform_instruction(struct tgsi_transform_context *ctx,
 
    /* virglrenderer doesn't resolve non-float output write properly,
     * so we have to first write to a temporary */
-   if ((inst->Src[0].Register.File == TGSI_FILE_CONSTANT ||
-        inst->Src[0].Register.File == TGSI_FILE_IMMEDIATE) &&
+   if (inst->Instruction.Opcode != TGSI_OPCODE_MOV &&
        !tgsi_get_opcode_info(inst->Instruction.Opcode)->is_tex &&
        !tgsi_get_opcode_info(inst->Instruction.Opcode)->is_store &&
        inst->Dst[0].Register.File == TGSI_FILE_OUTPUT &&



More information about the mesa-commit mailing list