mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 09:50:20 +01:00
nvk: Add a couple descriptor set address helpers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
fca440dcb2
commit
6dfb36c636
1 changed files with 16 additions and 0 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "nvk_private.h"
|
||||
|
||||
#include "nouveau_bo.h"
|
||||
#include "nouveau_push.h"
|
||||
#include "vulkan/runtime/vk_object.h"
|
||||
|
||||
struct nvk_descriptor_set_layout;
|
||||
|
|
@ -51,4 +53,18 @@ struct nvk_descriptor_set {
|
|||
VK_DEFINE_HANDLE_CASTS(nvk_descriptor_set, base, VkDescriptorSet,
|
||||
VK_OBJECT_TYPE_DESCRIPTOR_SET)
|
||||
|
||||
static void
|
||||
nvk_push_descriptor_set_ref(struct nouveau_ws_push *push,
|
||||
const struct nvk_descriptor_set *set)
|
||||
{
|
||||
if (set->bo)
|
||||
nouveau_ws_push_ref(push, set->bo, NOUVEAU_WS_BO_RD);
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
nvk_descriptor_set_addr(const struct nvk_descriptor_set *set)
|
||||
{
|
||||
return set->bo->offset + set->bo_offset;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue