mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-29 18:28:14 +02:00
When an allocation failure happens, the command buffer should be flagged as invalid, and anything using this memory from the CPU side should be skipped to avoid segfaults. For allocations going through memory pools owned by a command buffer we automate that with panvk_cmd_alloc_xx() macros. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Rebecca Mckeever <rebecca.mckeever@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: John Anthony <john.anthony@arm.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30969>
25 lines
513 B
C
25 lines
513 B
C
/*
|
|
* Copyright © 2024 Collabora Ltd.
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef PANVK_CMD_PUSH_CONSTANT_H
|
|
#define PANVK_CMD_PUSH_CONSTANT_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "genxml/gen_macros.h"
|
|
|
|
struct panvk_cmd_buffer;
|
|
|
|
#define MAX_PUSH_CONSTANTS_SIZE 128
|
|
|
|
struct panvk_push_constant_state {
|
|
uint8_t data[MAX_PUSH_CONSTANTS_SIZE];
|
|
};
|
|
|
|
mali_ptr
|
|
panvk_per_arch(cmd_prepare_push_uniforms)(struct panvk_cmd_buffer *cmdbuf,
|
|
void *sysvals, unsigned sysvals_sz);
|
|
|
|
#endif
|