mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
etnaviv: fix renderonly check in etna_resource_alloc
When the driver hasn't been initialized via renderonly, screen->ro
will be NULL. This fixes a crash when passing USE_SCANOUT to etnaviv
when it's missing renderonly.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074>
(cherry picked from commit 3b3cd51286)
This commit is contained in:
parent
8b4a8972a8
commit
1396ddcc4e
2 changed files with 2 additions and 2 deletions
|
|
@ -283,7 +283,7 @@
|
|||
"description": "etnaviv: fix renderonly check in etna_resource_alloc",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
|
|||
|
||||
size = setup_miptree(rsc, paddingX, paddingY, msaa_xscale, msaa_yscale);
|
||||
|
||||
if (unlikely(templat->bind & PIPE_BIND_SCANOUT) && screen->ro->kms_fd >= 0) {
|
||||
if (unlikely(templat->bind & PIPE_BIND_SCANOUT) && screen->ro) {
|
||||
struct pipe_resource scanout_templat = *templat;
|
||||
struct winsys_handle handle;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue