Commit d838cf70 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Do not accelerate NOOVERWRITE maps if we cannot map persistently.

I.e. if ARB_buffer_storage is not supported. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1c66d05a
......@@ -5231,6 +5231,7 @@ static void wined3d_adapter_gl_init_d3d_info(struct wined3d_adapter_gl *adapter_
d3d_info->fences = wined3d_fence_supported(gl_info);
d3d_info->feature_level = feature_level_from_caps(gl_info, &shader_caps, &fragment_caps);
d3d_info->filling_convention_offset = gl_info->filling_convention_offset;
d3d_info->persistent_map = !!gl_info->supported[ARB_BUFFER_STORAGE];
if (gl_info->supported[ARB_TEXTURE_MULTISAMPLE])
d3d_info->multisample_draw_location = WINED3D_LOCATION_TEXTURE_RGB;
......
......@@ -2351,6 +2351,7 @@ static void wined3d_adapter_vk_init_d3d_info(struct wined3d_adapter_vk *adapter_
d3d_info->feature_level = feature_level_from_caps(&shader_caps);
d3d_info->subpixel_viewport = true;
d3d_info->fences = true;
d3d_info->persistent_map = true;
/* Like GL, Vulkan doesn't explicitly specify a filling convention and only mandates that a
* shared edge of two adjacent triangles generate a fragment for exactly one of the triangles.
......
......@@ -1008,11 +1008,13 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
addr.buffer_object = buffer->buffer_object;
addr.addr = 0;
buffer->map_ptr = wined3d_context_map_bo_address(context, &addr, resource->size, flags);
/* We are accessing buffer->resource.client from the CS thread,
* but it's safe because the client thread will wait for the
* map to return, thus completely serializing this call with
* other client code. */
buffer->resource.client.addr = addr;
if (context->d3d_info->persistent_map)
buffer->resource.client.addr = addr;
if (((DWORD_PTR)buffer->map_ptr) & (RESOURCE_ALIGNMENT - 1))
{
......
......@@ -243,6 +243,7 @@ struct wined3d_d3d_info
uint32_t pbo : 1;
uint32_t subpixel_viewport : 1;
uint32_t fences : 1;
uint32_t persistent_map : 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