Commit de9e1cdc authored by Rico Schüller's avatar Rico Schüller Committed by Alexandre Julliard

wined3d: Use GL_ARB_texture_mirror_clamp_to_edge when available.

parent aa536031
...@@ -134,6 +134,7 @@ static const struct wined3d_extension_map gl_extension_map[] = ...@@ -134,6 +134,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_ARB_texture_env_dot3", ARB_TEXTURE_ENV_DOT3 }, {"GL_ARB_texture_env_dot3", ARB_TEXTURE_ENV_DOT3 },
{"GL_ARB_texture_float", ARB_TEXTURE_FLOAT }, {"GL_ARB_texture_float", ARB_TEXTURE_FLOAT },
{"GL_ARB_texture_mirrored_repeat", ARB_TEXTURE_MIRRORED_REPEAT }, {"GL_ARB_texture_mirrored_repeat", ARB_TEXTURE_MIRRORED_REPEAT },
{"GL_ARB_texture_mirror_clamp_to_edge", ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE},
{"GL_ARB_texture_non_power_of_two", ARB_TEXTURE_NON_POWER_OF_TWO }, {"GL_ARB_texture_non_power_of_two", ARB_TEXTURE_NON_POWER_OF_TWO },
{"GL_ARB_texture_rectangle", ARB_TEXTURE_RECTANGLE }, {"GL_ARB_texture_rectangle", ARB_TEXTURE_RECTANGLE },
{"GL_ARB_texture_rg", ARB_TEXTURE_RG }, {"GL_ARB_texture_rg", ARB_TEXTURE_RG },
...@@ -2932,6 +2933,11 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) ...@@ -2932,6 +2933,11 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
if (!counter_bits) if (!counter_bits)
gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE; gl_info->supported[ARB_OCCLUSION_QUERY] = FALSE;
} }
if (!gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] && gl_info->supported[ATI_TEXTURE_MIRROR_ONCE])
{
TRACE(" IMPLIED: ARB_texture_mirror_clamp_to_edge support (by ATI_texture_mirror_once).\n");
gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] = TRUE;
}
wined3d_adapter_init_limits(gl_info); wined3d_adapter_init_limits(gl_info);
...@@ -3049,7 +3055,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) ...@@ -3049,7 +3055,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
gl_info->wrap_lookup[WINED3D_TADDRESS_BORDER - WINED3D_TADDRESS_WRAP] = gl_info->wrap_lookup[WINED3D_TADDRESS_BORDER - WINED3D_TADDRESS_WRAP] =
gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] ? GL_CLAMP_TO_BORDER_ARB : GL_REPEAT; gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] ? GL_CLAMP_TO_BORDER_ARB : GL_REPEAT;
gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] = gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] =
gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT; gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE] ? GL_MIRROR_CLAMP_TO_EDGE : GL_REPEAT;
adapter->d3d_info.valid_rt_mask = 0; adapter->d3d_info.valid_rt_mask = 0;
for (i = 0; i < gl_info->limits.buffers; ++i) for (i = 0; i < gl_info->limits.buffers; ++i)
...@@ -4349,7 +4355,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte ...@@ -4349,7 +4355,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
{ {
caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
} }
if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE]) if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
{ {
caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; caps->TextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
} }
...@@ -4367,7 +4373,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte ...@@ -4367,7 +4373,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte
{ {
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR; caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRROR;
} }
if (gl_info->supported[ATI_TEXTURE_MIRROR_ONCE]) if (gl_info->supported[ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE])
{ {
caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE; caps->VolumeTextureAddressCaps |= WINED3DPTADDRESSCAPS_MIRRORONCE;
} }
......
...@@ -84,6 +84,7 @@ enum wined3d_gl_extension ...@@ -84,6 +84,7 @@ enum wined3d_gl_extension
ARB_TEXTURE_ENV_DOT3, ARB_TEXTURE_ENV_DOT3,
ARB_TEXTURE_FLOAT, ARB_TEXTURE_FLOAT,
ARB_TEXTURE_MIRRORED_REPEAT, ARB_TEXTURE_MIRRORED_REPEAT,
ARB_TEXTURE_MIRROR_CLAMP_TO_EDGE,
ARB_TEXTURE_NON_POWER_OF_TWO, ARB_TEXTURE_NON_POWER_OF_TWO,
ARB_TEXTURE_RECTANGLE, ARB_TEXTURE_RECTANGLE,
ARB_TEXTURE_RG, ARB_TEXTURE_RG,
......
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