Commit 25ce3a42 authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

d3dx9: Add support for D3DFMT_A32B32G32R32F.

parent f30b6d0b
......@@ -48,6 +48,7 @@ struct volume
enum format_type {
FORMAT_ARGB, /* unsigned */
FORMAT_ARGBF16,/* float 16 */
FORMAT_ARGBF, /* float */
FORMAT_DXT,
FORMAT_UNKNOWN
};
......
......@@ -1101,7 +1101,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device)
if (SUCCEEDED(hr))
{
hr = D3DXFillTexture(tex, fillfunc, NULL);
todo_wine ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK);
ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK);
hr = IDirect3DTexture9_LockRect(tex, 0, &lock_rect, NULL, D3DLOCK_READONLY);
if (SUCCEEDED(hr))
......@@ -1124,7 +1124,7 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device)
expected.z = 1.0f / 4.0f;
expected.w = 1.0f;
todo_wine expect_vec4(&expected, &got);
expect_vec4(&expected, &got);
}
}
......
......@@ -1236,6 +1236,8 @@ static inline void fill_texture(const struct pixel_format_desc *format, BYTE *po
if (format->type == FORMAT_ARGBF16)
v = float_32_to_16(comp_value);
else if (format->type == FORMAT_ARGBF)
v = *(DWORD *)&comp_value;
else if (format->type == FORMAT_ARGB)
v = comp_value * ((1 << format->bits[c]) - 1) + 0.5f;
else
......@@ -1282,7 +1284,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f
return D3DERR_INVALIDCALL;
format = get_format_info(desc.Format);
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16)
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
{
FIXME("Unsupported texture format %#x\n", desc.Format);
return D3DERR_INVALIDCALL;
......@@ -1649,7 +1651,7 @@ HRESULT WINAPI D3DXFillCubeTexture(struct IDirect3DCubeTexture9 *texture, LPD3DX
return D3DERR_INVALIDCALL;
format = get_format_info(desc.Format);
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16)
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
{
FIXME("Unsupported texture format %#x\n", desc.Format);
return D3DERR_INVALIDCALL;
......@@ -1708,7 +1710,7 @@ HRESULT WINAPI D3DXFillVolumeTexture(struct IDirect3DVolumeTexture9 *texture, LP
return D3DERR_INVALIDCALL;
format = get_format_info(desc.Format);
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16)
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
{
FIXME("Unsupported texture format %#x\n", desc.Format);
return D3DERR_INVALIDCALL;
......
......@@ -71,6 +71,7 @@ static const struct pixel_format_desc formats[] =
{D3DFMT_DXT4, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
{D3DFMT_DXT5, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 1, 4, 4, 16, FORMAT_DXT, NULL, NULL },
{D3DFMT_A16B16G16R16F, {16, 16, 16, 16}, {48, 0, 16, 32}, 8, 1, 1, 8, FORMAT_ARGBF16, NULL, NULL },
{D3DFMT_A32B32G32R32F, {32, 32, 32, 32}, {96, 0, 32, 64}, 16, 1, 1, 16, FORMAT_ARGBF, NULL, NULL },
/* marks last element */
{D3DFMT_UNKNOWN, { 0, 0, 0, 0}, { 0, 0, 0, 0}, 0, 1, 1, 0, FORMAT_UNKNOWN, NULL, NULL },
};
......
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