From f492287412dccda4e810b0a54782bd3f610a5dde Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 25 May 2017 12:15:23 +0200 Subject: [PATCH] wined3d: Add support for WINED3DFMT_R9G9B9E5_SHAREDEXP. A format that contains 3 floating point values with a 9-bit mantissa each and a shared 5-bit exponent. Maps directly onto the RGB9_E5_EXT format available through the GL extension EXT_texture_shared_exponent. Signed-off-by: Sven Hesse Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/utils.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 2bdc9e26793..bf7f91615d2 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -149,6 +149,8 @@ static const struct wined3d_format_channels formats[] = /* Unsure about them, could not find a Windows driver that supports them */ {WINED3DFMT_R16, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0}, {WINED3DFMT_AL16, 0, 0, 0, 16, 0, 0, 0, 16, 4, 0, 0}, + /* DirectX 10 HDR formats */ + {WINED3DFMT_R9G9B9E5_SHAREDEXP, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0}, /* Typeless */ {WINED3DFMT_R32G32B32A32_TYPELESS, 32, 32, 32, 32, 0, 32, 64, 96, 16, 0, 0}, {WINED3DFMT_R32G32B32_TYPELESS, 32, 32, 32, 0, 0, 32, 64, 0, 12, 0, 0}, @@ -1675,6 +1677,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FBO_ATTACHABLE, ARB_FRAMEBUFFER_OBJECT, NULL}, + /* DirectX 10 HDR formats */ + {WINED3DFMT_R9G9B9E5_SHAREDEXP, GL_RGB9_E5_EXT, GL_RGB9_E5_EXT, 0, + GL_RGB, GL_UNSIGNED_INT_5_9_9_9_REV_EXT, 0, + WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, + EXT_TEXTURE_SHARED_EXPONENT, NULL}, }; struct wined3d_format_srgb_info