mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
iris: correctly set alignment to next power of two for struct size
We're currently aligning the offset to the size of the data structure itself when the upload manager actually expects a POT. Ideally this would be the next POT that's greater than the size of the structure. Fixes:c24a574e6c("iris: Don't allocate a BO per query object") Signed-off-by: Rohan Garg <rohan.garg@intel.com> Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153> (cherry picked from commit14dec0c147)
This commit is contained in:
parent
69087bf478
commit
07e26682f5
2 changed files with 3 additions and 2 deletions
|
|
@ -2659,7 +2659,7 @@
|
|||
"description": "iris: correctly set alignment to next power of two for struct size",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c24a574e6c78db038d7aa6c4605bf6a8a892f7ab"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -521,7 +521,8 @@ iris_begin_query(struct pipe_context *ctx, struct pipe_query *query)
|
|||
size = sizeof(struct iris_query_snapshots);
|
||||
|
||||
u_upload_alloc(ice->query_buffer_uploader, 0,
|
||||
size, size, &q->query_state_ref.offset,
|
||||
size, util_next_power_of_two(size),
|
||||
&q->query_state_ref.offset,
|
||||
&q->query_state_ref.res, &ptr);
|
||||
|
||||
if (!iris_resource_bo(q->query_state_ref.res))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue