mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 05:30:11 +01:00
zink: handle swapchain currentExtent special value
according to spec this is somehow legal Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29003>
This commit is contained in:
parent
2827ec97f8
commit
0217a7c007
1 changed files with 12 additions and 2 deletions
|
|
@ -301,8 +301,18 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
|
|||
* Due to above restrictions, it is only possible to create a new swapchain on this
|
||||
* platform with imageExtent being equal to the current size of the window.
|
||||
*/
|
||||
cswap->scci.imageExtent.width = cdt->caps.currentExtent.width;
|
||||
cswap->scci.imageExtent.height = cdt->caps.currentExtent.height;
|
||||
if (cdt->caps.currentExtent.width == 0xFFFFFFFF && cdt->caps.currentExtent.height == 0xFFFFFFFF) {
|
||||
/*
|
||||
currentExtent is the current width and height of the surface, or the special value (0xFFFFFFFF,
|
||||
0xFFFFFFFF) indicating that the surface size will be determined by the extent of a swapchain
|
||||
targeting the surface.
|
||||
*/
|
||||
cswap->scci.imageExtent.width = w;
|
||||
cswap->scci.imageExtent.height = h;
|
||||
} else {
|
||||
cswap->scci.imageExtent.width = cdt->caps.currentExtent.width;
|
||||
cswap->scci.imageExtent.height = cdt->caps.currentExtent.height;
|
||||
}
|
||||
break;
|
||||
case KOPPER_WAYLAND:
|
||||
/* On Wayland, currentExtent is the special value (0xFFFFFFFF, 0xFFFFFFFF), indicating that the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue