[PATCH 5/5] wined3d: Enforce volume texture block restrictions

Stefan Dösinger stefan at codeweavers.com
Fri Aug 30 10:35:32 CDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 2013-08-30 17:31, schrieb Henri Verbeet:
> On 30 August 2013 00:19, Stefan Dösinger <stefan at codeweavers.com>
> wrote:
>> +    if (format->flags & WINED3DFMT_FLAG_BLOCKS) +    { +
>> UINT width_mask = format->block_width - 1; +        UINT
>> height_mask = format->block_height - 1; +        if (desc->width
>> & width_mask || desc->height & height_mask) +        { +
>> WARN("(%p) : Texture cannot be created - width or height not
>> block size aligned.\n", texture); +            return
>> WINED3DERR_INVALIDCALL; +        } +    } +
> Is this different from surfaces? IIRC surfaces are padded up to
> the next multiple of the block size, although I may have that
> wrong. Not a fan of the "(%p) : " trace formatting.
Padding happens with mipmaps and stand-alone surfaces. Level 0 of a 2D
and cube texture has to consist of at least one full block. (If my
memory serves me right.)

There are no stand-alone volumes. This patch only restricts the
creation of full textures, not mipmap sublevels. Mapping of blocked
volumes (part-block mipmaps and full ones) is part of a different
patch and set of tests.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSILvEAAoJEN0/YqbEcdMwV5YQAJF74cyIS4XTQArXg4Zb8QeV
PXva1oNZdUnuDcJFtSY8O5FORyY7Z/xcxA8Paf1GlNXios8griZNdab/RVcsaFDY
pV5xng1xm4dPI8yTGPZJlW9sXs9L91idDGR/NTRYbGOvoa1xXZkToGDUPKOOCfU+
jdUMGJXu7FAz83R4RJ73d/b/LMgguyrw+okYpXcOwjxKbLLt9x6phyw3SfLPPcKz
qKEBxM3H6v3U1FwUOzoh4OpM3fiZdEtFGxZvl1Q75fqmvnx6kXIxChM7TWKIgniK
3g9xGjPDciKdXZCnBww0M9RN45HvVQOSELAj59UBuRgJOZaLg2eReRPeVx09aW/t
Ff34nInTDjL/YML9bgbvJNxC0f1W8OCRiReITujMBkeaoOQ4bRSAbDHHABrEAQJP
eNTYKSgysIAdgaNmguAiJcQ4X+JvkkcaOXsXmEwQj+p9HTC9xLt1NC3L7bCLt+eL
vpS81ve/U+sZgezneihwzQOtmW96I7eC5POAmAk1XodsO+EdkYRdyhOFKg7gXDCq
D7Ge9OkOh9kyHm8qIgzdsO01RPH0el3SFNFTteynBSLTO5TdsEDlyUbsQPX4mk7C
HWQkozpcT8THqes93e4077FpE4cGjCGU/kHbY6Z1jfxDJnl8RpHLrV8gfqxzjedp
4xjEhXWpkiLEvOUXnUuO
=O9F7
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list