ddraw/tests: Add test for branch instruction with non-zero offset.
This commit is contained in:
parent
4981eda895
commit
ddd0ec1670
|
@ -979,6 +979,8 @@ static void Direct3D1Test(void)
|
|||
|
||||
hr = IDirect3DExecuteBuffer_Lock(exebuf, &desc);
|
||||
ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr);
|
||||
|
||||
memset(desc.lpData, 0, 128);
|
||||
instr = desc.lpData;
|
||||
instr[idx].bOpcode = D3DOP_BRANCHFORWARD;
|
||||
instr[idx].bSize = sizeof(*branch);
|
||||
|
@ -992,7 +994,7 @@ static void Direct3D1Test(void)
|
|||
idx += (sizeof(*branch) / sizeof(*instr));
|
||||
instr[idx].bOpcode = D3DOP_EXIT;
|
||||
instr[idx].bSize = 0;
|
||||
instr[idx].bSize = 0;
|
||||
instr[idx].wCount = 0;
|
||||
hr = IDirect3DExecuteBuffer_Unlock(exebuf);
|
||||
ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr);
|
||||
|
||||
|
@ -1020,6 +1022,34 @@ static void Direct3D1Test(void)
|
|||
hr = IDirect3DDevice_Execute(dev1, exebuf, vp, D3DEXECUTE_CLIPPED);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr);
|
||||
|
||||
memset(&desc, 0, sizeof(desc));
|
||||
desc.dwSize = sizeof(desc);
|
||||
|
||||
hr = IDirect3DExecuteBuffer_Lock(exebuf, &desc);
|
||||
ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Lock failed: %08x\n", hr);
|
||||
|
||||
memset(desc.lpData, 0, 128);
|
||||
instr = desc.lpData;
|
||||
idx = 0;
|
||||
instr[idx].bOpcode = D3DOP_BRANCHFORWARD;
|
||||
instr[idx].bSize = sizeof(*branch);
|
||||
instr[idx].wCount = 1;
|
||||
idx++;
|
||||
branch = (D3DBRANCH *) &instr[idx];
|
||||
branch->dwMask = 0x0;
|
||||
branch->dwValue = 1;
|
||||
branch->bNegate = TRUE;
|
||||
branch->dwOffset = 64;
|
||||
instr = (D3DINSTRUCTION*)((char*)desc.lpData + 64);
|
||||
instr[0].bOpcode = D3DOP_EXIT;
|
||||
instr[0].bSize = 0;
|
||||
instr[0].wCount = 0;
|
||||
hr = IDirect3DExecuteBuffer_Unlock(exebuf);
|
||||
ok(hr == D3D_OK, "IDirect3DExecuteBuffer_Unlock failed: %08x\n", hr);
|
||||
|
||||
hr = IDirect3DDevice_Execute(dev1, exebuf, vp, D3DEXECUTE_CLIPPED);
|
||||
ok(hr == D3D_OK, "IDirect3DDevice_Execute returned %08x\n", hr);
|
||||
|
||||
memset(&transformdata, 0, sizeof(transformdata));
|
||||
transformdata.dwSize = sizeof(transformdata);
|
||||
transformdata.lpIn = (void *) testverts;
|
||||
|
|
Loading…
Reference in New Issue