renderer-native: Actually use shadow fb when using software rendering

The commit 'renderer/native: Use shadow fb on software GL if preferred'
attempted to force using a shadow fb when using llvmpipe in order to
speed up blending, but instead only did so when llvmpipe AND the drm
device explicityl asked for it.

Now instead always force it for llvmpipe and other software rendering
backends, and otherwise just query the drm device (i.e.
DRM_CAP_DUMB_PREFER_SHADOW).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/807
This commit is contained in:
Jonas Ådahl 2019-09-25 16:34:43 +02:00
parent 05e1a6c2ca
commit 437f6b3d59

View File

@ -3213,11 +3213,11 @@ should_force_shadow_fb (MetaRendererNative *renderer_native,
case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE: case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE:
case COGL_GPU_INFO_ARCHITECTURE_SGX: case COGL_GPU_INFO_ARCHITECTURE_SGX:
case COGL_GPU_INFO_ARCHITECTURE_MALI: case COGL_GPU_INFO_ARCHITECTURE_MALI:
return FALSE; break;
case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE: case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE: case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
case COGL_GPU_INFO_ARCHITECTURE_SWRAST: case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
break; return TRUE;
} }
kms_fd = meta_gpu_kms_get_fd (primary_gpu); kms_fd = meta_gpu_kms_get_fd (primary_gpu);