Hey Stefan,
I'm going to let every ddraw_surface have its own wined3d_texture (in the refcount patch), but I cannot leave that check ( || !surface->wined3d_texture) in place when doing the change since it will always be false (and thus, useless). It seems to me there's no good way to do this.
Ciao, Riccardo
2015-11-05 13:35 GMT+01:00 Stefan Dösinger stefandoesinger@gmail.com:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2015-11-04 um 19:51 schrieb Riccardo Bortolato:
- else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || !surface->wined3d_texture)
- else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || (surface->surface_desc.ddsCaps.dwCaps2 & DDSCAPS2_MIPMAPSUBLEVEL)) { WARN("Called on non-managed texture or mipmap sublevel, returning DDERR_INVALIDPARAMS.\n"); hr = DDERR_INVALIDPARAMS;
This will cause a crash if called on a top level cube map that's not the positive X face because the follow-up code assumes that surface->wined3d_texture is there.
This could use a test as well, similarly to SetColorKey. It's possible that crashing is the right thing to do.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2
iQIcBAEBCAAGBQJWO0z2AAoJEN0/YqbEcdMwrhgP/03F5zCAxKbJ738MrKYu2iUk 0azMw0sVdO2trn9KzuAbGKr74HBJCmhnGCBwWvTnn767UmUU73kbuY/VHQ6ZsiMt 9qNwDYQew/VIzXeDPPDOgtwkj+tpFrYeBGZVpPAPqcY2QoCGvS1VXTfUnKHQWnYF BxI1Qwh0xOi30saYG2UVzCI2G1DWH8/FVB4K9k/4FXTBK5AEDO0BeWloZ3bStvWU d188Huk6R+9GFaAJyJ7oV2V1SV3WSRQVvY10YW16fFSWcTARMb6xMbyoAS0WQp7q 6w5cD1sr+rnwmgGmSKhMOrp6dfWzwma7tk66BXcd7zjT8JoI7+7Qniz2LFuG6zgW uIQIpfhdDE9eGShkZriguU8o0ZVojjg3K1ubf9gsmMxvs6yneUYCRS6MjjYAXccS HJALmJIn6YAcS6MBa0lXkHNxBBYHnmWNZjNhsyLuPj+TSh8xM//cayiT6ySURGSb 4/uK8cgkqm8QUBbLZTCN8Lv/S3Kx/o37GyujteJHs+2CLLoAe837dqcu6krPtWpA tPM3a++y5D3c5MpFG0qP2ZXRQkhlZtZJHj1gR2/hRWtRItaLd+n5iDCte+tw5f6T 5ld921LkMPR43ratmvHH6GlsKwPh3pqU7dH8s8viJAR2h4EcxQhxACcAHjpv5ByO Ia/F1xe5TUG0UY9CEBgA =SI7R -----END PGP SIGNATURE-----