mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
turnip: tu_cs_emit_array
Array version of tu_cs_emit. Useful for updating multiple consecutive array-like registers, or loading a shader binary with SS6_DIRECT.
This commit is contained in:
parent
fffaa9b4b3
commit
c0567e84db
1 changed files with 11 additions and 0 deletions
|
|
@ -103,6 +103,17 @@ tu_cs_emit(struct tu_cs *cs, uint32_t value)
|
||||||
++cs->cur;
|
++cs->cur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emit an array of uint32_t into a command stream, without boundary checking.
|
||||||
|
*/
|
||||||
|
static inline void
|
||||||
|
tu_cs_emit_array(struct tu_cs *cs, const uint32_t *values, uint32_t length)
|
||||||
|
{
|
||||||
|
assert(cs->cur + length <= cs->reserved_end);
|
||||||
|
memcpy(cs->cur, values, sizeof(uint32_t) * length);
|
||||||
|
cs->cur += length;
|
||||||
|
}
|
||||||
|
|
||||||
static inline unsigned
|
static inline unsigned
|
||||||
tu_odd_parity_bit(unsigned val)
|
tu_odd_parity_bit(unsigned val)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue