mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
renderer-native: Use hardware acceleration check in generic layer
No need to duplicate it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/838
This commit is contained in:
parent
3e6a55aff0
commit
a209a14898
@ -3257,24 +3257,12 @@ static gboolean
|
|||||||
should_force_shadow_fb (MetaRendererNative *renderer_native,
|
should_force_shadow_fb (MetaRendererNative *renderer_native,
|
||||||
MetaGpuKms *primary_gpu)
|
MetaGpuKms *primary_gpu)
|
||||||
{
|
{
|
||||||
CoglContext *cogl_context =
|
MetaRenderer *renderer = META_RENDERER (renderer_native);
|
||||||
cogl_context_from_renderer_native (renderer_native);
|
|
||||||
CoglGpuInfo *info = &cogl_context->gpu;
|
|
||||||
int kms_fd;
|
int kms_fd;
|
||||||
uint64_t prefer_shadow = 0;
|
uint64_t prefer_shadow = 0;
|
||||||
|
|
||||||
switch (info->architecture)
|
if (meta_renderer_is_hardware_accelerated (renderer))
|
||||||
{
|
return FALSE;
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_UNKNOWN:
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_SANDYBRIDGE:
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_SGX:
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_MALI:
|
|
||||||
return FALSE;
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE:
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE:
|
|
||||||
case COGL_GPU_INFO_ARCHITECTURE_SWRAST:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
kms_fd = meta_gpu_kms_get_fd (primary_gpu);
|
kms_fd = meta_gpu_kms_get_fd (primary_gpu);
|
||||||
if (drmGetCap (kms_fd, DRM_CAP_DUMB_PREFER_SHADOW, &prefer_shadow) == 0)
|
if (drmGetCap (kms_fd, DRM_CAP_DUMB_PREFER_SHADOW, &prefer_shadow) == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user