On Tuesday 31 May 2011 17:48:14 Sean Sube wrote:
> + static const DWORD ps_code[] =
> + {
> + 0xFFFF0200, 0x0200001F, 0x90000000, 0xA00F0800,
> + 0x0200001F, 0x80000000, 0xB00F0000, 0x03000042,
> + 0x800F0000, 0xB0E40000, 0xA0E40000, 0x02000001,
> + 0x800F0800, 0x80E40000, 0x0000FFFF,
> + };
Please write the assembler code into comments, this makes the test easier to
read.
> + hr = IDirect3DDevice9_GetPixelShader(device, &old_ps);
> + ok(SUCCEEDED(hr), "IDirect3DDevice9_GetPixelShader failed, hr %#x.\n",
hr);
The individual tests should unset the pixel shader, if old_ps is not NULL here
that's a bug.
> + color = getPixelColorFromSurface(rt, 32, 32);
> + ok(color == 0xFF000000, "Color is %#x.\n", color);
My understanding is that the test currently fails, so you should mark it as
todo:
todo_wine ok(...);
> + hr = IDirect3DDevice9_CreatePixelShader(device, ps_code, &ps);
> + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreatePixelShader failed, hr %#x.
\n", hr);
Your test must check is PS 2.0 shaders are supported. We already have a pixel
shader >= 2.0 supported block in the START_TEST(visual) function, please call
your test function inside it. (e.g. after dp2add_ps_test)