Skip to content

Fail a CPU blit whose source format cannot be converted - #13

Open
f1nalspace wants to merge 1 commit into
JHRobotics:mainfrom
f1nalspace:pr/blit-conversion-failure
Open

f1nalspace wants to merge 1 commit into
JHRobotics:mainfrom
f1nalspace:pr/blit-conversion-failure

Conversation

@f1nalspace

Copy link
Copy Markdown

When surface_cpu_blt() needs a format conversion and surface_convert_format() has no
converter for it, it logs "Cannot convert source surface format to dest format." and jumps
to release: without setting hr, which is still WINED3D_OK from its initialization.
The caller reports success although nothing was copied.

This sets WINED3DERR_NOTAVAILABLE at that point, like the other unsupported cases in the
same function.

Found while tracking down black DXT1 textures in Descent 3 (see the DXT1 PR). On its own it
does not change what that game shows — Descent 3 ignores the return value of Blt() — but
an application that checks it now sees the failure.

Tested: built on main with the MinGW cross toolchain. Not run on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant