https://bugs.winehq.org/show_bug.cgi?id=52684
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- (In reply to Henri Verbeet from comment #8)
(In reply to Zebediah Figura from comment #7)
(3) When loading a texture into TEXTURE_RGB whose valid locations are SYSMEM and CLEARED, we end up clearing the texture again, which can be avoided (if both of those locations really were valid, then SYSMEM is already cleared). This may not be worth optimizing, though, since it'd take some really weird usage to get here after fixing (1). [You'd have to do something like create a staging texture, map it read-only without initializing it, and then copy from it.]
Uploading from SYSMEM to TEXTURE_RGB in this case may not be quite optimal either. It would be better than first clearing SYSMEM and then uploading from there, but ideally we'd just clear on the GPU here. The GPU clear would almost certainly be a "fast clear", which would be practically free.
Yeah, that's definitely the more salient optimization.