egl: Use the Mesa surfaceless platform instead of GBM
Mesa surfaceless platform appears to be a better fit for the use-case at hand: 1. Like GBM it is Mesa specific, so no change in supported setups is expected. If ever required, a fallback to the generic device platform could be added on top. 2. It leaves the complexity of selecting a renderer device to the driver, reducing code and dependencies. 3. It allows to use llvmpipe / software drivers without dri device, which can be useful on CI or debugging (with LIBGL_ALWAYS_SOFTWARE=1). Signed-off-by: Robert Mader <robert.mader@collabora.com> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Tested-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> # sm8250/rb5, x1e/Dell Insprion14p Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Tested-by: Milan Zamazal <mzamazal@redhat.com> # TI AM69 Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> # ThinkPad X1 Yoga Gen 7 + ov2740 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
4a5ebcf675
commit
0c2ed9ebf9
@@ -141,8 +141,8 @@ int DebayerEGL::initBayerShaders(PixelFormat inputFormat, PixelFormat outputForm
|
||||
egl_.pushEnv(shaderEnv, "#extension GL_OES_EGL_image_external: enable");
|
||||
|
||||
/*
|
||||
* Tell shaders how to re-order output taking account of how the
|
||||
* pixels are actually stored by GBM
|
||||
* Tell shaders how to re-order output taking account of how the pixels
|
||||
* are actually stored by EGL.
|
||||
*/
|
||||
switch (outputFormat) {
|
||||
case formats::ARGB8888:
|
||||
@@ -586,10 +586,7 @@ int DebayerEGL::start()
|
||||
{
|
||||
GLint maxTextureImageUnits;
|
||||
|
||||
if (gbmSurface_.createDevice())
|
||||
return -ENODEV;
|
||||
|
||||
if (egl_.initEGLContext(&gbmSurface_))
|
||||
if (egl_.initEGLContext())
|
||||
return -ENODEV;
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &maxTextureImageUnits);
|
||||
|
||||
@@ -113,7 +113,6 @@ private:
|
||||
Rectangle window_;
|
||||
std::unique_ptr<SwStatsCpu> stats_;
|
||||
eGL egl_;
|
||||
GBM gbmSurface_;
|
||||
uint32_t width_;
|
||||
uint32_t height_;
|
||||
GLint glFormat_;
|
||||
|
||||
Reference in New Issue
Block a user