wined3d: Do not take "draw_rect" into account when comparing attachment sizes in ffp_blitter_clear().
The scissor rectangle and viewport shouldn't affect whether attachment sizes
are equal. The Intel i965 driver will do a fast clear when the scissor
rectangle overlaps the intersection of the attachments, and that behaviour is
allowed by the OpenGL spec. This commit fixes failures in the d3d8 and d3d9
depth_buffer_test() tests on the Intel i965 driver.
See also commit 0530f33cc1
.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6202cf4560
commit
7551f01bd0
|
@ -2052,12 +2052,11 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de
|
||||||
unsigned int rt_count, const struct wined3d_fb_state *fb, unsigned int rect_count, const RECT *clear_rects,
|
unsigned int rt_count, const struct wined3d_fb_state *fb, unsigned int rect_count, const RECT *clear_rects,
|
||||||
const RECT *draw_rect, DWORD flags, const struct wined3d_color *colour, float depth, DWORD stencil)
|
const RECT *draw_rect, DWORD flags, const struct wined3d_color *colour, float depth, DWORD stencil)
|
||||||
{
|
{
|
||||||
BOOL have_previous_rect = FALSE, have_identical_size = TRUE;
|
struct wined3d_rendertarget_view *view, *previous = NULL;
|
||||||
struct wined3d_rendertarget_view *view;
|
BOOL have_identical_size = TRUE;
|
||||||
struct wined3d_fb_state tmp_fb;
|
struct wined3d_fb_state tmp_fb;
|
||||||
unsigned int next_rt_count = 0;
|
unsigned int next_rt_count = 0;
|
||||||
struct wined3d_blitter *next;
|
struct wined3d_blitter *next;
|
||||||
RECT previous_rect, rect;
|
|
||||||
DWORD next_flags = 0;
|
DWORD next_flags = 0;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -2101,23 +2100,17 @@ static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_de
|
||||||
if (!(view = fb->render_targets[i]))
|
if (!(view = fb->render_targets[i]))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SetRect(&rect, 0, 0, view->width, view->height);
|
if (previous && (previous->width != view->width || previous->height != view->height))
|
||||||
IntersectRect(&rect, draw_rect, &rect);
|
|
||||||
if (have_previous_rect && !EqualRect(&previous_rect, &rect))
|
|
||||||
have_identical_size = FALSE;
|
have_identical_size = FALSE;
|
||||||
previous_rect = rect;
|
previous = view;
|
||||||
have_previous_rect = TRUE;
|
|
||||||
}
|
}
|
||||||
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL))
|
||||||
{
|
{
|
||||||
view = fb->depth_stencil;
|
view = fb->depth_stencil;
|
||||||
|
|
||||||
SetRect(&rect, 0, 0, view->width, view->height);
|
if (previous && (previous->width != view->width || previous->height != view->height))
|
||||||
IntersectRect(&rect, draw_rect, &rect);
|
|
||||||
if (have_previous_rect && !EqualRect(&previous_rect, &rect))
|
|
||||||
have_identical_size = FALSE;
|
have_identical_size = FALSE;
|
||||||
previous_rect = rect;
|
previous = view;
|
||||||
have_previous_rect = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_identical_size)
|
if (have_identical_size)
|
||||||
|
|
Loading…
Reference in New Issue