Commit 43965b90 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Merge if statements in adapter_gl_get_wined3d_caps().

parent 2f100749
......@@ -4275,6 +4275,9 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
caps->RasterCaps |= WINED3DPRASTERCAPS_ANISOTROPY
| WINED3DPRASTERCAPS_ZBIAS
| WINED3DPRASTERCAPS_MIPMAPLODBIAS;
caps->TextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC
| WINED3DPTFILTERCAPS_MINFANISOTROPIC;
}
if (gl_info->supported[ARB_BLEND_FUNC_EXTENDED])
......@@ -4292,25 +4295,8 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
| WINED3DPTEXTURECAPS_MIPVOLUMEMAP;
if (!d3d_info->texture_npot)
caps->TextureCaps |= WINED3DPTEXTURECAPS_VOLUMEMAP_POW2;
}
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
{
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP
| WINED3DPTEXTURECAPS_MIPCUBEMAP;
if (!d3d_info->texture_npot)
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP_POW2;
}
if (gl_info->supported[ARB_TEXTURE_FILTER_ANISOTROPIC])
{
caps->TextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC
| WINED3DPTFILTERCAPS_MINFANISOTROPIC;
}
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
{
caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
caps->VolumeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
| WINED3DPTFILTERCAPS_MAGFPOINT
| WINED3DPTFILTERCAPS_MINFLINEAR
| WINED3DPTFILTERCAPS_MINFPOINT
......@@ -4323,16 +4309,34 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
| WINED3DPTFILTERCAPS_MIPNEAREST
| WINED3DPTFILTERCAPS_NEAREST;
if (gl_info->supported[ARB_TEXTURE_FILTER_ANISOTROPIC])
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_INDEPENDENTUV
| WINED3DPTADDRESSCAPS_CLAMP
| WINED3DPTADDRESSCAPS_WRAP;
if (gl_info->supported[ARB_TEXTURE_BORDER_CLAMP])
{
caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC
| WINED3DPTFILTERCAPS_MINFANISOTROPIC;
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER;
}
if (gl_info->supported[ARB_TEXTURE_MIRRORED_REPEAT])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
}
if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
}
caps->MaxVolumeExtent = gl_info->limits.texture3d_size;
}
if (gl_info->supported[EXT_TEXTURE3D])
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
{
caps->VolumeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP
| WINED3DPTEXTURECAPS_MIPCUBEMAP;
if (!d3d_info->texture_npot)
caps->TextureCaps |= WINED3DPTEXTURECAPS_CUBEMAP_POW2;
caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFLINEAR
| WINED3DPTFILTERCAPS_MAGFPOINT
| WINED3DPTFILTERCAPS_MINFLINEAR
| WINED3DPTFILTERCAPS_MINFPOINT
......@@ -4344,6 +4348,12 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
| WINED3DPTFILTERCAPS_MIPLINEAR
| WINED3DPTFILTERCAPS_MIPNEAREST
| WINED3DPTFILTERCAPS_NEAREST;
if (gl_info->supported[ARB_TEXTURE_FILTER_ANISOTROPIC])
{
caps->CubeTextureFilterCaps |= WINED3DPTFILTERCAPS_MAGFANISOTROPIC
| WINED3DPTFILTERCAPS_MINFANISOTROPIC;
}
}
if (gl_info->supported[ARB_TEXTURE_BORDER_CLAMP])
......@@ -4359,29 +4369,6 @@ static void adapter_gl_get_wined3d_caps(const struct wined3d_adapter *adapter, s
caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
}
if (gl_info->supported[EXT_TEXTURE3D])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_INDEPENDENTUV
| WINED3DPTADDRESSCAPS_CLAMP
| WINED3DPTADDRESSCAPS_WRAP;
if (gl_info->supported[ARB_TEXTURE_BORDER_CLAMP])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_BORDER;
}
if (gl_info->supported[ARB_TEXTURE_MIRRORED_REPEAT])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
}
if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
{
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
}
}
if (gl_info->supported[EXT_TEXTURE3D])
caps->MaxVolumeExtent = gl_info->limits.texture3d_size;
if (gl_info->supported[EXT_STENCIL_WRAP])
{
caps->StencilCaps |= WINED3DSTENCILCAPS_DECR
......
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