Commit 27e65fb9 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Disallow stencil size mismatches in wined3d_check_pixel_format_depth()…

wined3d: Disallow stencil size mismatches in wined3d_check_pixel_format_depth() if the format has stencil bits. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 99033b14
......@@ -4309,9 +4309,10 @@ static BOOL wined3d_check_pixel_format_depth(const struct wined3d_gl_info *gl_in
return FALSE;
/* Some cards like Intel i915 ones only offer D24S8 but lots of games also
* need a format without stencil, so allow more stencil bits than
* requested. */
if (cfg->stencilSize < format->stencil_size)
* need a format without stencil. We can allow a mismatch if the format
* doesn't have any stencil bits. If it does have stencil bits the size
* must match, or stencil wrapping would break. */
if (format->stencil_size && cfg->stencilSize != format->stencil_size)
return FALSE;
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment