-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 2013-11-25 12:31, schrieb Henri Verbeet:
static void texture2d_sub_resource_add_dirty_region(struct
wined3d_resource *sub_resource, const struct wined3d_box
*dirty_region) { -
surface_set_dirty(surface_from_resource(sub_resource)); + struct
wined3d_surface *surface = surface_from_resource(sub_resource); + +
surface_load_location(surface, SFLAG_INSYSMEM); +
surface_invalidate_location(surface, ~SFLAG_INSYSMEM); }
Why not something like
if (surface->flags & SFLAG_INSYSMEM)
surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
If the surface doesn't have SFLAG_INSYSMEM set already downloading
texture / framebuffer data to sysmem and re-uploading it won't do
anything.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iQIcBAEBAgAGBQJSk0bMAAoJEN0/YqbEcdMw1rkP/R4WwqON6LvqMeZo1p37QJnA
FmSC16ChtjbraQEJU9BkAbFZJCn1U8jiEybeUl3aayf3T5/OL+tk1eAbuUovuHtf
LnOgCL8gHxUitao9kwPgM5gO4gwzo4IfT/kHKZ9/gu1FxqvHZGk/5khgXU67mAJ0
pp3SOhWPTbWu23k/ld6CQvp47DcFbEWoSn3n+20npv2OYGvmcUgVumW8EZIHhN8g
EFou2wEKVoeEVyaPZzo85Cauv/nwyvwzJgZAgnRj5cokOu0AEpitf8jTqp2mXq6E
V0ozMW5X40l6GkmrsVbHYoEhD6l+cX3Mf30b3WttHUrSd2XHDFqUHs8yONK/KxsV
7VT4zsh8vhWSqQFLp3e7ygNiryojHTBy9gC0eC5ahK9bbjkPpvHIrbj9+sHh58rP
GXwAsLcxBLS0FofB2tk6zOYMILhRKWX6PhlldvsZVqvIN0mdAR/NTMoOyre7kxGf
pCt/o8yXQZY/ujq3ZoKUXSjzFcV2ilhJq1EoiixCXR+X23Ge3s5WDfnPPe8QWeIZ
Bl1wfVHtl9PQPL8Q5kb2g9xr572+J+HPLthT1kz73jHZ6VKSE3xN/c0vW3zzdfaJ
OZRWfzmPOcAk+RqQUD3Ko2T7j/voLUH9sU3MD4FtPLfKKsOne4OMstt4VIQ/Qe5k
tpOd6QkmBeS0Wq4mHywu
=MNOz
-----END PGP SIGNATURE-----