[PATCH 4/5] wined3d: Set GL_UNPACK_ALIGNMENT to 1 when uploading surfaces from user memory.

Stefan Dösinger stefandoesinger at gmail.com
Wed Feb 18 07:42:12 CST 2015


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

Am 2015-02-18 um 14:23 schrieb Matteo Bruni:
> It looks like that's correct WRT the client APIs but not for
> formats used internally by wined3d. I tried to set
> GL_UNPACK_ALIGNMENT to 1 in context_create and that fails
> volume_v16u16_test in d3d9:visual on Mesa. It fails because we're
> using GL_RGB16 to emulate D3DFMT_V16U16 when NV_texture_shader
> isn't supported (and the texture is 1x2x2 which luckily triggers
> the bug).
I'm aware of some problems with those conversions, and I am working on
a test and some fixes right now.

> I think conversions are the only cases where we can currently get 
> pitches non multiple of the pixel byte width and we can fix those
> by either using a different pitch (we're free to choose it anyway)
> or avoiding those 3-channels formats altogether. The attached patch
> takes the former approach.
The reason why I chose to use the same pitch alignment was because we
set GL_UNPACK_ALIGNMENT globally. So once that setting is gone I don't
think anything is stopping us from choosing a different pitch.

The V8U8 and V16VU16 converts should be switched to RGBA types (but
RGB internals) regardless of that. The drivers don't like non-padded
formats either.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJU5Ja0AAoJEN0/YqbEcdMwr5wQAILo3M6FH39zKmW5RTASlQbG
cx/KHC+P/dnIUtQCoGYQmMzDvHY4XYfY5CsEIF9Rc/1hELQxz4FqMRKk56j6K0AZ
7Vq4zdQFWMbdq+3rbj3YHZrMoWCTBbwc+4Pz08YcaGXRlldJVt5tHS5lisTyUN6Q
NZnxQZkXcXX9SZaVgUeynez4XfvMwwHn8wBzd15qtMSyBMechUkAkTcVs9mJB41C
B2BMuCuHuMm4MkdfnKIcG5IeyHRcpbrpFRH8Hh/vFFLJSqKYEP6XD2jhAuM3Nyqz
ek+uTndNhrrv7ffPMe5YNQvlAjdODhNwZVNIR7EHaIf/3R2fRLG0P4I/zN15Kt0s
rFQPlYvcL0/8oCKY3H0NReLh+uTrXmH8E+lallUKmba71OGJPxDLCDIfD0Tgfhlt
3SezJ9i0kBQeb1QAFnChpAzrtNMO1fNrYRQ1My1bJy/Z/WtdE/aF2dsSXU8lz04Y
TQyVPuUEf9ZscAtmHjNll3Bnzd9IOs3sdor4xEqQtAgQ9NzhlmDzREgk0AnBD9CQ
E3uf8bF5akVrE8STwHZlcWofRDO3ruq8pyOkJh+BBEUdrxaGoTSMlu6Kl/Ry63Ba
Gy94/WegrSWx+IJfN1p3igfWFwOhhAP2GRjb8sKS7NKbv3cJJd1T8VMy6e40iMSO
nZdH6xu1tmzphMnK1opl
=EFgz
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list