summaryrefslogtreecommitdiff
path: root/glamor/glamor_egl_stubs.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-18glamor: Delay making pixmaps shareable until we need to.Eric Anholt1-6/+0
If a pixmap isn't getting exported as a dmabuf, then we don't need to make an EGLImage/GBM bo for it. This should reduce normal pixmap allocation overhead, and also lets the driver choose non-scanout formats which may be much higher performance. On Raspberry Pi, where scanout isn't usable as a texture source, this improves x11perf -copypixwin100 from about 4300/sec to 5780/sec under xcompmgr -a, because we no longer need to upload our x11perf window to a tiled temporary in order to render it to the screen. v2: Just use pixmap->usage_hint instead of a new field. Drop the changes that started storing gbm_bos in the pixmap priv due to lifetime issues. v3: Fix a missing gbm_bo_destroy() on the pixmap-from-fd success path. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-11-18glamor: Hook up EGL DestroyPixmap through the normal wrap chain.Eric Anholt1-5/+0
One less layering violation (EGL should call glamor, if anything, not the other way around). v2: Move glamor.c's DestroyPixmap wrapping up above the glamor_egl_screen_init() call, since glamor.c's DestroyPixmap needs to be the bottom of the stack (it calls fb directly and doesn't wrap). Caught by Michel. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-06-30glamor: add support for allocating linear buffers (v2)Dave Airlie1-1/+1
We need this for doing USB offload scenarios using glamor and modesetting driver. unfortunately only gbm in mesa 10.6 has support for the linear API. v1.1: fix bad define v2: update the configure.ac test as per amdgpu. (Michel) set linear bos to external to avoid cache. (Eric) Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-12-09glamor: Always destroy EGL image associated with destroyed pixmapKeith Packard1-1/+1
There were three paths that called eglDestroyImageKHR: * The front buffer * The intel driver's flip buffer * pixmaps under DRI3 This patch unifies the second two by having glamor_destroy_pixmap always destroy any associaged EGL image. This allows us to stop storing the back_pixmap pointer in glamor as that was only used to make sure that buffer was freed at server reset time. v2: check for valid pixmap_priv before using it in glamor_egl_destroy_pixmap_image Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-04-01glamor: Move glamor_egl_screen_init() prototype to glamor.hKristian Høgsberg1-1/+3
A DDX that implements the glamor EGL functions need to pull in this prototype but shouldn't need to pull in glamor_priv.h Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-02-14glamor: Put in a pluggable context switcher for GLX versus EGL.Eric Anholt1-11/+1
The GLX side just gets the context from the current state. That's also something I want to do for EGL, so that the making a context is separate from initializing glamor, but I think I need the modesetting driver in the server before I think about hacking on that more. The previous code was rather incestuous, along with pulling in xf86 dependencies to our dix code. The new code just initializes itself from the current state. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2014-01-27glamor: Hook the module back up to the build.Eric Anholt1-0/+64
For now we're just building an uninstalled library. The extra EGL stubs are required so that we can get the DIX building and usable without pulling in the xf86 DDX code in glamor_egl.c. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com>