mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
Replace usage of DRM_BO_FLAG_MEM_TT in intel_regions.c with local/cached.
In addition to potentially binding when it was about to be mapped anyway, failure to use CACHED_MAPPED means eating a full wbinvd on validate. Thanks to airlied for catching this.
This commit is contained in:
parent
745df749cc
commit
fd776e10b3
1 changed files with 8 additions and 2 deletions
|
|
@ -90,7 +90,10 @@ intel_region_alloc(struct intel_context *intel,
|
|||
region->refcount = 1;
|
||||
|
||||
region->buffer = dri_bo_alloc(intel->bufmgr, "region",
|
||||
pitch * cpp * height, 64, DRM_BO_FLAG_MEM_TT);
|
||||
pitch * cpp * height, 64,
|
||||
DRM_BO_FLAG_MEM_LOCAL |
|
||||
DRM_BO_FLAG_CACHED |
|
||||
DRM_BO_FLAG_CACHED_MAPPED);
|
||||
return region;
|
||||
}
|
||||
|
||||
|
|
@ -322,7 +325,10 @@ intel_region_release_pbo(struct intel_context *intel,
|
|||
|
||||
region->buffer = dri_bo_alloc(intel->bufmgr, "region",
|
||||
region->pitch * region->cpp * region->height,
|
||||
64, DRM_BO_FLAG_MEM_TT);
|
||||
64,
|
||||
DRM_BO_FLAG_MEM_LOCAL |
|
||||
DRM_BO_FLAG_CACHED |
|
||||
DRM_BO_FLAG_CACHED_MAPPED);
|
||||
}
|
||||
|
||||
/* Break the COW tie to the pbo. Both the pbo and the region end up
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue