mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-14 04:40:28 +01:00
ilo: allow one-off flags to be specified for CP
It will be used for SOL_RESET on GEN7.
This commit is contained in:
parent
dd62e7bc02
commit
440557db4e
2 changed files with 15 additions and 0 deletions
|
|
@ -191,11 +191,15 @@ ilo_cp_exec_bo(struct ilo_cp *cp)
|
|||
break;
|
||||
}
|
||||
|
||||
flags |= cp->one_off_flags;
|
||||
|
||||
if (likely(do_exec))
|
||||
err = cp->bo->exec(cp->bo, cp->used * 4, cp->hw_ctx, flags);
|
||||
else
|
||||
err = 0;
|
||||
|
||||
cp->one_off_flags = 0;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ struct ilo_cp {
|
|||
enum ilo_cp_ring ring;
|
||||
bool no_implicit_flush;
|
||||
int reserve_for_pre_flush;
|
||||
unsigned one_off_flags;
|
||||
|
||||
struct {
|
||||
ilo_cp_hook_func func;
|
||||
|
|
@ -178,6 +179,16 @@ ilo_cp_reserve_for_pre_flush(struct ilo_cp *cp, int reserve)
|
|||
cp->reserve_for_pre_flush += reserve;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set one-off flags. They will be cleared after flushing.
|
||||
*/
|
||||
static inline void
|
||||
ilo_cp_set_one_off_flags(struct ilo_cp *cp, unsigned flags)
|
||||
{
|
||||
cp->one_off_flags |= flags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a command parser hook.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue