diff options
author | Kenneth Graunke <[email protected]> | 2019-01-09 13:31:18 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-01-10 20:51:53 -0800 |
commit | 084a1cdbb7f7e5cf8f8cee42d2edd3bfb58867ab (patch) | |
tree | f0d7bd92a5784b4b29281401adab40171b1dceb1 /src/intel/blorp/blorp.h | |
parent | 2165636e9cf24b7904e8af362a40ce69aeb83f66 (diff) |
blorp: Add blorp_get_surface_address to the driver interface.
Currently, BLORP expects drivers to provide two functions for dealing
with buffers: blorp_emit_reloc and blorp_surface_reloc. Both record a
relocation and combine the BO address and offset into a full 64-bit
address. Traditionally, blorp_surface_reloc has written that combined
address to an implicitly-known buffer where surface states are stored.
(In contrast, blorp_emit_reloc returns the value.)
The upcoming Iris driver stores surface states in multiple buffers,
which makes it impossible for blorp_surface_reloc to write the combined
address - it only takes an offset, not the actual buffer to write to.
This commit adds a third function, blorp_get_surface_address, which
combines and returns an address, which is then passed to ISL's surface
state fill functions. Softpin-only drivers can return a real address
here and skip writing it in blorp_surface_reloc. Relocation-based
drivers are have options. They can simply return 0 from the new
function, and continue writing the address from blorp_surface_reloc.
Or, they can return a presumed address from blorp_get_surface_address,
and have other relocation processing write the real value later.
For now, i965 and anv simply return 0.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/blorp/blorp.h')
0 files changed, 0 insertions, 0 deletions