wined3d: Add support for WINED3DFMT_R16_UINT format.
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>
This commit is contained in:
parent
ae48fbafa8
commit
ec45c894bc
|
@ -199,6 +199,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
|
|||
{WINED3DFMT_S8_UINT_D24_FLOAT, WINED3DFMT_FLAG_FLOAT},
|
||||
{WINED3DFMT_R8G8B8A8_UINT, WINED3DFMT_FLAG_INTEGER},
|
||||
{WINED3DFMT_R8G8B8A8_SINT, WINED3DFMT_FLAG_INTEGER},
|
||||
{WINED3DFMT_R16_UINT, WINED3DFMT_FLAG_INTEGER},
|
||||
};
|
||||
|
||||
struct wined3d_format_block_info
|
||||
|
@ -1138,6 +1139,10 @@ static const struct wined3d_format_texture_info format_texture_info[] =
|
|||
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING
|
||||
| WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_RG, NULL},
|
||||
{WINED3DFMT_R16_UINT, GL_R16UI, GL_R16UI, 0,
|
||||
GL_RED_INTEGER, GL_UNSIGNED_SHORT, 0,
|
||||
WINED3DFMT_FLAG_TEXTURE,
|
||||
ARB_TEXTURE_RG, NULL},
|
||||
/* Luminance */
|
||||
{WINED3DFMT_L8_UNORM, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_BYTE, 0,
|
||||
|
@ -2319,6 +2324,11 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win
|
|||
&& (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_FLOAT))
|
||||
continue;
|
||||
|
||||
/* ARB_texture_rg defines integer formats if ARB_texture_integer is also supported. */
|
||||
if (!gl_info->supported[EXT_TEXTURE_INTEGER]
|
||||
&& (format->flags[WINED3D_GL_RES_TYPE_TEX_2D] & WINED3DFMT_FLAG_INTEGER))
|
||||
continue;
|
||||
|
||||
format->glInternal = format_texture_info[i].gl_internal;
|
||||
format->glGammaInternal = format_texture_info[i].gl_srgb_internal;
|
||||
format->rtInternal = format_texture_info[i].gl_rt_internal;
|
||||
|
|
Loading…
Reference in New Issue