Mesa (staging/20.1): anv: fix transform feedback surface size

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 25 13:04:22 UTC 2020


Module: Mesa
Branch: staging/20.1
Commit: 26d9d76b9555bd6b3ab5ef3cd4b14793cbb2cf3d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=26d9d76b9555bd6b3ab5ef3cd4b14793cbb2cf3d

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Aug 21 23:13:06 2020 +0300

anv: fix transform feedback surface size

Non multiple 4 sizes are causing issue in particular < 4.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3450
Fixes: 36ee2fd61c8f ("anv: Implement the basic form of VK_EXT_transform_feedback")
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6430>
(cherry picked from commit fd10cb8cfccb8882e33a1ade047fc467b9716f54)

---

 .pick_status.json                  | 2 +-
 src/intel/vulkan/genX_cmd_buffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index d53d97a2570..5c0b608b155 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -40,7 +40,7 @@
         "description": "anv: fix transform feedback surface size",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "36ee2fd61c8f943be1d1e2b0354f7a121ffef28f"
     },
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index f1b102c9805..7f47d929bd2 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3346,7 +3346,7 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
                sob.SurfaceBaseAddress = anv_address_add(xfb->buffer->address,
                                                         xfb->offset);
                /* Size is in DWords - 1 */
-               sob.SurfaceSize = xfb->size / 4 - 1;
+               sob.SurfaceSize = DIV_ROUND_UP(xfb->size, 4) - 1;
             }
          }
       }



More information about the mesa-commit mailing list