=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Merge if statements in adapter_gl_get_wined3d_caps().
Alexandre Julliard
julliard at winehq.org
Fri Mar 22 16:06:19 CDT 2019
Module: wine
Branch: master
Commit: 43965b9005be5021d3ddb5a83feaf576d4f1fee9
URL: https://source.winehq.org/git/wine.git/?a=commit;h=43965b9005be5021d3ddb5a83feaf576d4f1fee9
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Fri Mar 22 09:42:04 2019 +0100
wined3d: Merge if statements in adapter_gl_get_wined3d_caps().
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/adapter_gl.c | 79 ++++++++++++++++++++---------------------------
1 file changed, 33 insertions(+), 46 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index b02241b..3a0511e 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -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
More information about the wine-cvs
mailing list