[PATCH 8/8] modesetting: Use GBM for buffer allocations if Glamor supports it.

Dave Airlie airlied at gmail.com
Tue Dec 9 17:54:09 PST 2014


On 10 December 2014 at 10:55, Kenneth Graunke <kenneth at whitecape.org> wrote:
> For performance, Glamor wants to render to tiled buffers, not linear
> ones.  Using GBM allows us to pick the 3D driver's preferred tiling
> modes.

I think this would be a lot cleaner as

+#ifdef GLAMOR_HAS_GBM
+    struct gbm_device *gbm;
+#else
+    void *gbm;
+#endif

in the header, then dropping the other various GLAMOR_HAS_GBM wrappers around
if (ms->drmmode.gbm)

that or

#ifdef GLAMOR_HAS_GBM
    if (ms->drmmode.gbm)
#endif
   {

the if (1) looks fugly.

Dave.


More information about the xorg-devel mailing list