X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fnouveau%2Fnouveau_screen.h;h=f4a7a2bc234cce2715eb29f14a2034330a317ef0;hb=2689dd304c6d644b04c941e6da63e466be5de0d6;hp=9968b07896606c6134b8639faf4337da2f10df78;hpb=6530fabb93d8e1664f16059fd31f540352a866a5;p=mesa.git diff --git a/src/gallium/drivers/nouveau/nouveau_screen.h b/src/gallium/drivers/nouveau/nouveau_screen.h index 9968b078966..f4a7a2bc234 100644 --- a/src/gallium/drivers/nouveau/nouveau_screen.h +++ b/src/gallium/drivers/nouveau/nouveau_screen.h @@ -5,6 +5,21 @@ struct nouveau_screen { struct pipe_screen base; struct nouveau_device *device; struct nouveau_channel *channel; + + /** + * Create a new texture object, using the given template info, but on top of + * existing memory. + * + * It is assumed that the buffer data is layed out according to the expected + * by the hardware. NULL will be returned if any inconsistency is found. + */ + struct pipe_texture * (*texture_blanket)(struct pipe_screen *, + const struct pipe_texture *templat, + const unsigned *stride, + struct pipe_buffer *buffer); + + int (*pre_pipebuffer_map_callback) (struct pipe_screen *pscreen, + struct pipe_buffer *pb, unsigned usage); }; static inline struct nouveau_screen * @@ -22,4 +37,15 @@ nouveau_bo(struct pipe_buffer *pb) int nouveau_screen_init(struct nouveau_screen *, struct nouveau_device *); void nouveau_screen_fini(struct nouveau_screen *); +struct nouveau_miptree { + struct pipe_texture base; + struct nouveau_bo *bo; +}; + +static inline struct nouveau_miptree * +nouveau_miptree(struct pipe_texture *pt) +{ + return (struct nouveau_miptree *)pt; +} + #endif