mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
venus: add vn_relax_warn to check if at warn order
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40790>
This commit is contained in:
parent
b1de02b7ea
commit
de86f0223d
2 changed files with 9 additions and 0 deletions
|
|
@ -259,8 +259,10 @@ vn_relax(struct vn_relax_state *state)
|
|||
return;
|
||||
}
|
||||
|
||||
state->warn = false;
|
||||
if (unlikely(*iter % (1 << warn_order) == 0)) {
|
||||
struct vn_instance *instance = state->instance;
|
||||
state->warn = true;
|
||||
vn_log(instance, "stuck in %s wait with iter at %d", state->reason_str,
|
||||
*iter);
|
||||
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ struct vn_relax_state {
|
|||
uint32_t iter;
|
||||
const struct vn_relax_profile profile;
|
||||
const char *reason_str;
|
||||
bool warn;
|
||||
};
|
||||
|
||||
/* TLS ring
|
||||
|
|
@ -430,6 +431,12 @@ vn_relax(struct vn_relax_state *state);
|
|||
void
|
||||
vn_relax_fini(struct vn_relax_state *state);
|
||||
|
||||
static inline bool
|
||||
vn_relax_warn(struct vn_relax_state *state)
|
||||
{
|
||||
return state->warn;
|
||||
}
|
||||
|
||||
static_assert(sizeof(vn_object_id) >= sizeof(uintptr_t), "");
|
||||
|
||||
static inline VkResult
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue