diff options
author | Christoph Bumiller <[email protected]> | 2010-12-09 15:01:37 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2010-12-09 15:01:37 +0100 |
commit | 3ef1616b63507db01f54efa882a9cf28839cfdf3 (patch) | |
tree | 8950b3c215ca3e7d7e511d6b8afa701131ec8218 /src/gallium/drivers/nvc0/nvc0_winsys.h | |
parent | 0d1a2bd0fb356fdb74a9aed1c34276dc9e97b4c6 (diff) |
nvc0: buffer suballocation with a primitive slab allocator
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_winsys.h')
-rw-r--r-- | src/gallium/drivers/nvc0/nvc0_winsys.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_winsys.h b/src/gallium/drivers/nvc0/nvc0_winsys.h index 48ea87613b5..e97ca8e90da 100644 --- a/src/gallium/drivers/nvc0/nvc0_winsys.h +++ b/src/gallium/drivers/nvc0/nvc0_winsys.h @@ -12,6 +12,8 @@ #include "nouveau/nouveau_resource.h" #include "nouveau/nouveau_reloc.h" +#include "nvc0_resource.h" /* OUT_RESRC */ + #ifndef NV04_PFIFO_MAX_PACKET_LEN #define NV04_PFIFO_MAX_PACKET_LEN 2047 #endif @@ -143,6 +145,20 @@ OUT_RELOCh(struct nouveau_channel *chan, struct nouveau_bo *bo, return OUT_RELOC(chan, bo, delta, flags | NOUVEAU_BO_HIGH, 0, 0); } +static INLINE int +OUT_RESRCh(struct nouveau_channel *chan, struct nvc0_resource *res, + unsigned delta, unsigned flags) +{ + return OUT_RELOCh(chan, res->bo, res->offset + delta, res->domain | flags); +} + +static INLINE int +OUT_RESRCl(struct nouveau_channel *chan, struct nvc0_resource *res, + unsigned delta, unsigned flags) +{ + return OUT_RELOCl(chan, res->bo, res->offset + delta, res->domain | flags); +} + static INLINE void FIRE_RING(struct nouveau_channel *chan) { |