glx: create DRI screen for display GPU incase of prime

The created DRI screen can be used to allocate VRAM memory from
display GPU in case of prime.

v2: add comments to make code readable (Pierre-Eric)
    remove driver name match check
v3: keep old path for non-mesa driver (Michel Dänzer)
v4: fallback if driver not found for display GPU (Michel Dänzer)
    fallback if create screen fail for display gpu (Michel Dänzer)

Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10595>
This commit is contained in:
Yogesh Mohanmarimuthu
2021-05-03 23:22:28 +05:30
committed by Marge Bot
parent dac2c210d6
commit 55d1b8f929
3 changed files with 41 additions and 2 deletions
+3
View File
@@ -128,6 +128,9 @@ struct loader_dri3_drawable {
bool is_different_gpu;
bool multiplanes_available;
/* DRI screen created for display GPU in case of prime */
__DRIscreen *dri_screen_display_gpu;
/* Present extension capabilities
*/
uint32_t present_capabilities;