[PATCH 3/3] d3d11/tests: Test partial updates of 3D textures.
Henri Verbeet
hverbeet at gmail.com
Thu Mar 11 05:52:20 CST 2021
On Wed, 10 Mar 2021 at 15:11, Jan Sikorski <jsikorski at codeweavers.com> wrote:
> ---
> dlls/d3d11/tests/d3d11.c | 122 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 122 insertions(+)
>
Do you have an equivalent d3d10core test as well?
> +static void test_update_subresource_3d(void)
> +{
> + int x, y, z, left, right, top, bottom, front, back, i;
unsigned int.
> + static const DWORD color_data_with_junk[] =
> + {
> + 0xff000000, 0x0ff00000, 0x00ff0000,
> + 0x000ff000, 0x0000ff00, 0x00000ff0,
> + 0x000000ff, 0xf0000000, 0x0f000000,
> + 0xdead1111, /* Junk between slices */
> + 0x00f00000, 0x000f0000, 0x0000f000,
> + 0x00000f00, 0x000000f0, 0x0000000f,
> + 0xfff00000, 0x0fff0000, 0x00fff000,
> + 0xdead2222, /* Junk between slices */
> + 0x000fff00, 0x0000fff0, 0x00000fff,
> + 0xffff0000, 0x0ffff000, 0x00ffff00,
> + 0x000ffff0, 0x0000ffff, 0xfffff000,
> + };
> +
The formal term is "padding", I think.
> + for (i = 0; i < ARRAY_SIZE(color_data_array); ++i)
> + {
...
> + for (left = 0; left < 3; ++left)
> + for (right = left + 1; right <= 3; ++right)
> + for (top = 0; top < 3; ++top)
> + for (bottom = top + 1; bottom <= 3; ++bottom)
> + for (front = 0; front < 3; ++front)
> + for (back = front + 1; back <= 3; ++back)
> + {
...
> + for (z = 0; z < 3; ++z)
> + {
> + for (y = 0; y < 3; ++y)
> + {
> + for (x = 0; x < 3; ++x)
> + {
That's a lot of nested loops. Do we really need all of them?
> + ok(compare_uint(color, expected_color, 0), "Box (%d,%d,%d)-(%d,%d,%d): Expected %x, got %x at %d %d %d.\n",
> + left, top, front, right, bottom, back, expected_color, color, x, y, z);
0x%08x for colours, %u for the rest. Double indent for line continuations.
More information about the wine-devel
mailing list