Summary: | glTexSubImage2D call with bad parameters | ||
---|---|---|---|
Product: | Wayland | Reporter: | Stanislav Vorobiov <sheffmail> |
Component: | weston | Assignee: | Wayland bug list <wayland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | medium | ||
Version: | 1.4.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Stanislav Vorobiov
2014-02-20 10:11:42 UTC
Thanks for the bug report. I've posted a patch to the mailing list which could fix this: http://lists.freedesktop.org/archives/wayland-devel/2014-April/014066.html Committed on master: commit 39a443ff9b42ac3a2f7ec3f58230051f2031af24 Author: Neil Roberts <neil@linux.intel.com> Date: Fri Apr 4 16:24:54 2014 +0100 Always use glTexImage2D instead of glTexSubImage2D for first upload Previously when uploading SHM data we would initialise the texture with glTexImage2D and NULL data when the buffer is attached. Then if the GL_EXT_unpack_subimage extension is available we would always use glTexSubImage2D to upload the data. The problem with that is that the first glTexImage2D was always setting the internal format to GL_BGRA_EXT and then if a 16-bit texture is used we would later call glTexSubImage2D with a data format of GL_RGBA. Under GLES2 the internal format must always match the data format so this is technically invalid. This patch makes it so that it always calls glTexImage2D when flushing the damage for the first time. That way it will use the right internal format and we don't need to call glTexImage2D with NULL data. https://bugs.freedesktop.org/show_bug.cgi?id=75251 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.