[PATCH 4/5] wined3d: Set GL_UNPACK_ALIGNMENT to 1 when uploading surfaces from user memory.
stefandoesinger at gmail.com
Wed Feb 18 07:42:12 CST 2015
-----BEGIN PGP SIGNED MESSAGE-----
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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the wine-devel