From: Paul Gofman pgofman@codeweavers.com
--- dlls/ddraw/surface.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index a096c5d7d8e..6ec857ad047 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -6840,11 +6840,19 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_ { if (!(desc->ddsCaps.dwCaps2 & (DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE))) { - unsigned int bind_flags = WINED3D_BIND_SHADER_RESOURCE; + unsigned int bind_flags = 0; DWORD usage = 0;
- if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) + if (desc->ddsCaps.dwCaps2 & DDSCAPS2_CUBEMAP) + { usage |= WINED3DUSAGE_LEGACY_CUBEMAP; + bind_flags |= WINED3D_BIND_SHADER_RESOURCE; + } + else if (desc->ddsCaps.dwCaps & DDSCAPS_TEXTURE) + { + bind_flags |= WINED3D_BIND_SHADER_RESOURCE; + } + if (desc->ddsCaps.dwCaps & DDSCAPS_ZBUFFER) bind_flags |= WINED3D_BIND_DEPTH_STENCIL; else if (desc->ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=144290
Your paranoid android.
=== debian11b (64 bit WoW report) ===
quartz: vmr7.c:3753: Test succeeded inside todo block: Compression 0x3231564e, depth 12: Got hr 0. vmr7.c:3753: Test succeeded inside todo block: Compression 0x32315659, depth 12: Got hr 0. vmr7.c:3753: Test succeeded inside todo block: Compression 0x59565955, depth 16: Got hr 0. vmr7.c:3753: Test succeeded inside todo block: Compression 0x32595559, depth 16: Got hr 0.
This fixes a regression introduced by ee7d047dd55a4b2338eb2d64f85b7d984b39812f ("ddraw: Always create surfaces with WINED3D_BIND_SHADER_RESOURCE if possible.").
C&C Red Alert 2 sets ddraw display mode to 8 bit, creates a surface with _PRIMARY caps only and doesn't tolerate output caps to have _SYSTEMMEMORY.
The patch here is a partial revert of blamed commit.