mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 08:50:25 +01:00
pan/indirect_draw: Don't upload garbage UBO
There should never be a CPU pointer in GPU memory, let's say that... Fixes:2e6d94c198("panfrost: Add helpers to support indirect draws") Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14154> (cherry picked from commitd696183d4d)
This commit is contained in:
parent
d8715ff19b
commit
7342fa5ed9
2 changed files with 4 additions and 4 deletions
|
|
@ -1363,7 +1363,7 @@
|
|||
"description": "pan/indirect_draw: Don't upload garbage UBO",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "2e6d94c198e4d10c82ed3ffd59e85f460bd58950"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1171,15 +1171,15 @@ get_ubos(struct pan_pool *pool,
|
|||
const struct indirect_draw_inputs *inputs)
|
||||
{
|
||||
struct panfrost_ptr inputs_buf =
|
||||
pan_pool_alloc_aligned(pool, sizeof(inputs), 16);
|
||||
pan_pool_alloc_aligned(pool, sizeof(*inputs), 16);
|
||||
|
||||
memcpy(inputs_buf.cpu, &inputs, sizeof(inputs));
|
||||
memcpy(inputs_buf.cpu, inputs, sizeof(*inputs));
|
||||
|
||||
struct panfrost_ptr ubos_buf =
|
||||
pan_pool_alloc_desc(pool, UNIFORM_BUFFER);
|
||||
|
||||
pan_pack(ubos_buf.cpu, UNIFORM_BUFFER, cfg) {
|
||||
cfg.entries = DIV_ROUND_UP(sizeof(inputs), 16);
|
||||
cfg.entries = DIV_ROUND_UP(sizeof(*inputs), 16);
|
||||
cfg.pointer = inputs_buf.gpu;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue