📄 dri_util.h
字号:
* * \note This behavior will change with GLX 1.3. */ int refcount; /** * Index of this drawable information in the SAREA. */ unsigned int index; /** * Pointer to the "drawable has changed ID" stamp in the SAREA. */ unsigned int *pStamp; /** * Last value of the stamp. * * If this differs from the value stored at __DRIdrawable::pStamp, * then the drawable information has been modified by the X server, and the * drawable information (below) should be retrieved from the X server. */ unsigned int lastStamp; /** * \name Drawable * * Drawable information used in software fallbacks. */ /*@{*/ int x; int y; int w; int h; int numClipRects; drm_clip_rect_t *pClipRects; /*@}*/ /** * \name Back and depthbuffer * * Information about the back and depthbuffer where different from above. */ /*@{*/ int backX; int backY; int backClipRectType; int numBackClipRects; drm_clip_rect_t *pBackClipRects; /*@}*/ /** * \name Vertical blank tracking information * Used for waiting on vertical blank events. */ /*@{*/ unsigned int vblSeq; unsigned int vblFlags; /*@}*/ /** * \name Monotonic MSC tracking * * Low level driver is responsible for updating msc_base and * vblSeq values so that higher level code can calculate * a new msc value or msc target for a WaitMSC call. The new value * will be: * msc = msc_base + get_vblank_count() - vblank_base; * * And for waiting on a value, core code will use: * actual_target = target_msc - msc_base + vblank_base; */ /*@{*/ int64_t vblank_base; int64_t msc_base; /*@}*/ /** * Pointer to context to which this drawable is currently bound. */ __DRIcontext *driContextPriv; /** * Pointer to screen on which this drawable was created. */ __DRIscreen *driScreenPriv; /** * Controls swap interval as used by GLX_SGI_swap_control and * GLX_MESA_swap_control. */ unsigned int swap_interval; struct { unsigned int tail; unsigned int drawable_id; } dri2;};/** * Per-context private driver information. */struct __DRIcontextRec { /** * Kernel context handle used to access the device lock. */ drm_context_t hHWContext; /** * Device driver's private context data. This structure is opaque. */ void *driverPrivate; /** * Pointer back to the \c __DRIcontext that contains this structure. */ __DRIcontext *pctx; /** * Pointer to drawable currently bound to this context for drawing. */ __DRIdrawable *driDrawablePriv; /** * Pointer to drawable currently bound to this context for reading. */ __DRIdrawable *driReadablePriv; /** * Pointer to screen on which this context was created. */ __DRIscreen *driScreenPriv;};/** * Per-screen private driver information. */struct __DRIscreenRec { /** * Current screen's number */ int myNum; /** * Callback functions into the hardware-specific DRI driver code. */ struct __DriverAPIRec DriverAPI; const __DRIextension **extensions; /** * DDX / 2D driver version information. */ __DRIversion ddx_version; /** * DRI X extension version information. */ __DRIversion dri_version; /** * DRM (kernel module) version information. */ __DRIversion drm_version; /** * ID used when the client sets the drawable lock. * * The X server uses this value to detect if the client has died while * holding the drawable lock. */ int drawLockID; /** * File descriptor returned when the kernel device driver is opened. * * Used to: * - authenticate client to kernel * - map the frame buffer, SAREA, etc. * - close the kernel device driver */ int fd; /** * SAREA pointer * * Used to access: * - the device lock * - the device-independent per-drawable and per-context(?) information */ drm_sarea_t *pSAREA; /** * \name Direct frame buffer access information * Used for software fallbacks. */ /*@{*/ unsigned char *pFB; int fbSize; int fbOrigin; int fbStride; int fbWidth; int fbHeight; int fbBPP; /*@}*/ /** * \name Device-dependent private information (stored in the SAREA). * * This data is accessed by the client driver only. */ /*@{*/ void *pDevPriv; int devPrivSize; /*@}*/ /** * Dummy context to which drawables are bound when not bound to any * other context. * * A dummy hHWContext is created for this context, and is used by the GL * core when a hardware lock is required but the drawable is not currently * bound (e.g., potentially during a SwapBuffers request). The dummy * context is created when the first "real" context is created on this * screen. */ __DRIcontext dummyContextPriv; /** * Device-dependent private information (not stored in the SAREA). * * This pointer is never touched by the DRI layer. */ void *private; /** * Pointer back to the \c __DRIscreen that contains this structure. */ __DRIscreen *psc; /* Extensions provided by the loader. */ const __DRIgetDrawableInfoExtension *getDrawableInfo; const __DRIsystemTimeExtension *systemTime; const __DRIdamageExtension *damage; struct { /* Flag to indicate that this is a DRI2 screen. Many of the above * fields will not be valid or initializaed in that case. */ int enabled;#ifdef TTM_API drmBO sareaBO;#endif void *sarea; __DRIEventBuffer *buffer; __DRILock *lock; __DRIloaderExtension *loader; } dri2; /* The lock actually in use, old sarea or DRI2 */ drmLock *lock;};extern void__driUtilMessage(const char *f, ...);extern void__driUtilUpdateDrawableInfo(__DRIdrawable *pdp);extern int__driParseEvents(__DRIcontext *psp, __DRIdrawable *pdp);extern floatdriCalculateSwapUsage( __DRIdrawable *dPriv, int64_t last_swap_ust, int64_t current_ust );extern GLintdriIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 );#endif /* _DRI_UTIL_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -