winsys/radeon: add buffer_get_reloc_offset
[mesa.git] / src / gallium / drivers / radeon / radeon_winsys.h
index e8fc6d62c4337eb5fef249b91d40baf736946df0..7146737c8260514a279cb130af6f59324dc1e9d8 100644 (file)
@@ -514,6 +514,18 @@ struct radeon_winsys {
      */
     uint64_t (*buffer_get_virtual_address)(struct pb_buffer *buf);
 
+    /**
+     * Return the offset of this buffer relative to the relocation base.
+     * This is only non-zero for sub-allocated buffers.
+     *
+     * This is only supported in the radeon winsys, since amdgpu uses virtual
+     * addresses in submissions even for the video engines.
+     *
+     * \param buf      A winsys buffer object
+     * \return         the offset for relocations
+     */
+    unsigned (*buffer_get_reloc_offset)(struct pb_buffer *buf);
+
     /**
      * Query the initial placement of the buffer from the kernel driver.
      */