1#ifndef NXDK_PGRAPH_TESTS_PBKIT_EXT_H
2#define NXDK_PGRAPH_TESTS_PBKIT_EXT_H
7#define MASK(mask, val) (((val) << (__builtin_ffs(mask) - 1)) & (mask))
9constexpr float kF16Max = 511.9375f;
10constexpr float kF24Max = 3.4027977E38;
13uint16_t float_to_z16(
float val);
16float z16_to_float(uint32_t val);
19uint32_t float_to_z24(
float val);
22float z24_to_float(uint32_t val);
24#define PGRAPH_REGISTER_BASE 0xFD400000
25#define PGRAPH_REGISTER_ARRAY_SIZE 0x2000
29void pb_fetch_pgraph_registers(uint8_t* registers);
31void pb_diff_registers(
const uint8_t* a,
const uint8_t* b, std::list<uint32_t>& modified_registers);
33#if defined(__cplusplus)
39void pb_print_with_floats(
const char* format, ...);
40#define pb_print pb_print_with_floats
42#if defined(__cplusplus)