diff options
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_context.h')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.h | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.h b/src/mesa/drivers/dri/nouveau/nouveau_context.h index 9812963e1a..682f8a414e 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.h @@ -40,10 +40,20 @@ enum nouveau_fallback { SWRAST, }; -struct nouveau_drawable_state { - GLboolean dirty; - unsigned int d_stamp; - unsigned int r_stamp; +struct nouveau_hw_state { + struct nouveau_channel *chan; + + struct nouveau_notifier *ntfy; + struct nouveau_grobj *eng3d; + struct nouveau_grobj *eng3dm; + struct nouveau_grobj *surf3d; + struct nouveau_grobj *m2mf; + struct nouveau_grobj *surf2d; + struct nouveau_grobj *rop; + struct nouveau_grobj *patt; + struct nouveau_grobj *rect; + struct nouveau_grobj *swzsurf; + struct nouveau_grobj *sifm; }; struct nouveau_context { @@ -54,9 +64,9 @@ struct nouveau_context { BITSET_DECLARE(dirty, MAX_NOUVEAU_STATE); enum nouveau_fallback fallback; + struct nouveau_hw_state hw; struct nouveau_bo_state bo; struct nouveau_render_state render; - struct nouveau_drawable_state drawable; }; #define to_nouveau_context(ctx) ((struct nouveau_context *)(ctx)) @@ -66,9 +76,9 @@ struct nouveau_context { #define context_chipset(ctx) \ (context_dev(ctx)->chipset) #define context_chan(ctx) \ - (to_nouveau_context(ctx)->screen->chan) + (to_nouveau_context(ctx)->hw.chan) #define context_eng3d(ctx) \ - (to_nouveau_context(ctx)->screen->eng3d) + (to_nouveau_context(ctx)->hw.eng3d) #define context_drv(ctx) \ (to_nouveau_context(ctx)->screen->driver) #define context_dirty(ctx, s) \ @@ -85,11 +95,16 @@ nouveau_context_init(GLcontext *ctx, struct nouveau_screen *screen, const GLvisual *visual, GLcontext *share_ctx); void +nouveau_context_deinit(GLcontext *ctx); + +void nouveau_context_destroy(__DRIcontext *dri_ctx); +void +nouveau_update_renderbuffers(__DRIcontext *dri_ctx, __DRIdrawable *draw); + GLboolean -nouveau_context_make_current(__DRIcontext *dri_ctx, - __DRIdrawable *ddraw, +nouveau_context_make_current(__DRIcontext *dri_ctx, __DRIdrawable *ddraw, __DRIdrawable *rdraw); GLboolean |