wined3d: Don't use persistent BOs from the client thread if we might need to do vertex attribute conversion.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2022-02-15 21:28:12 -06:00 committed by Alexandre Julliard
parent 95173d6f65
commit ec5a71068b
2 changed files with 11 additions and 0 deletions

View File

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

View File

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