Skip to content

Commit

Permalink
zink: add a util function for finding swapchain resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zmike authored and Marge Bot committed Apr 27, 2022
1 parent 8d73315 commit b86c814
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gallium/drivers/zink/zink_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ zink_resource_has_binds(const struct zink_resource *res)
return res->all_binds > 0;
}

static inline bool
zink_is_swapchain(const struct zink_resource *res)
{
return (res->base.b.bind & PIPE_BIND_DISPLAY_TARGET) > 0;
}

#ifndef __cplusplus
#include "zink_bo.h"

Expand Down

0 comments on commit b86c814

Please sign in to comment.