Kristian Høgsberg wrote: > On Tue, Jul 1, 2008 at 3:01 AM, Thomas Hellström > <[EMAIL PROTECTED]> wrote: > >> Hi! >> >> I'm currently building a non-glx application (similar to "ttmtest"), but >> using DRI2. I suspect that there will be more such apps in the future. XvMC- >> and EGL systems are likely users. >> >> The problem with creating a HW context is that the X server needs to do it, >> and from a brief reading of the code it doesn't seem like DRI2 has a way to >> do this without involving GLX structures. >> >> So my question is, should HW context creation functionality be added to DRI2 >> for non-GLX clients, or should we just open up HW context creation for >> authenticated users (perhaps using driver-specific IOCTLS)? >> > > DRI2 doesn't use drm contexts (which is what I think you mean by HW > contexts). There should be no need to create a drm context for DRI2 > clients. > > cheers, > Kristian > Thanks, Christian. I see your point there. What I was planning to use was really the context_ctor /dtor functions in drm, for cached hardware context state, but with X no longer involved in context switches, I'll open up the DRM_ADDCTX and DRM_RMCTX functionality for non-root using driver-specific IOCTLs, and make sure those context numbers aren't used for locking.
A small concern with dri2CreateNewContext: It's not wrap-safe. One can argue that it'll take a long time for the context numbers to wrap, but then strange things will indeed happen. Even if the sequence is explicitly wrapped, there's no guarantee we won't be reusing context numbers. /Thomas ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 -- _______________________________________________ Dri-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dri-devel
