summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>2020-08-21 23:13:06 +0300
committerDylan Baker <dylan.c.baker@intel.com>2020-08-28 11:26:51 -0700
commit33653e6dde2ff85b7b5be64c59e5b8f309e7c045 (patch)
tree14cf829e4659851c52fc358c6fd0dabef8691605
parentc1e2e33752e967511b6311ba7687d8422c263fc9 (diff)
anv: fix transform feedback surface size
Non multiple 4 sizes are causing issue in particular < 4. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6430> (cherry picked from commit fd10cb8cfccb8882e33a1ade047fc467b9716f54)
-rw-r--r--.pick_status.json2
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json
index ed56aaf46d1..b10a7027604 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1507,7 +1507,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 4522f5d2aef..09b91415784 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -3412,7 +3412,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;
}
}
}