mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
Revert "egl: handle EGL_IMAGE_EXTERNAL_FLUSH_EXT"
This reverts commit 34b1aa957a.
This series caused unexpected flickering artifacts with Iris driver on
Chrome OS and EGL_EXT_image_flush_external spec has not been published
yet.
Acked-by: Eric Engestrom <eric@engestrom.ch>
Acked-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
parent
e64b91e34a
commit
ff05f16c99
3 changed files with 11 additions and 70 deletions
|
|
@ -2297,27 +2297,14 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_dpy->image->base.version >= 18) {
|
dri_image =
|
||||||
unsigned use = 0;
|
dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
|
||||||
|
attrs.Width,
|
||||||
if (attrs.ImageFlushExternal)
|
attrs.Height,
|
||||||
use |= __DRI_IMAGE_USE_FLUSH_EXTERNAL;
|
format,
|
||||||
|
name,
|
||||||
dri_image =
|
pitch,
|
||||||
dri2_dpy->image->createImageFromName2(dri2_dpy->dri_screen,
|
NULL);
|
||||||
attrs.Width, attrs.Height,
|
|
||||||
format, name, pitch, use,
|
|
||||||
NULL);
|
|
||||||
} else {
|
|
||||||
dri_image =
|
|
||||||
dri2_dpy->image->createImageFromName(dri2_dpy->dri_screen,
|
|
||||||
attrs.Width,
|
|
||||||
attrs.Height,
|
|
||||||
format,
|
|
||||||
name,
|
|
||||||
pitch,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dri2_create_image_from_dri(disp, dri_image);
|
return dri2_create_image_from_dri(disp, dri_image);
|
||||||
}
|
}
|
||||||
|
|
@ -2659,26 +2646,7 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
||||||
has_modifier = true;
|
has_modifier = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dri2_dpy->image->base.version >= 18) {
|
if (has_modifier) {
|
||||||
unsigned use = 0;
|
|
||||||
|
|
||||||
if (attrs.ImageFlushExternal)
|
|
||||||
use |= __DRI_IMAGE_USE_FLUSH_EXTERNAL;
|
|
||||||
|
|
||||||
if (!has_modifier)
|
|
||||||
modifier = DRM_FORMAT_MOD_INVALID;
|
|
||||||
|
|
||||||
dri_image =
|
|
||||||
dri2_dpy->image->createImageFromDmaBufs3(dri2_dpy->dri_screen,
|
|
||||||
attrs.Width, attrs.Height, attrs.DMABufFourCC.Value,
|
|
||||||
modifier, use, fds, num_fds, pitches, offsets,
|
|
||||||
attrs.DMABufYuvColorSpaceHint.Value,
|
|
||||||
attrs.DMABufSampleRangeHint.Value,
|
|
||||||
attrs.DMABufChromaHorizontalSiting.Value,
|
|
||||||
attrs.DMABufChromaVerticalSiting.Value,
|
|
||||||
&error,
|
|
||||||
NULL);
|
|
||||||
} else if (has_modifier) {
|
|
||||||
if (dri2_dpy->image->base.version < 15 ||
|
if (dri2_dpy->image->base.version < 15 ||
|
||||||
dri2_dpy->image->createImageFromDmaBufs2 == NULL) {
|
dri2_dpy->image->createImageFromDmaBufs2 == NULL) {
|
||||||
_eglError(EGL_BAD_MATCH, "unsupported dma_buf format modifier");
|
_eglError(EGL_BAD_MATCH, "unsupported dma_buf format modifier");
|
||||||
|
|
@ -2694,7 +2662,8 @@ dri2_create_image_dma_buf(_EGLDisplay *disp, _EGLContext *ctx,
|
||||||
attrs.DMABufChromaVerticalSiting.Value,
|
attrs.DMABufChromaVerticalSiting.Value,
|
||||||
&error,
|
&error,
|
||||||
NULL);
|
NULL);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
dri_image =
|
dri_image =
|
||||||
dri2_dpy->image->createImageFromDmaBufs(dri2_dpy->dri_screen,
|
dri2_dpy->image->createImageFromDmaBufs(dri2_dpy->dri_screen,
|
||||||
attrs.Width, attrs.Height, attrs.DMABufFourCC.Value,
|
attrs.Width, attrs.Height, attrs.DMABufFourCC.Value,
|
||||||
|
|
@ -2765,8 +2734,6 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
|
||||||
dri_use |= __DRI_IMAGE_USE_SCANOUT;
|
dri_use |= __DRI_IMAGE_USE_SCANOUT;
|
||||||
if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_CURSOR_MESA)
|
if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_CURSOR_MESA)
|
||||||
dri_use |= __DRI_IMAGE_USE_CURSOR;
|
dri_use |= __DRI_IMAGE_USE_CURSOR;
|
||||||
if (attrs.ImageFlushExternal)
|
|
||||||
dri_use |= __DRI_IMAGE_USE_FLUSH_EXTERNAL;
|
|
||||||
|
|
||||||
dri2_img = malloc(sizeof *dri2_img);
|
dri2_img = malloc(sizeof *dri2_img);
|
||||||
if (!dri2_img) {
|
if (!dri2_img) {
|
||||||
|
|
|
||||||
|
|
@ -265,25 +265,6 @@ _eglParseEXTImageDmaBufImportModifiersAttribs(_EGLImageAttribs *attrs,
|
||||||
return EGL_SUCCESS;
|
return EGL_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static EGLint
|
|
||||||
_eglParseEXTImageFlushExternalAttribs(_EGLImageAttribs *attrs,
|
|
||||||
_EGLDisplay *disp,
|
|
||||||
EGLint attr, EGLint val)
|
|
||||||
{
|
|
||||||
if (!disp->Extensions.EXT_image_flush_external)
|
|
||||||
return EGL_BAD_PARAMETER;
|
|
||||||
|
|
||||||
switch (attr) {
|
|
||||||
case EGL_IMAGE_EXTERNAL_FLUSH_EXT:
|
|
||||||
attrs->ImageFlushExternal = val;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return EGL_BAD_PARAMETER;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EGL_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the list of image attributes.
|
* Parse the list of image attributes.
|
||||||
*
|
*
|
||||||
|
|
@ -305,10 +286,6 @@ _eglParseImageAttribList(_EGLImageAttribs *attrs, _EGLDisplay *disp,
|
||||||
EGLint attr = attrib_list[i++];
|
EGLint attr = attrib_list[i++];
|
||||||
EGLint val = attrib_list[i];
|
EGLint val = attrib_list[i];
|
||||||
|
|
||||||
err = _eglParseEXTImageFlushExternalAttribs(attrs, disp, attr, val);
|
|
||||||
if (err == EGL_SUCCESS)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
err = _eglParseKHRImageAttribs(attrs, disp, attr, val);
|
err = _eglParseKHRImageAttribs(attrs, disp, attr, val);
|
||||||
if (err == EGL_SUCCESS)
|
if (err == EGL_SUCCESS)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,6 @@ struct _egl_image_attrib_int
|
||||||
|
|
||||||
struct _egl_image_attribs
|
struct _egl_image_attribs
|
||||||
{
|
{
|
||||||
/* EGL_EXT_image_flush_external */
|
|
||||||
EGLBoolean ImageFlushExternal;
|
|
||||||
|
|
||||||
/* EGL_KHR_image_base */
|
/* EGL_KHR_image_base */
|
||||||
EGLBoolean ImagePreserved;
|
EGLBoolean ImagePreserved;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue