/[packages]/updates/8/mesa/current/SOURCES/0021-anv-zero-out-anv_batch_bo.patch
ViewVC logotype

Contents of /updates/8/mesa/current/SOURCES/0021-anv-zero-out-anv_batch_bo.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1799982 - (show annotations) (download)
Sat Mar 19 09:57:35 2022 UTC (2 years, 1 month ago) by tmb
File size: 1821 byte(s)
add fixes from staging/21.3
1 From 2e048268e5ac7d0005f612a2dc1e3cabd9f29dcc Mon Sep 17 00:00:00 2001
2 From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 Date: Thu, 17 Mar 2022 11:57:07 +0200
4 Subject: [PATCH 21/29] anv: zero-out anv_batch_bo
5
6 anv_batch_bo has a length field that we use to flush cachelines. Not
7 having that field initialized properly leads us to access out of bound
8 memory.
9
10 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
11 Cc: mesa-stable
12 Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
13 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425>
14 (cherry picked from commit d68b9f0e6b1e45533c9f53eca6111cabb34d6fdb)
15 ---
16 .pick_status.json | 2 +-
17 src/intel/vulkan/anv_batch_chain.c | 2 +-
18 2 files changed, 2 insertions(+), 2 deletions(-)
19
20 diff --git a/.pick_status.json b/.pick_status.json
21 index 127f1d284d4..283e3642175 100644
22 --- a/.pick_status.json
23 +++ b/.pick_status.json
24 @@ -868,7 +868,7 @@
25 "description": "anv: zero-out anv_batch_bo",
26 "nominated": true,
27 "nomination_type": 0,
28 - "resolution": 0,
29 + "resolution": 1,
30 "main_sha": null,
31 "because_sha": null
32 },
33 diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
34 index 350b9952019..d96bf0165d3 100644
35 --- a/src/intel/vulkan/anv_batch_chain.c
36 +++ b/src/intel/vulkan/anv_batch_chain.c
37 @@ -346,7 +346,7 @@ anv_batch_bo_create(struct anv_cmd_buffer *cmd_buffer,
38 {
39 VkResult result;
40
41 - struct anv_batch_bo *bbo = vk_alloc(&cmd_buffer->pool->alloc, sizeof(*bbo),
42 + struct anv_batch_bo *bbo = vk_zalloc(&cmd_buffer->pool->alloc, sizeof(*bbo),
43 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
44 if (bbo == NULL)
45 return vk_error(cmd_buffer, VK_ERROR_OUT_OF_HOST_MEMORY);
46 --
47 2.30.2
48

  ViewVC Help
Powered by ViewVC 1.1.30