mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 15:40:11 +01:00
zink: move zink_batch_resource_usage_set to be static inline
this has to go in zink_resource.h to avoid infinite include dependency conflicts Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18135>
This commit is contained in:
parent
7172c8a421
commit
0b56ac82eb
3 changed files with 22 additions and 24 deletions
|
|
@ -520,27 +520,6 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *res, bool write)
|
||||
{
|
||||
if (res->obj->dt) {
|
||||
VkSemaphore acquire = zink_kopper_acquire_submit(zink_screen(batch->state->ctx->base.screen), res);
|
||||
if (acquire)
|
||||
util_dynarray_append(&batch->state->acquires, VkSemaphore, acquire);
|
||||
}
|
||||
if (write && !res->obj->is_buffer) {
|
||||
if (!res->valid && res->fb_binds)
|
||||
batch->state->ctx->rp_loadop_changed = true;
|
||||
res->valid = true;
|
||||
}
|
||||
zink_resource_usage_set(res, batch->state, write);
|
||||
/* multiple array entries are fine */
|
||||
if (!res->obj->coherent && res->obj->persistent_maps)
|
||||
util_dynarray_append(&batch->state->persistent_resources, struct zink_resource_object*, res->obj);
|
||||
|
||||
batch->has_work = true;
|
||||
}
|
||||
|
||||
void
|
||||
zink_batch_reference_resource_rw(struct zink_batch *batch, struct zink_resource *res, bool write)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -68,9 +68,6 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch);
|
|||
void
|
||||
zink_batch_add_wait_semaphore(struct zink_batch *batch, VkSemaphore sem);
|
||||
|
||||
void
|
||||
zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *res, bool write);
|
||||
|
||||
void
|
||||
zink_batch_reference_resource_rw(struct zink_batch *batch,
|
||||
struct zink_resource *res,
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ zink_is_swapchain(const struct zink_resource *res)
|
|||
|
||||
#include "zink_batch.h"
|
||||
#include "zink_bo.h"
|
||||
#include "zink_kopper.h"
|
||||
|
||||
static inline bool
|
||||
zink_resource_usage_is_unflushed(const struct zink_resource *res)
|
||||
|
|
@ -142,6 +143,27 @@ zink_resource_object_usage_unset(struct zink_resource_object *obj, struct zink_b
|
|||
return zink_bo_usage_unset(obj->bo, bs);
|
||||
}
|
||||
|
||||
static inline void
|
||||
zink_batch_resource_usage_set(struct zink_batch *batch, struct zink_resource *res, bool write)
|
||||
{
|
||||
if (res->obj->dt) {
|
||||
VkSemaphore acquire = zink_kopper_acquire_submit(zink_screen(batch->state->ctx->base.screen), res);
|
||||
if (acquire)
|
||||
util_dynarray_append(&batch->state->acquires, VkSemaphore, acquire);
|
||||
}
|
||||
if (write && !res->obj->is_buffer) {
|
||||
if (!res->valid && res->fb_binds)
|
||||
batch->state->ctx->rp_loadop_changed = true;
|
||||
res->valid = true;
|
||||
}
|
||||
zink_resource_usage_set(res, batch->state, write);
|
||||
/* multiple array entries are fine */
|
||||
if (!res->obj->coherent && res->obj->persistent_maps)
|
||||
util_dynarray_append(&batch->state->persistent_resources, struct zink_resource_object*, res->obj);
|
||||
|
||||
batch->has_work = true;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue