mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
nv50/nvc0: make transfers aware of PIPE_TRANSFER_MAP_DIRECTLY
If state tracker asked us to map resource directly and we can't do it (because of tiling), return NULL instead of doing full transfer - state tracker should handle it and fallback to some other method or repeat transfer without PIPE_TRANSFER_MAP_DIRECTLY. It greatly improves performance of xorg state tracker on nv50+, because its fallback (DFS/UTS) is much faster than full transfer.
This commit is contained in:
parent
86852236a3
commit
4e1b1cbd0d
2 changed files with 6 additions and 0 deletions
|
|
@ -209,6 +209,9 @@ nv50_miptree_transfer_new(struct pipe_context *pctx,
|
|||
uint32_t w, h, d, z, layer;
|
||||
int ret;
|
||||
|
||||
if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
|
||||
return NULL;
|
||||
|
||||
if (mt->layout_3d) {
|
||||
z = box->z;
|
||||
d = u_minify(res->depth0, level);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,9 @@ nvc0_miptree_transfer_new(struct pipe_context *pctx,
|
|||
uint32_t w, h, d, z, layer;
|
||||
int ret;
|
||||
|
||||
if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
|
||||
return NULL;
|
||||
|
||||
tx = CALLOC_STRUCT(nvc0_transfer);
|
||||
if (!tx)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue