X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fwinsys%2Fdrm%2Fnouveau%2Fdrm%2Fnouveau_drm_api.h;h=a91aad7df8e8bdb4a8ae115f7d9e4930665b0399;hb=7b640f9f708306b3e8c661771f29bf24bf8687fb;hp=cc237bfc13ac0a1848d31718b08cd1289ceb406f;hpb=d0eccc41878ba9f51a885a69c4ba79fb127aeb18;p=mesa.git diff --git a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h index cc237bfc13a..a91aad7df8e 100644 --- a/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h +++ b/src/gallium/winsys/drm/nouveau/drm/nouveau_drm_api.h @@ -1,7 +1,31 @@ #ifndef __NOUVEAU_DRM_API_H__ #define __NOUVEAU_DRM_API_H__ + #include "state_tracker/drm_api.h" #include "state_tracker/dri1_api.h" + +#include "util/u_simple_screen.h" + #include "nouveau_dri.h" +struct nouveau_winsys { + struct pipe_winsys base; + + struct pipe_screen *pscreen; + + struct pipe_surface *front; +}; + +static INLINE struct nouveau_winsys * +nouveau_winsys(struct pipe_winsys *ws) +{ + return (struct nouveau_winsys *)ws; +} + +static INLINE struct nouveau_winsys * +nouveau_winsys_screen(struct pipe_screen *pscreen) +{ + return nouveau_winsys(pscreen->winsys); +} + #endif