diff options
author | Eric Anholt <eric@anholt.net> | 2009-01-19 19:11:41 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-01-20 10:50:20 -0800 |
commit | a340fe5e4227ebea5493e658eb6289624b07ab0b (patch) | |
tree | d7859ce899772490dad34360a8f74b53ed59b12d /src/i830.h | |
parent | aefe198ca427a5ad69717f49948eb3ede713bb28 (diff) |
Use intel_emit_reloc from video to prettify 965 render bind_bo setup.
Diffstat (limited to 'src/i830.h')
-rw-r--r-- | src/i830.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1023,6 +1023,23 @@ Bool i830_pixmap_tiled(PixmapPtr p); if (pitch > KB(8)) I830FALLBACK("pitch exceeds 3d limit 8K\n");\ } while(0) +/** + * Little wrapper around drm_intel_bo_reloc to return the initial value you + * should stuff into the relocation entry. + * + * If only we'd done this before settling on the library API. + */ +static inline uint32_t +intel_emit_reloc(drm_intel_bo *bo, uint32_t offset, + drm_intel_bo *target_bo, uint32_t target_offset, + uint32_t read_domains, uint32_t write_domain) +{ + drm_intel_bo_emit_reloc(bo, offset, target_bo, target_offset, + read_domains, write_domain); + + return target_bo->offset + target_offset; +} + extern const int I830PatternROP[16]; extern const int I830CopyROP[16]; |