d3d9: Accept erros in the fvp->3.0 pixel shader varying test.
Some cards/drivers like ATI and the Geforce 8 driver return an error in this case, make the test accept that. This lifts some constraints we have to care for in WineD3D and removes one of the requirement for the packing shader. We still need the packing shader for vs_1_1 -> ps_3_0 mapping and for indirect pixel shader varying addressing though.
This commit is contained in:
parent
9cd1d505bd
commit
1c3e725d63
|
@ -5181,6 +5181,7 @@ static void fixed_function_varying_test(IDirect3DDevice9 *device) {
|
|||
HRESULT hr;
|
||||
unsigned int i;
|
||||
DWORD color, r, g, b, r_e, g_e, b_e;
|
||||
BOOL drawok;
|
||||
|
||||
memcpy(data2, data, sizeof(data2));
|
||||
data2[0].pos_x = 0; data2[0].pos_y = 0;
|
||||
|
@ -5212,16 +5213,25 @@ static void fixed_function_varying_test(IDirect3DDevice9 *device) {
|
|||
|
||||
hr = IDirect3DDevice9_BeginScene(device);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_BeginScene returned %s\n", DXGetErrorString9(hr));
|
||||
drawok = FALSE;
|
||||
if(SUCCEEDED(hr))
|
||||
{
|
||||
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, data, sizeof(data[0]));
|
||||
ok(hr == D3D_OK, "DrawPrimitiveUP failed (%08x)\n", hr);
|
||||
ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "DrawPrimitiveUP failed (%08x)\n", hr);
|
||||
drawok = SUCCEEDED(hr);
|
||||
hr = IDirect3DDevice9_EndScene(device);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_EndScene returned %s\n", DXGetErrorString9(hr));
|
||||
}
|
||||
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr));
|
||||
|
||||
/* Some drivers reject the combination of ps_3_0 and fixed function vertex processing. Accept
|
||||
* the failure and do not check the color if it failed
|
||||
*/
|
||||
if(!drawok) {
|
||||
continue;
|
||||
}
|
||||
|
||||
color = getPixelColor(device, 360, 240);
|
||||
r = color & 0x00ff0000 >> 16;
|
||||
g = color & 0x0000ff00 >> 8;
|
||||
|
|
Loading…
Reference in New Issue