Commit 7e30dc8b authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d9/tests: Add a trace to clear_test() to show whether sRGB writes are supported.

parent c9e29bff
...@@ -900,7 +900,7 @@ static void clear_test(void) ...@@ -900,7 +900,7 @@ static void clear_test(void)
D3DVIEWPORT9 old_vp, vp; D3DVIEWPORT9 old_vp, vp;
RECT scissor; RECT scissor;
DWORD oldColorWrite; DWORD oldColorWrite;
BOOL invalid_clear_failed = FALSE; BOOL invalid_clear_failed = FALSE, srgb_supported;
IDirect3DDevice9 *device; IDirect3DDevice9 *device;
IDirect3D9 *d3d; IDirect3D9 *d3d;
ULONG refcount; ULONG refcount;
...@@ -1149,6 +1149,9 @@ static void clear_test(void) ...@@ -1149,6 +1149,9 @@ static void clear_test(void)
IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
/* Test D3DRS_SRGBWRITEENABLE interactions with clears. */ /* Test D3DRS_SRGBWRITEENABLE interactions with clears. */
srgb_supported = SUCCEEDED(IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
D3DUSAGE_QUERY_SRGBWRITE, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8));
trace("sRGB writing to D3DFMT_A8R8G8B8 is %ssupported.\n", srgb_supported ? "" : "not ");
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x7f7f7f7f, 0.0, 0); hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x7f7f7f7f, 0.0, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment