[Wayland-bugs] [Bug 75251] New: glTexSubImage2D call with bad parameters
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Thu Feb 20 02:11:42 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=75251
Priority: medium
Bug ID: 75251
Assignee: wayland-bugs at lists.freedesktop.org
Summary: glTexSubImage2D call with bad parameters
Severity: major
Classification: Unclassified
OS: All
Reporter: sheffmail at mail.ru
Hardware: All
Status: NEW
Version: 1.4.0
Component: weston
Product: Wayland
In gl-renderer.c:gl_renderer_attach_shm:
glBindTexture(GL_TEXTURE_2D, gs->textures[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT,
gs->pitch, buffer->height, 0,
GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
i.e. texture with GL_BGRA internal format is created for surface.
Later in gl-renderer.c:gl_renderer_flush_damage:
switch (wl_shm_buffer_get_format(buffer->shm_buffer)) {
...
case WL_SHM_FORMAT_RGB565:
format = GL_RGB;
pixel_type = GL_UNSIGNED_SHORT_5_6_5;
break;
...
}
glTexSubImage2D(GL_TEXTURE_2D, 0, r.x1, r.y1,
r.x2 - r.x1, r.y2 - r.y1,
format, pixel_type, data);
i.e. glTexSubImage2D is called with format = GL_RGB and type =
GL_UNSIGNED_SHORT_5_6_5, while texture's internal format is GL_BGRA.
Such combination is incorrect and it works only because of OpenGL driver
implementor's good will
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20140220/f397038c/attachment.html>
More information about the Wayland-bugs
mailing list