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

wined3d: Don't use persistent BOs from the client thread if we might need to do…

wined3d: Don't use persistent BOs from the client thread if we might need to do vertex attribute conversion. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 95173d6f
......@@ -3077,12 +3077,21 @@ static bool wined3d_cs_map_upload_bo(struct wined3d_device_context *context, str
* a texture can be invalidated to even count. */
if (resource->type == WINED3D_RTYPE_BUFFER && (flags & (WINED3D_MAP_DISCARD | WINED3D_MAP_NOOVERWRITE)))
{
const struct wined3d_d3d_info *d3d_info = &context->device->adapter->d3d_info;
struct wined3d_client_resource *client = &resource->client;
struct wined3d_device *device = context->device;
struct wined3d_bo_address addr;
struct wined3d_bo *bo;
uint8_t *map_ptr;
/* We can't use persistent maps if we might need to do vertex attribute
* conversion; that will cause the CS thread to invalidate the BO. */
if (!d3d_info->xyzrhw || !d3d_info->vertex_bgra || !d3d_info->ffp_generic_attributes)
{
TRACE("Not returning a persistent buffer because we might need to do vertex attribute conversion.\n");
return NULL;
}
if (flags & WINED3D_MAP_DISCARD)
{
if (!device->adapter->adapter_ops->adapter_alloc_bo(device, resource, sub_resource_idx, &addr))
......
......@@ -1176,6 +1176,8 @@ static void spirv_vertex_pipe_vk_vp_enable(const struct wined3d_context *context
static void spirv_vertex_pipe_vk_vp_get_caps(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps)
{
memset(caps, 0, sizeof(*caps));
caps->xyzrhw = TRUE;
caps->ffp_generic_attributes = TRUE;
}
static uint32_t spirv_vertex_pipe_vk_vp_get_emul_mask(const struct wined3d_gl_info *gl_info)
......
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