Skip to content

pvr: vulkan: Add helper macros & functions for pvr_dev_addr_t

Matt Coster requested to merge MTCoster/mesa:pvr-misc-changes into main

The added macros/functions are:

  • PVR_DEV_ADDR() to construct a new pvr_dev_addr_t from a uint64_t-assignable value,
  • PVR_DEV_ADDR_OFFSET() to add a uint64_t-assignable offset to a pvr_dev_addr_t,
  • PVR_DEV_ADDR_INVALID to create a null pvr_dev_addr_t,
  • pvr_dev_addr_get_offset() to compute a uint64_t offset between two pvr_dev_addr_ts,
  • pvr_dev_addr_is_null() to check for a null pvr_dev_addr_t, and
  • pvr_dev_addr_{eq,lt,gt}() to perform ==, <, or > respectively on two pvr_dev_addr_ts.

The purpose of these is to make pvr_dev_addr_t behave more like a type of its own rather than just a wrapper.

Signed-off-by: Matt Coster <>
Edited by Matt Coster

Merge request reports