[PATCH 1/5] d3dcompiler_43/tests: Added HLSL test suite

Henri Verbeet hverbeet at gmail.com
Mon Oct 11 05:51:16 CDT 2010


On 7 October 2010 19:49, Travis Athougies <iammisc at gmail.com> wrote:
> +/* Draw a full screen quad */
> +static void draw_quad_with_shader9(IDirect3DDevice9 *device, IDirect3DVertexBuffer9 *quad_geometry)
> +{
> +    HRESULT hr;
> +    D3DXMATRIX projection_matrix;
> +
> +    D3DXMatrixOrthoLH(&projection_matrix, 2.0f, 2.0f, 0.0f, 1.0f);
> +    IDirect3DDevice9_SetTransform(device, D3DTS_PROJECTION, &projection_matrix);
> +
> +    hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
> +    ok(hr == D3D_OK, "IDirect3DDevice9_Clear returned: %08x\n", hr);
> +
> +    hr = IDirect3DDevice9_BeginScene(device);
> +    ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned: %08x\n", hr);
> +
> +    hr = IDirect3DDevice9_SetStreamSource(device, 0, quad_geometry, 0, sizeof(struct vertex));
> +    ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource returned: %08x\n", hr);
> +    hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, 0, 2);
> +    ok(hr == D3D_OK, "IDirect3DDevice9_DrawPrimitive returned: %08x\n", hr);
> +
> +    hr = IDirect3DDevice9_EndScene(device);
> +    ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned: %08x\n", hr);
> +
> +    hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
> +    ok(hr == D3D_OK, "IDirect3DDevice9_Present returned: %08x\n", hr);
> +}
> +
Backbuffer contents are undefined after present.



More information about the wine-devel mailing list