Am 11.06.2015 um 13:51 schrieb Aaryaman Vasishta jem456.vasishta@gmail.com:
- hr = IDirect3DDevice2_GetRenderTarget(d3ddevice2, &surface);
- ok(hr == DD_OK, "Cannot get surface to the render target (hr = %x)\n", hr);
- if (FAILED(hr))
goto cleanup;
- /* Check properties of primary and depth surfaces */
- memset(&desc, 0, sizeof(desc));
- desc.dwSize = sizeof(desc);
- hr = IDirectDrawSurface_GetSurfaceDesc(surface, &desc);
- ok(hr == DD_OK, "Cannot get surface desc structure (hr = %x)\n", hr);
- if (FAILED(hr))
goto cleanup;
Checking the surface desc isn't really relevant here. The interesting check is if the render target returned by GetRenderTarget is the surface you passed to CreateDeviceFromSurface.
Please add a test that shows that an error is returned if the surface was created without 3DDEVICE.
- hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &ds);
- ok(hr == DD_OK, "Cannot get attached depth surface (hr = %x)\n", hr);
- if (FAILED(hr))
goto cleanup;
What happens if you attach a depth surface yourself before calling CreateDeviceFromSurface? Does d3drm replace it?
- hr = IDirectDrawSurface_QueryInterface(surface, &IID_IDirectDrawSurface7, (void**)&surface7);
- ok(hr == DD_OK, "Cannot get IDirectDrawSurface7 interface (hr = %x)\n", hr);
- IDirectDrawSurface_Release(ds);
- IDirectDrawSurface_Release(surface);
- IDirectDrawSurface7_Release(surface7);
The QueryInterface call here is redundant.
What happens if you attach a depth surface yourself before calling
CreateDeviceFromSurface? Does d3drm replace it?
Tried creating a device with a surface with a depth surface attached to
it, got HRESULT as 0x887602e9. The error lookup tool doesn't know what it means, nor it seems to be a d3drm error.
2015-06-12 15:24 GMT+02:00 Aaryaman Vasishta jem456.vasishta@gmail.com:
What happens if you attach a depth surface yourself before calling CreateDeviceFromSurface? Does d3drm replace it?
Tried creating a device with a surface with a depth surface attached to it, got HRESULT as 0x887602e9. The error lookup tool doesn't know what it means, nor it seems to be a d3drm error.
Grepping for 02e9 in decimal gives:
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
I'm not sure it makes much sense though.
Grepping for 02e9 in decimal gives:
#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745)
I'm not sure it makes much sense though.
Native creates a RGB device, which is a software renderer and needs system memory. Kinda annoying behavior. I don't think we want to replicate it, one reason being that we don't actually implement a software renderer.