wined3d: Reject blits between depth/stencil and colour resources in the raw blitter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
dfb6c30754
commit
769e2be52f
|
@ -16217,8 +16217,9 @@ static void test_format_compatibility(void)
|
|||
colour = get_readback_color(&rb, x, y);
|
||||
expected = test_data[i].success && x >= texel_dwords && y
|
||||
? bitmap_data[j - (4 + texel_dwords)] : initial_data[j];
|
||||
ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n",
|
||||
i, colour, x, y, expected);
|
||||
todo_wine_if(test_data[i].dst_ds && colour)
|
||||
ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n",
|
||||
i, colour, x, y, expected);
|
||||
}
|
||||
release_resource_readback(&rb);
|
||||
|
||||
|
@ -16231,7 +16232,7 @@ static void test_format_compatibility(void)
|
|||
y = j / 4;
|
||||
colour = get_readback_color(&rb, x, y);
|
||||
expected = test_data[i].success ? bitmap_data[j] : initial_data[j];
|
||||
todo_wine_if(test_data[i].src_ds)
|
||||
todo_wine_if(test_data[i].dst_ds || test_data[i].src_format == DXGI_FORMAT_R16_TYPELESS)
|
||||
ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n",
|
||||
i, colour, x, y, expected);
|
||||
}
|
||||
|
|
|
@ -28306,7 +28306,7 @@ static void test_format_compatibility(void)
|
|||
y = j / 4;
|
||||
colour = get_readback_color(&rb, x, y, 0);
|
||||
expected = test_data[i].success ? bitmap_data[j] : initial_data[j];
|
||||
todo_wine_if(test_data[i].src_ds || test_data[i].dst_ds)
|
||||
todo_wine_if(!test_data[i].dst_ds && test_data[i].src_format == DXGI_FORMAT_R16_TYPELESS)
|
||||
ok(colour == expected, "Test %u: Got unexpected colour 0x%08x at (%u, %u), expected 0x%08x.\n",
|
||||
i, colour, x, y, expected);
|
||||
}
|
||||
|
|
|
@ -6082,12 +6082,19 @@ static DWORD raw_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit
|
|||
unsigned int src_level, src_layer, dst_level, dst_layer;
|
||||
struct wined3d_blitter *next;
|
||||
GLuint src_name, dst_name;
|
||||
bool src_ds, dst_ds;
|
||||
DWORD location;
|
||||
|
||||
src_ds = src_texture->resource.format->depth_size || src_texture->resource.format->stencil_size;
|
||||
dst_ds = dst_texture->resource.format->depth_size || dst_texture->resource.format->stencil_size;
|
||||
|
||||
/* If we would need to copy from a renderbuffer or drawable, we'd probably
|
||||
* be better off using the FBO blitter directly, since we'd need to use it
|
||||
* to copy the resource contents to the texture anyway. */
|
||||
if (op != WINED3D_BLIT_OP_RAW_BLIT
|
||||
* to copy the resource contents to the texture anyway.
|
||||
*
|
||||
* We also can't copy between depth/stencil and colour resources, since
|
||||
* the formats are considered incompatible in OpenGL. */
|
||||
if (op != WINED3D_BLIT_OP_RAW_BLIT || (src_ds != dst_ds)
|
||||
|| (src_texture->resource.format->id == dst_texture->resource.format->id
|
||||
&& (!(src_location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
|
||||
|| !(dst_location & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)))))
|
||||
|
|
Loading…
Reference in New Issue