Commit e795ddb3 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Store clip control support in struct wined3d_d3d_info.

parent d4fa7e4c
......@@ -3796,6 +3796,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
d3d_info->texture_swizzle = !!gl_info->supported[ARB_TEXTURE_SWIZZLE];
d3d_info->srgb_read_control = !!gl_info->supported[EXT_TEXTURE_SRGB_DECODE];
d3d_info->srgb_write_control = !!gl_info->supported[ARB_FRAMEBUFFER_SRGB];
d3d_info->clip_control = !!gl_info->supported[ARB_CLIP_CONTROL];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB;
......
......@@ -5392,8 +5392,8 @@ void get_modelview_matrix(const struct wined3d_context *context, const struct wi
void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state,
struct wined3d_matrix *mat)
{
BOOL clip_control = context->gl_info->supported[ARB_CLIP_CONTROL];
BOOL flip = !clip_control && context->render_offscreen;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
BOOL clip_control, flip;
float center_offset;
/* There are a couple of additional things we have to take into account
......@@ -5411,7 +5411,9 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w
* driver, but small enough to prevent it from interfering with any
* anti-aliasing. */
if (!clip_control && context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER)
clip_control = d3d_info->clip_control;
flip = !clip_control && context->render_offscreen;
if (!clip_control && d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER)
center_offset = 63.0f / 64.0f;
else
center_offset = -1.0f / 64.0f;
......
......@@ -214,6 +214,7 @@ struct wined3d_d3d_info
uint32_t texture_swizzle : 1;
uint32_t srgb_read_control : 1;
uint32_t srgb_write_control : 1;
uint32_t clip_control : 1;
enum wined3d_feature_level feature_level;
DWORD multisample_draw_location;
......
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