Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: