Module: wine Branch: master Commit: 4cec8df5eed4009eeeab067d2cd8647e3d2317cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=4cec8df5eed4009eeeab067d2c...
Author: Józef Kucia jkucia@codeweavers.com Date: Tue Jan 26 00:34:00 2016 +0100
wined3d: Add support for WINED3DFMT_R8G8B8A8_UINT textures.
Signed-off-by: Józef Kucia jkucia@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/utils.c | 6 ++++++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 7 insertions(+)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index f06affd..8f73e58 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -192,6 +192,7 @@ static const struct wined3d_format_base_flags format_base_flags[] = {WINED3DFMT_R16G16B16A16_FLOAT, WINED3DFMT_FLAG_FLOAT}, {WINED3DFMT_D32_FLOAT, WINED3DFMT_FLAG_FLOAT}, {WINED3DFMT_S8_UINT_D24_FLOAT, WINED3DFMT_FLAG_FLOAT}, + {WINED3DFMT_R8G8B8A8_UINT, WINED3DFMT_FLAG_INTEGER}, };
struct wined3d_format_block_info @@ -1087,6 +1088,10 @@ static const struct wined3d_format_texture_info format_texture_info[] = | WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_SRGB_READ | WINED3DFMT_FLAG_SRGB_WRITE | WINED3DFMT_FLAG_VTF, WINED3D_GL_EXT_NONE, NULL}, + {WINED3DFMT_R8G8B8A8_UINT, GL_RGBA8UI, GL_RGBA8UI, 0, + GL_RGBA_INTEGER, GL_UNSIGNED_INT_8_8_8_8_REV, 0, + WINED3DFMT_FLAG_TEXTURE, + ARB_TEXTURE_RGB10_A2UI, NULL}, {WINED3DFMT_R8G8B8X8_UNORM, GL_RGB8, GL_RGB8, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, 0, WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, @@ -1809,6 +1814,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for if (status == GL_FRAMEBUFFER_COMPLETE && ((format->flags[type] & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING) || !(gl_info->quirks & WINED3D_QUIRK_LIMITED_TEX_FILTERING)) + && !(format->flags[type] & WINED3DFMT_FLAG_INTEGER) && format->id != WINED3DFMT_NULL && format->id != WINED3DFMT_P8_UINT && format->glFormat != GL_LUMINANCE && format->glFormat != GL_LUMINANCE_ALPHA && (format->red_size || format->alpha_size)) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 3393d62..48074ba 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3210,6 +3210,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN #define WINED3DFMT_FLAG_HEIGHT_SCALE 0x00040000 #define WINED3DFMT_FLAG_TEXTURE 0x00080000 #define WINED3DFMT_FLAG_BLOCKS_NO_VERIFY 0x00100000 +#define WINED3DFMT_FLAG_INTEGER 0x00200000
struct wined3d_rational {