KalebDark / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

TextureD3D::subImage doesn't mark as clean a dirty image if it uses setData #873

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

Assuming that the image associated with a texture is dirty (for instance 
glTexStorage2D with the format GL_RGB8 will create a dirty image), 
TextureD3D::subImage will not mark the image as clean if it uses 
TextureStorage::setData to upload data directly to the storage.

Adding a call to image->markClean(); after uploading the data fixes the problem 
in my case. However this code looks wrong if someone try to update a subregion 
of the image instead of the entire image. Perhaps updateStorage should be 
called at the beginning of setSubImage to ensure that all images have been 
committed to the storage.

Original issue reported on code.google.com by Gregory....@imgtec.com on 19 Jan 2015 at 4:24