From 877e252681b4d75abc2392704479ab78f332670d Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 9 Apr 2009 09:58:27 +0200 Subject: [PATCH] wined3d: Only update the swizzle and use map for streams that are actually used in device_stream_info_from_strided(). This fixes a regression introduced by d7c7c768507a923902e9178f98343e22e4e22652 and exposed by ef2d70418383f03c6bf701caeb67129acc6d2453. Unfortunately having EXT_vertex_array_bgra support masks the problem, which is why the regression tests didn't catch it. --- dlls/wined3d/device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f44d75d0f63..d0fcf59c416 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -352,6 +352,8 @@ void device_stream_info_from_strided(IWineD3DDeviceImpl *This, for (i = 0; i < sizeof(stream_info->elements) / sizeof(*stream_info->elements); ++i) { + if (!stream_info->elements[i].format_desc) continue; + if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && stream_info->elements[i].format_desc->format == WINED3DFMT_A8R8G8B8) { stream_info->swizzle_map |= 1 << i; -- 2.11.4.GIT