virgl: don't move input gl_SampleMaskIn to a temp
authorGert Wollny <gert.wollny@collabora.com>
Sun, 17 Apr 2022 15:25:18 +0000 (17:25 +0200)
committerGert Wollny <gert.wollny@collabora.com>
Fri, 29 Apr 2022 08:50:51 +0000 (10:50 +0200)
The input is an array so moving it to a single temporary value doesn't
seem to make much sense. I also don't see any piglit regressions when
not moving the value to a temporary.

Fixes: bc912bace1cf8cd03793c5ae34bd5a2afd015019
  virgl: Add workarounds for virglrenderer input/sv signedness bugs.

v2: remove unused enum for SAMPLEMASK (Emma)

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

src/gallium/drivers/virgl/virgl_tgsi.c

index a707a24..d16b3a6 100644 (file)
@@ -49,7 +49,6 @@ enum virgl_input_temps {
    INPUT_TEMP_VIEWPORT_INDEX,
    INPUT_TEMP_BLOCK_ID,
    INPUT_TEMP_HELPER_INVOCATION,
-   INPUT_TEMP_SAMPLEMASK,
    INPUT_TEMP_COUNT,
 };
 
@@ -109,8 +108,6 @@ virgl_tgsi_transform_declaration(struct tgsi_transform_context *ctx,
                                                    TGSI_SEMANTIC_BLOCK_ID);
       virgl_tgsi_transform_declaration_input_temp(decl, &vtctx->input_temp[INPUT_TEMP_HELPER_INVOCATION],
                                                    TGSI_SEMANTIC_HELPER_INVOCATION);
-      virgl_tgsi_transform_declaration_input_temp(decl, &vtctx->input_temp[INPUT_TEMP_SAMPLEMASK],
-                                                   TGSI_SEMANTIC_SAMPLEMASK);
       break;
    case TGSI_FILE_OUTPUT:
       switch (decl->Semantic.Name) {
@@ -219,7 +216,6 @@ virgl_tgsi_transform_prolog(struct tgsi_transform_context * ctx)
     */
    virgl_mov_input_temp_sint(ctx, &vtctx->input_temp[INPUT_TEMP_LAYER]);
    virgl_mov_input_temp_sint(ctx, &vtctx->input_temp[INPUT_TEMP_VIEWPORT_INDEX]);
-   virgl_mov_input_temp_sint(ctx, &vtctx->input_temp[INPUT_TEMP_SAMPLEMASK]);
 
    /* virglrenderer also makes mistakes in the types of block id input
     * references from signed ops, so we use a temp that we do a plain MOV to at