[Mesa-dev] [Bug 67516] New: glTexStorage*() functions don't work properly with proxy textures
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Jul 29 21:13:35 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=67516
Priority: medium
Bug ID: 67516
Assignee: mesa-dev at lists.freedesktop.org
Summary: glTexStorage*() functions don't work properly with
proxy textures
Severity: normal
Classification: Unclassified
OS: All
Reporter: mikjuo at gmail.com
Hardware: x86-64 (AMD64)
Status: NEW
Version: git
Component: Mesa core
Product: Mesa
Created attachment 83259
--> https://bugs.freedesktop.org/attachment.cgi?id=83259&action=edit
texstorage_fail.c, shows the problems as they appear to user code
There appears to be problems with proxy textures and the texture storage
functions. I identified three separate issues:
- The calculation (_mesa_get_tex_max_num_levels() in teximage.c) that checks
how many mipmap levels a texture could have has not been written to check proxy
textures as well.
- The error checking in the storage functions checks if a non-zero texture has
been bound. Proxy textures don't care about that but the check makes
glTexStorage*() fail when they should not. As far as I know, you cannot bind a
proxy texture to anything so this makes glTexStorage*() always fail for a proxy
texture.
- The use of glTexStorage*() on a proxy texture makes the texture immutable.
This is not normally detectable by the users (because it is a proxy texture)
but the immutability flag makes further glTexStorage*() calls fail. This last
issue cannot be seen until the two previous issues are fixed.
I would not be surprised if there were more issues with proxy textures lurking
here, given that it looks like these functions were not tested with proxy
textures.
I'm attaching three patches that I used to make things work for me. I also
attached a short testing program that shows how user code would see these
problems.
--
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/mesa-dev/attachments/20130730/ab27c291/attachment.html>
More information about the mesa-dev
mailing list