agx: Add agx_immediate_f helper
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11718>
This commit is contained in:
committed by
Marge Bot
parent
be4d88a6ba
commit
ef808205c6
@@ -31,6 +31,7 @@
|
||||
#include "util/u_dynarray.h"
|
||||
#include "agx_compile.h"
|
||||
#include "agx_opcodes.h"
|
||||
#include "agx_minifloat.h"
|
||||
|
||||
enum agx_dbg {
|
||||
AGX_DBG_MSGS = BITFIELD_BIT(0),
|
||||
@@ -92,6 +93,13 @@ agx_immediate(uint16_t imm)
|
||||
};
|
||||
}
|
||||
|
||||
static inline agx_index
|
||||
agx_immediate_f(float f)
|
||||
{
|
||||
assert(agx_minifloat_exact(f));
|
||||
return agx_immediate(agx_minifloat_encode(f));
|
||||
}
|
||||
|
||||
/* in half-words, specify r0h as 1, r1 as 2... */
|
||||
static inline agx_index
|
||||
agx_register(uint8_t imm, enum agx_size size)
|
||||
|
||||
Reference in New Issue
Block a user