mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
gamescope 0135: linear when the driver rejects every offered modifier
An r32p1 Mali-G610 (Vulkan 1.1) behind the Mali bridge answered both of the backend's modifiers for AR24 with VK_ERROR_FORMAT_NOT_SUPPORTED, so the first flippable image failed and gamescope asserted in vulkan_create_flat_texture (Xiaomi 13T). Linear, when offered, is tried anyway; the bridge makes such images without the handle type and exports them through a dma-heap. If the image cannot be made, BInit fails as before.
This commit is contained in:
1 parent
5e7be54a49
commit
0c688c11e6
2 files changed
+44
No files matched your search
@@ -122,6 +122,12 @@ app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the
|
|||||||
- `0134-flippable-image-no-backend-modifiers.patch`: when the nested backend offers no modifier at all
|
- `0134-flippable-image-no-backend-modifiers.patch`: when the nested backend offers no modifier at all
|
||||||
for a flippable image's format, `CVulkanTexture::BInit` tries linear and logs it instead of asserting
|
for a flippable image's format, `CVulkanTexture::BInit` tries linear and logs it instead of asserting
|
||||||
`!modifiers.empty()`. NieR Replicant ended the session there on a Pixel 9a under Venus.
|
`!modifiers.empty()`. NieR Replicant ended the session there on a Pixel 9a under Venus.
|
||||||
|
- `0135-flippable-image-linear-when-driver-rejects-all.patch`: when the driver answers every offered
|
||||||
|
modifier with `VK_ERROR_FORMAT_NOT_SUPPORTED` and linear was among them, the flippable image tries
|
||||||
|
linear anyway; if it cannot be made, `BInit` fails as before. An r32p1 Mali-G610 (Vulkan 1.1) behind
|
||||||
|
the Mali bridge rejected both of the backend's modifiers for AR24, so the session ended at start
|
||||||
|
(0133's "no usable modifier"); the bridge makes such images without the handle type and exports
|
||||||
|
them through a dma-heap.
|
||||||
|
|
||||||
The shared DroidDeck patch also includes `0116-release-cursor-shm-buffers.patch`: pointer cursor
|
The shared DroidDeck patch also includes `0116-release-cursor-shm-buffers.patch`: pointer cursor
|
||||||
surfaces have no X11/xdg window association, so routing their commits through `g_PendingCommits`
|
surfaces have no X11/xdg window association, so routing their commits through `g_PendingCommits`
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
--- a/src/rendervulkan.cpp
|
||||||
|
+++ b/src/rendervulkan.cpp
|
||||||
|
@@ -2373,6 +2373,7 @@
|
||||||
|
|
||||||
|
std::vector<uint64_t> modifiers = {};
|
||||||
|
std::vector<uint64_t> unexportable = {};
|
||||||
|
+ bool linearRejected = false;
|
||||||
|
// TODO(JoshA): Move this code to backend for making flippable image.
|
||||||
|
if ( GetBackend()->UsesModifiers() && flags.bFlippable && g_device.supportsModifiers() && !pDMA )
|
||||||
|
{
|
||||||
|
@@ -2414,7 +2415,10 @@
|
||||||
|
};
|
||||||
|
res = getModifierProps( &imageInfo, modifier, &externalFormatProps );
|
||||||
|
if ( res == VK_ERROR_FORMAT_NOT_SUPPORTED )
|
||||||
|
+ {
|
||||||
|
+ linearRejected |= modifier == DRM_FORMAT_MOD_LINEAR;
|
||||||
|
continue;
|
||||||
|
+ }
|
||||||
|
else if ( res != VK_SUCCESS ) {
|
||||||
|
vk_errorf( res, "getModifierProps failed" );
|
||||||
|
return false;
|
||||||
|
@@ -2440,6 +2444,16 @@
|
||||||
|
drmFormat, unexportable.size() );
|
||||||
|
modifiers = unexportable;
|
||||||
|
}
|
||||||
|
+ // An r32p1 Mali driver (G610, Vulkan 1.1) behind the Mali bridge answers every modifier query
|
||||||
|
+ // with VK_ERROR_FORMAT_NOT_SUPPORTED, yet the bridge makes such an image without the handle type
|
||||||
|
+ // and exports it through a dma-heap. Linear, when the backend offered it, is tried rather than
|
||||||
|
+ // giving up; if the image cannot be made, BInit fails as before (Xiaomi 13T, AR24).
|
||||||
|
+ if ( modifiers.empty() && linearRejected )
|
||||||
|
+ {
|
||||||
|
+ vk_log.errorf( "flippable image: the driver supports none of the %zu modifier(s) offered for DRM format 0x%x; trying linear anyway",
|
||||||
|
+ numPossibleModifiers, drmFormat );
|
||||||
|
+ modifiers.push_back( DRM_FORMAT_MOD_LINEAR );
|
||||||
|
+ }
|
||||||
|
if ( modifiers.empty() )
|
||||||
|
{
|
||||||
|
vk_log.errorf( "flippable image: no usable modifier for DRM format 0x%x (%zu offered by the backend)", drmFormat, numPossibleModifiers );
|
||||||
Reference in new issue
Block a user