mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
freedreno: Fix calculation of the const buffer cmdstream size.
The HW packet requires padding the number of pointers you emit, and we would assertion fail about running out of buffer space if the number of UBOs to be uploaded was odd. Fixes:b4df115d3f("freedreno/a6xx: pre-calculate userconst stateobj size") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4621> (cherry picked from commit69c8dfd49f)
This commit is contained in:
parent
660e650dbc
commit
8191b91695
2 changed files with 2 additions and 2 deletions
|
|
@ -535,7 +535,7 @@
|
|||
"description": "freedreno: Fix calculation of the const buffer cmdstream size.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "b4df115d3f3c7e5a1f6105c3737d0fe9a80dfcf2"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1030,7 +1030,7 @@ fd6_shader_state_create(struct pipe_context *pctx, const struct pipe_shader_stat
|
|||
|
||||
/* also account for UBO addresses: */
|
||||
packets += 1;
|
||||
size += 2 * shader->const_state.num_ubos;
|
||||
size += 2 * align(shader->const_state.num_ubos, 2);
|
||||
|
||||
unsigned sizedwords = (4 * packets) + size;
|
||||
shader->ubo_state.cmdstream_size = sizedwords * 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue