[PATCH 3/5] wined3d: Make the condition to enter p8 conversion shader path more strict.

Henri Verbeet hverbeet at gmail.com
Mon Sep 1 14:24:51 CDT 2008

2008/8/31 Alexander Dorofeyev <alexd4 at inbox.lv>:
> This prevents shader path from being entered for an offscreen surface when
> there is p8 render target and fixes failures in ddraw visual test (with
> opengl rendering and RTL_READDRAW mode) and visual glitches in Red Alert.
> ---
>  dlls/wined3d/surface.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
This is probably ok for this specific case, but in general I think
primary_render_target_is_p8() is somewhat broken. It seems that in
most places where it's used it is assumed that "This" is the primary
render target. In some cases that's actually always true, but in those
cases primary_render_target_is_p8() wouldn't need to check if there's
a primary render target, it could just use a surface passed in as
parameter. In the other cases, you don't actually know the surface is
the primary render target, and you'd need to verify that first, after
which you've essentially got the first case again.

More information about the wine-devel mailing list