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

wined3d: Store multisample draw location in struct wined3d_d3d_info.

We may want to introduce a separate structure for backend options if we have more of those. 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 243f2891
......@@ -3738,6 +3738,11 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter,
d3d_info->draw_base_vertex_offset = !!gl_info->supported[ARB_DRAW_ELEMENTS_BASE_VERTEX];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB;
else
d3d_info->multisample_draw_location = WINED3D_LOCATION_RB_MULTISAMPLE;
TRACE("Max texture stages: %u.\n", d3d_info->limits.ffp_blend_stages);
if (!d3d_info->shader_color_key)
......
......@@ -481,17 +481,15 @@ BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource)
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
{
const struct wined3d_d3d_info *d3d_info = &resource->device->adapter->d3d_info;
if (!wined3d_resource_is_offscreen(resource) || wined3d_settings.offscreen_rendering_mode != ORM_FBO)
{
resource->draw_binding = WINED3D_LOCATION_DRAWABLE;
}
else if (resource->multisample_type)
{
const struct wined3d_gl_info *gl_info = &resource->device->adapter->gl_info;
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
resource->draw_binding = WINED3D_LOCATION_TEXTURE_RGB;
else
resource->draw_binding = WINED3D_LOCATION_RB_MULTISAMPLE;
resource->draw_binding = d3d_info->multisample_draw_location;
}
else if (resource->gl_type == WINED3D_GL_RES_TYPE_RB)
{
......
......@@ -207,6 +207,8 @@ struct wined3d_d3d_info
unsigned int texture_npot_conditional : 1;
unsigned int draw_base_vertex_offset : 1;
enum wined3d_feature_level feature_level;
DWORD multisample_draw_location;
};
static const struct color_fixup_desc COLOR_FIXUP_IDENTITY =
......
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