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: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-03-03 19:55:22 +01:00 committed by Alexandre Julliard
parent 243f289149
commit 05f096e783
3 changed files with 10 additions and 5 deletions

View File

@ -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)

View File

@ -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)
{

View File

@ -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 =