-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Am 2015-10-28 um 15:31 schrieb Riccardo Bortolato:
- if (src_resource->type != dst_resource->type)
- {
WARN("Resource types (%s / %s) don't match.\n",
debug_d3dresourcetype(dst_resource->type),
debug_d3dresourcetype(src_resource->type));
return;
}return WINED3DERR_INVALIDCALL;
This seems like something that should be its own patch. Did you check if a 2D texture -> cube texture copy works, both on Windows (are we required to support it) and in the current implementation?
- if (dst_resource->type != WINED3D_RTYPE_TEXTURE)
- if (dst_resource->type == WINED3D_RTYPE_VOLUME_TEXTURE
{|| src_resource->type == WINED3D_RTYPE_VOLUME_TEXTURE)
I guess your intention is to avoid having a type == TEXTURE || type == CUBE_TEXTURE kind of construct, but technically you'd also have to check for WINED3D_RTYPE_BUFFER. I'd prefer whitelisting known good resource types.
On 28 October 2015 at 16:11, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 2015-10-28 um 15:31 schrieb Riccardo Bortolato:
- if (dst_resource->type != WINED3D_RTYPE_TEXTURE)
- if (dst_resource->type == WINED3D_RTYPE_VOLUME_TEXTURE
{|| src_resource->type == WINED3D_RTYPE_VOLUME_TEXTURE)
I guess your intention is to avoid having a type == TEXTURE || type == CUBE_TEXTURE kind of construct, but technically you'd also have to check for WINED3D_RTYPE_BUFFER. I'd prefer whitelisting known good resource types.
The issue mostly exists because d3d10 doesn't have cube textures as such, but just generic 2D array textures. Ideally wined3d would be fixed to match that first, but I suppose you could also just map WINED3D_RTYPE_CUBE_TEXTURE to WINED3D_RTYPE_TEXTURE here.