Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/surface.c:
check_pixel_float4(&lockrect, 1, 1, pixdata_a32b32g32r32f[12], pixdata_a32b32g32r32f[13],
pixdata_a32b32g32r32f[14], pixdata_a32b32g32r32f[15], FALSE);
hr = IDirect3DSurface9_UnlockRect(surf);
ok(hr == D3D_OK, "Failed to unlock surface, hr %#lx.\n", hr);
/* Signed normalized value to full range float. */
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_q8w8v8u8, D3DFMT_Q8W8V8U8, 8, NULL, &rect,
D3DX_FILTER_NONE, 0);
todo_wine ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Failed to lock surface, hr %#lx.\n", hr);
check_pixel_float4(&lockrect, 0, 0, 0.0f, 0.125984f, 0.251969f, 0.377953f, TRUE);
check_pixel_float4(&lockrect, 1, 0, 0.503937f, 0.629921f, 0.755906f, 1.0f, TRUE);
check_pixel_float4(&lockrect, 0, 1, -1.0f, -1.0f, -0.755906f, -0.629921f, TRUE);
check_pixel_float4(&lockrect, 1, 1, -0.503937f, -0.377953f, -0.251969f, -0.007874f, TRUE);
Good test, showing the two encodings for -1.0f and exact 0.0f for SNORM.