wl-shm: add support for more formats
This commit is contained in:
parent
09a56edd47
commit
0570669af2
20 changed files with 114 additions and 81 deletions
|
|
@ -201,13 +201,17 @@ impl EglDisplay {
|
|||
}
|
||||
read_modifiers.insert(modifier.modifier);
|
||||
}
|
||||
if !read_modifiers.is_empty() || !write_modifiers.is_empty() {
|
||||
if !read_modifiers.is_empty()
|
||||
|| !write_modifiers.is_empty()
|
||||
|| format.format.shm_info.is_some()
|
||||
{
|
||||
formats.insert(
|
||||
drm,
|
||||
GfxFormat {
|
||||
format: format.format,
|
||||
read_modifiers,
|
||||
write_modifiers,
|
||||
supports_shm: format.format.shm_info.is_some(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ impl GlTexture {
|
|||
(gles.glBindTexture)(GL_TEXTURE_2D, tex);
|
||||
(gles.glTexParameteri)(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
(gles.glTexParameteri)(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
(gles.glPixelStorei)(GL_UNPACK_ROW_LENGTH_EXT, stride / shm_info.bpp as GLint);
|
||||
(gles.glPixelStorei)(GL_UNPACK_ROW_LENGTH_EXT, stride / format.bpp as GLint);
|
||||
(gles.glTexImage2D)(
|
||||
GL_TEXTURE_2D,
|
||||
0,
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ impl AsyncShmGfxTexture for Texture {
|
|||
(gles.glTexParameteri)(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
(gles.glPixelStorei)(
|
||||
GL_UNPACK_ROW_LENGTH_EXT,
|
||||
self.gl.stride / shm_info.bpp as GLint,
|
||||
self.gl.stride / self.format.bpp as GLint,
|
||||
);
|
||||
(gles.glTexImage2D)(
|
||||
GL_TEXTURE_2D,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue