[PATCH 1/2] wined3d: make wined3d_device_copy_sub_resource_region return an error code

Henri Verbeet hverbeet at gmail.com
Wed Oct 28 11:08:53 CDT 2015


On 28 October 2015 at 16:11, Stefan Dösinger <stefandoesinger at 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.



More information about the wine-devel mailing list