-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-04-18 13:08, schrieb Henri Verbeet:
On 17 April 2014 15:47, Stefan Dösinger stefan@codeweavers.com wrote:
dlls/d3d9/texture.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-)
I suppose this works, but I don't think it's really necessary. At some point wined3d_texture_get_sub_resource() will go away of course, but I don't think there's a reason we can't e.g. have a wined3d_resource_get_sub_resource_desc(), or alternatively just store the information on d3d9 volume creation.
Both of those alternatives work, but I'd prefer not to expose sub resources more than necessary. Map and get_dc need access to sub resources, but the rest of the information can be retrieved from the container.
I'm not convinced that storing the size at creation is better either. Consider that surfaces can have their size changed by reset calls.
That's not a strong opinion though, if you have a reason to prefer one of your suggestions I'm happy to change my plans.