[PATCH 2/5] d3d9/tests: Add a test for nonrenderable format D3DUSAGE_AUTOGENMIPMAP support.
Matteo Bruni
mbruni at codeweavers.com
Wed Sep 20 12:53:39 CDT 2017
Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
As an aside, d3d10+ requires a number of texture formats to be
renderable which generally aren't exposed as such for d3d9 on the same
GPU. We'll probably need some kind of per-API filtering of texture formats
and flags at some point.
AFAICS D3DFMT_A8L8 never supports RENDERTARGET on d3d9 and the format
isn't supported at all by d3d10+ so we should be good, as far as this
test is concerned, even for the time being...
dlls/d3d9/tests/device.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index cb737e226c..28ab460d51 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -6937,6 +6937,13 @@ static void test_mipmap_gen(void)
d3d = Direct3DCreate9(D3D_SDK_VERSION);
ok(!!d3d, "Failed to create a D3D object.\n");
+ hr = IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
+ D3DUSAGE_AUTOGENMIPMAP, D3DRTYPE_TEXTURE, D3DFMT_A8L8);
+ if (FAILED(hr))
+ win_skip("D3DFMT_A8L8 textures not supported.\n");
+ else
+ todo_wine ok(hr == D3DOK_NOAUTOGEN, "Got unexpected hr %#x.\n", hr);
+
if (IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
D3DUSAGE_AUTOGENMIPMAP, D3DRTYPE_TEXTURE, D3DFMT_X8R8G8B8) != D3D_OK)
{
--
2.13.5
More information about the wine-patches
mailing list