1
0
Fork 0
forked from wry/wry

autocommit 2022-04-21 18:40:32 CEST

This commit is contained in:
Julian Orth 2022-04-21 18:40:32 +02:00
parent 32fe8b64ca
commit 436f383cd6
3 changed files with 13 additions and 10 deletions

View file

@ -9,9 +9,7 @@ use {
buffd::{MsgParser, MsgParserError}, buffd::{MsgParser, MsgParserError},
errorfmt::ErrorFmt, errorfmt::ErrorFmt,
}, },
video::{ video::dmabuf::{DmaBuf, DmaBufPlane},
dmabuf::{DmaBuf, DmaBufPlane},
},
wire::{zwp_linux_buffer_params_v1::*, WlBufferId, ZwpLinuxBufferParamsV1Id}, wire::{zwp_linux_buffer_params_v1::*, WlBufferId, ZwpLinuxBufferParamsV1Id},
}, },
ahash::AHashMap, ahash::AHashMap,

View file

@ -28,7 +28,7 @@ use {
}, },
video::{dmabuf::DmaBuf, drm::Drm, gbm::GbmDevice, INVALID_MODIFIER, LINEAR_MODIFIER}, video::{dmabuf::DmaBuf, drm::Drm, gbm::GbmDevice, INVALID_MODIFIER, LINEAR_MODIFIER},
}, },
ahash::{AHashMap}, ahash::AHashMap,
std::{ptr, rc::Rc}, std::{ptr, rc::Rc},
}; };
@ -230,10 +230,13 @@ unsafe fn query_formats(dpy: EGLDisplay) -> Result<AHashMap<u32, EglFormat>, Ren
let formats = formats(); let formats = formats();
for fmt in vec { for fmt in vec {
if let Some(format) = formats.get(&(fmt as u32)) { if let Some(format) = formats.get(&(fmt as u32)) {
res.insert(format.drm, EglFormat { res.insert(
format: *format, format.drm,
modifiers: query_modifiers(dpy, fmt)?, EglFormat {
}); format: *format,
modifiers: query_modifiers(dpy, fmt)?,
},
);
} }
} }
Ok(res) Ok(res)

View file

@ -2,7 +2,10 @@ use {
crate::{ crate::{
format::{Format, XRGB8888}, format::{Format, XRGB8888},
render::{ render::{
egl::{context::EglContext, display::EglDisplay}, egl::{
context::EglContext,
display::{EglDisplay, EglFormat},
},
gl::{ gl::{
program::GlProgram, render_buffer::GlRenderBuffer, sys::GLint, texture::GlTexture, program::GlProgram, render_buffer::GlRenderBuffer, sys::GLint, texture::GlTexture,
}, },
@ -24,7 +27,6 @@ use {
}, },
uapi::ustr, uapi::ustr,
}; };
use crate::render::egl::display::EglFormat;
pub(super) struct TexProg { pub(super) struct TexProg {
pub(super) prog: GlProgram, pub(super) prog: GlProgram,