mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
zink: add generic wrapper for checking whether a resource needs a barrier
handy to not need to check ahead of time Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8945>
This commit is contained in:
parent
4536607ea0
commit
5d7cb2495a
2 changed files with 11 additions and 0 deletions
|
|
@ -1206,6 +1206,14 @@ zink_resource_buffer_barrier(VkCommandBuffer cmdbuf, struct zink_resource *res,
|
|||
res->access_stage = pipeline;
|
||||
}
|
||||
|
||||
bool
|
||||
zink_resource_needs_barrier(struct zink_resource *res, unsigned flags, VkPipelineStageFlags pipeline)
|
||||
{
|
||||
if (res->base.target == PIPE_BUFFER)
|
||||
return zink_resource_buffer_needs_barrier(res, flags, pipeline);
|
||||
return zink_resource_image_needs_barrier(res, flags, pipeline);
|
||||
}
|
||||
|
||||
VkShaderStageFlagBits
|
||||
zink_shader_stage(enum pipe_shader_type type)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -223,6 +223,9 @@ void
|
|||
zink_resource_barrier(VkCommandBuffer cmdbuf, struct zink_resource *res,
|
||||
VkImageLayout new_layout, VkPipelineStageFlags pipeline);
|
||||
|
||||
bool
|
||||
zink_resource_needs_barrier(struct zink_resource *res, unsigned flags, VkPipelineStageFlags pipeline);
|
||||
|
||||
void
|
||||
zink_begin_render_pass(struct zink_context *ctx,
|
||||
struct zink_batch *batch);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue