mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
svga: Use direct maps when GB objects are present
SVGA device always supports direct maps which are preferable in all cases
because they avoid temporary surfaces and extra transfers. Furthermore
DMA transfers on devices with GB objects have undefined timing semantics.
Also the DMA transfers can not work on SVGAv3 because the device lacks
VRAM to be able to perform them.
Fix the last paths still using DMA transfers to make sure they're never
used on GB enabled configs. This fixes gnome-shell startup on SVGAv3.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Martin Krastev <krastevm@vmware.com>
Reviewed-by: Michael Banack <banackm@vmware.com>
(cherry picked from commit e5306d190a)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16564>
This commit is contained in:
parent
991e904e95
commit
768c1a9512
2 changed files with 7 additions and 4 deletions
|
|
@ -439,6 +439,8 @@ SVGA3D_SurfaceDMA(struct svga_winsys_context *swc,
|
|||
unsigned region_flags;
|
||||
unsigned surface_flags;
|
||||
|
||||
assert(!swc->have_gb_objects);
|
||||
|
||||
if (transfer == SVGA3D_WRITE_HOST_VRAM) {
|
||||
region_flags = SVGA_RELOC_READ;
|
||||
surface_flags = SVGA_RELOC_WRITE;
|
||||
|
|
|
|||
|
|
@ -535,10 +535,11 @@ svga_texture_transfer_map(struct pipe_context *pipe,
|
|||
break;
|
||||
}
|
||||
|
||||
/* Force direct map for multisample surface */
|
||||
if (texture->nr_samples > 1) {
|
||||
assert(svga_have_gb_objects(svga));
|
||||
assert(sws->have_sm4_1);
|
||||
/* We never want to use DMA transfers on systems with GBObjects because
|
||||
* it causes serialization issues and in SVGAv3 vram is gone which
|
||||
* makes it impossible to support both at the same time.
|
||||
*/
|
||||
if (svga_have_gb_objects(svga)) {
|
||||
use_direct_map = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue