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

wined3d: Add support for seamless cube map filtering.

Seamless cube map filtering should always be enabled in D3D10+. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 6144fb46
......@@ -411,7 +411,8 @@ BOOL d3d8_init(struct d3d8 *d3d8)
{
DWORD flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING
| WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART;
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART
| WINED3D_LEGACY_CUBEMAP_FILTERING;
d3d8->IDirect3D8_iface.lpVtbl = &d3d8_vtbl;
d3d8->refcount = 1;
......
......@@ -580,7 +580,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
{
DWORD flags = WINED3D_PRESENT_CONVERSION | WINED3D_HANDLE_RESTORE | WINED3D_PIXEL_CENTER_INTEGER
| WINED3D_SRGB_READ_WRITE_CONTROL | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
| WINED3D_NO_PRIMITIVE_RESTART;
| WINED3D_NO_PRIMITIVE_RESTART | WINED3D_LEGACY_CUBEMAP_FILTERING;
if (!extended)
flags |= WINED3D_VIDMEM_ACCOUNTING;
......
......@@ -61,7 +61,8 @@ struct FvfToDecl
#define DDRAW_WINED3D_FLAGS (WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING \
| WINED3D_RESTORE_MODE_ON_ACTIVATE | WINED3D_FOCUS_MESSAGES | WINED3D_PIXEL_CENTER_INTEGER \
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART)
| WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART \
| WINED3D_LEGACY_CUBEMAP_FILTERING)
enum ddraw_device_state
{
......
......@@ -1969,13 +1969,19 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
if (gl_info->supported[ARB_ES3_COMPATIBILITY])
{
gl_info->gl_ops.gl.p_glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX);
checkGLcall("Enable GL_PRIMITIVE_RESTART_FIXED_INDEX");
checkGLcall("enable GL_PRIMITIVE_RESTART_FIXED_INDEX");
}
else
{
FIXME("OpenGL implementation does not support GL_PRIMITIVE_RESTART_FIXED_INDEX.\n");
}
}
if (!(d3d_info->wined3d_creation_flags & WINED3D_LEGACY_CUBEMAP_FILTERING)
&& gl_info->supported[ARB_SEAMLESS_CUBE_MAP])
{
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
checkGLcall("enable seamless cube map filtering");
}
if (gl_info->supported[ARB_CLIP_CONTROL])
GL_EXTCALL(glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT));
device->shader_backend->shader_init_context_state(ret);
......
......@@ -147,6 +147,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_ARB_point_sprite", ARB_POINT_SPRITE },
{"GL_ARB_provoking_vertex", ARB_PROVOKING_VERTEX },
{"GL_ARB_sampler_objects", ARB_SAMPLER_OBJECTS },
{"GL_ARB_seamless_cube_map", ARB_SEAMLESS_CUBE_MAP },
{"GL_ARB_shader_atomic_counters", ARB_SHADER_ATOMIC_COUNTERS },
{"GL_ARB_shader_bit_encoding", ARB_SHADER_BIT_ENCODING },
{"GL_ARB_shader_image_load_store", ARB_SHADER_IMAGE_LOAD_STORE },
......@@ -3765,6 +3766,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
* extension for core-only support. */
{ARB_FRAGMENT_COORD_CONVENTIONS, MAKEDWORD_VERSION(3, 2)},
{ARB_PROVOKING_VERTEX, MAKEDWORD_VERSION(3, 2)},
{ARB_SEAMLESS_CUBE_MAP, MAKEDWORD_VERSION(3, 2)},
{ARB_SYNC, MAKEDWORD_VERSION(3, 2)},
{ARB_VERTEX_ARRAY_BGRA, MAKEDWORD_VERSION(3, 2)},
......
......@@ -80,6 +80,7 @@ enum wined3d_gl_extension
ARB_POINT_SPRITE,
ARB_PROVOKING_VERTEX,
ARB_SAMPLER_OBJECTS,
ARB_SEAMLESS_CUBE_MAP,
ARB_SHADER_ATOMIC_COUNTERS,
ARB_SHADER_BIT_ENCODING,
ARB_SHADER_IMAGE_LOAD_STORE,
......
......@@ -1279,6 +1279,7 @@ enum wined3d_shader_byte_code_format
#define WINED3D_SRGB_READ_WRITE_CONTROL 0x00000200
#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR 0x00000400
#define WINED3D_NO_PRIMITIVE_RESTART 0x00000800
#define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000
#define WINED3D_RESZ_CODE 0x7fa05000
......
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