mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 11:38:05 +02:00
nouveau/mme: Add a couple helpers for working 64-bit addresses
In the command stream, they always come high bits first which is backwards from little endian. These helpers follow that same convention so that MMEs use the same conventions as other registers. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
54fd3604ef
commit
92970b1515
1 changed files with 15 additions and 0 deletions
|
|
@ -464,6 +464,14 @@ mme_load(struct mme_builder *b)
|
|||
return dst;
|
||||
}
|
||||
|
||||
static inline struct mme_value64
|
||||
mme_load_addr64(struct mme_builder *b)
|
||||
{
|
||||
struct mme_value hi = mme_load(b);
|
||||
struct mme_value lo = mme_load(b);
|
||||
return mme_value64(lo, hi);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mme_mthd_arr(struct mme_builder *b, uint16_t mthd,
|
||||
struct mme_value index)
|
||||
|
|
@ -484,6 +492,13 @@ mme_emit(struct mme_builder *b,
|
|||
mme_tu104_emit(b, data);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mme_emit_addr64(struct mme_builder *b, struct mme_value64 addr)
|
||||
{
|
||||
mme_tu104_emit(b, addr.hi);
|
||||
mme_tu104_emit(b, addr.lo);
|
||||
}
|
||||
|
||||
static inline void
|
||||
mme_start_loop(struct mme_builder *b, struct mme_value count)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue