mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 07:00:12 +01:00
kopper: always fetch and store drawable info
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16152>
This commit is contained in:
parent
6a9def8c9f
commit
c38a2ad2ff
1 changed files with 4 additions and 2 deletions
|
|
@ -46,6 +46,7 @@
|
||||||
struct kopper_drawable {
|
struct kopper_drawable {
|
||||||
struct dri_drawable base;
|
struct dri_drawable base;
|
||||||
struct kopper_loader_info info;
|
struct kopper_loader_info info;
|
||||||
|
bool is_pixmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct kopper_screen {
|
struct kopper_screen {
|
||||||
|
|
@ -283,7 +284,7 @@ kopper_allocate_textures(struct dri_context *ctx,
|
||||||
templ.depth0 = 1;
|
templ.depth0 = 1;
|
||||||
templ.array_size = 1;
|
templ.array_size = 1;
|
||||||
templ.last_level = 0;
|
templ.last_level = 0;
|
||||||
bool is_window = cdraw->info.bos.sType != 0;
|
bool is_window = !cdraw->is_pixmap;
|
||||||
|
|
||||||
uint32_t attachments = 0;
|
uint32_t attachments = 0;
|
||||||
for (i = 0; i < statts_count; i++)
|
for (i = 0; i < statts_count; i++)
|
||||||
|
|
@ -508,9 +509,10 @@ kopper_create_buffer(__DRIscreen * sPriv,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
drawable->info.has_alpha = visual->alphaBits > 0;
|
drawable->info.has_alpha = visual->alphaBits > 0;
|
||||||
if (sPriv->kopper_loader->SetSurfaceCreateInfo && !isPixmap)
|
if (sPriv->kopper_loader->SetSurfaceCreateInfo)
|
||||||
sPriv->kopper_loader->SetSurfaceCreateInfo(dPriv->loaderPrivate,
|
sPriv->kopper_loader->SetSurfaceCreateInfo(dPriv->loaderPrivate,
|
||||||
&drawable->info);
|
&drawable->info);
|
||||||
|
drawable->is_pixmap = isPixmap || drawable->info.bos.sType == 0;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue