Closed elishacloud closed 6 years ago
I don't think the additional check to see if RType
is a texture is necessary. A YUV vertex/index buffer doesn't make sense, so might as well always return the error for those formats, regardless of all other arguments. Or is it known to work with offscreen surfaces (that would surprise me)?
Yes, good point. Somehow I missed that! Updated in e4a0e32.
This pull request fixes issue #42.
Overview
This change will return
D3DERR_NOTAVAILABLE
when an application queries usingCheckDeviceFormat
on any texture using a YUV format. ATI and Nvidia already return this value for textures, so it should have no affect on these GPUs. However, some Intel chips do not. It appears that these Intel chips attempt to handle the formats but do not handle them correctly.I believe with Direct3D9 that YUV is supposed to be unsupported on textures. See comment on WineD3D:
Notes
I did think about implementing full support for these formats into d3d8to9, but since most video cards don't support them I did not see the need to do that.
I also thought about blocking the creation of textures that use these formats. I did some tests on Nvidia and it blocks the creation of a texture that use these formats. However this issue was fixed by simply telling the application they are unsupported so I did not add any block on the creation of textures with these formats.
We can always add more fixes here later if there is an issue with other games.
Testing
I tested with the following games: