virgl: Properly check for encode_stride when encoding transfers
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Mon, 27 Apr 2020 07:16:49 +0000 (09:16 +0200)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Wed, 6 May 2020 06:04:58 +0000 (08:04 +0200)
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4763>

src/gallium/drivers/virgl/virgl_encode.c

index 6d71f5d65747197c6210203d300019ec9a9cc66d..c255a1c12e46ac731d75c1566fa5fe7bed83e8be 100644 (file)
@@ -763,7 +763,7 @@ static void virgl_encoder_transfer3d_common(struct virgl_screen *vs,
    if (encode_stride == virgl_transfer3d_explicit_stride) {
       stride = transfer->stride;
       layer_stride = transfer->layer_stride;
-   } else if (virgl_transfer3d_host_inferred_stride) {
+   } else if (encode_stride == virgl_transfer3d_host_inferred_stride) {
       stride = 0;
       layer_stride = 0;
    } else {