mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ui/egl: use DRM_FORMAT_MOD_INVALID as default modifier
0 is used as DRM_FORMAT_MOD_LINEAR already. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Message-ID: <20250327025848.46962-4-yuq825@gmail.com>
This commit is contained in:
parent
806c861dc6
commit
ac70568902
3 changed files with 7 additions and 3 deletions
|
@ -23,6 +23,7 @@
|
|||
#include "system/system.h"
|
||||
#include "qapi/error.h"
|
||||
#include "trace.h"
|
||||
#include "standard-headers/drm/drm_fourcc.h"
|
||||
|
||||
EGLDisplay *qemu_egl_display;
|
||||
EGLConfig qemu_egl_config;
|
||||
|
@ -333,7 +334,7 @@ void egl_dmabuf_import_texture(QemuDmaBuf *dmabuf)
|
|||
attrs[i++] = qemu_dmabuf_get_strides(dmabuf, NULL)[0];
|
||||
attrs[i++] = EGL_DMA_BUF_PLANE0_OFFSET_EXT;
|
||||
attrs[i++] = 0;
|
||||
if (modifier) {
|
||||
if (modifier != DRM_FORMAT_MOD_INVALID) {
|
||||
attrs[i++] = EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT;
|
||||
attrs[i++] = (modifier >> 0) & 0xffffffff;
|
||||
attrs[i++] = EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue