Non-Adreno round 3: bridge images, Venus GL, shared buffers, Steam GPU drawing

- vkbridge: the memory model skips lazily allocated types. Mali-G615 lists
  DEVICE_LOCAL|LAZILY_ALLOCATED first; taken as the device-local type it left
  images with no memory type (self-test "image clear/draw: setup" FAIL,
  gamescope "No compatible image memory type").
- Session: a bridge self-test that fails images or draws falls back to the
  runtime's driver pair for that session (BL_VKBRIDGE_FALLBACK_ICD); Setup
  and the graphics report say so.
- Venus: the Mali compatibility layer runs in every process but gamescope
  (DROIDDECK_MALI_COMPAT=1), so Zink in Steam and Xwayland gets
  nullDescriptor; null texel-buffer views get stand-ins too. Without
  nullDescriptor the session's GL goes to llvmpipe.
- gamescope 0129: a refused compute pipeline is named with its SPIR-V
  capabilities.
- Compositor: a buffer on two surfaces at once (gamescope's planes while a
  notification is up) is released only when the last one lets go.
- Open driver pairs: processes.txt timeline for the first three minutes;
  Setup "Steam interface: GPU drawing" turns off software web compositing.
This commit is contained in:
The412Banner committed 2026-10-13 08:44:45 -04:00
1 parent 7464bd7697
commit 55b30fbf1d
17 files changed
+282 -18

No files matched your search

+4
View File
@@ -74,3 +74,7 @@ app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the
import, so the screen cycled through the first few frames forever while Steam ran on behind them.
Only dma-buf textures are memoized now; a shm buffer is uploaded on every commit. Adreno never
takes this path, since its Xwayland hands over dma-bufs. Also what XWAYLAND_NO_GLAMOR sessions need.
- `0129-log-failing-compute-pipeline.patch`: when `vkCreateComputePipelines` fails, one extra line
per shader type names the pipeline (shader type, layer count, ycbcr/colorspace masks, fp16) and the
SPIR-V capabilities its shader declares. A Mali-G615 through Venus refused all 119 composite
pipelines with VK_ERROR_INITIALIZATION_FAILED and nothing said which feature it objected to.
@@ -0,0 +1,55 @@
diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp
index 42b2ec6..103baee 100644
--- a/src/rendervulkan.cpp
+++ b/src/rendervulkan.cpp
@@ -994,6 +994,8 @@ bool CVulkanDevice::createPools()
return true;
}
+static std::string s_shaderCaps[SHADER_TYPE_COUNT];
+
bool CVulkanDevice::createShaders()
{
struct ShaderInfo_t
@@ -1040,6 +1042,25 @@ bool CVulkanDevice::createShaders()
.pCode = shaderInfos[i].spirv,
};
+ // The SPIR-V capabilities each shader declares, for the log when its pipeline is refused.
+ {
+ const uint32_t *pWords = shaderInfos[i].spirv;
+ size_t nWords = shaderInfos[i].size / sizeof(uint32_t);
+ std::string &sCaps = s_shaderCaps[i];
+ sCaps.clear();
+ for ( size_t w = 5; w < nWords; )
+ {
+ uint32_t uLen = pWords[w] >> 16;
+ if ( !uLen )
+ break;
+ if ( ( pWords[w] & 0xffffu ) == 17 /* OpCapability */ && w + 1 < nWords )
+ sCaps += " " + std::to_string( pWords[w + 1] );
+ else if ( ( pWords[w] & 0xffffu ) == 54 /* OpFunction: past the header */ )
+ break;
+ w += uLen;
+ }
+ }
+
VkResult res = vk.CreateShaderModule(device(), &shaderCreateInfo, nullptr, &m_shaderModules[i]);
if ( res != VK_SUCCESS )
{
@@ -1240,6 +1261,15 @@ VkPipeline CVulkanDevice::compilePipeline(uint32_t layerCount, uint32_t ycbcrMas
VkResult res = vk.CreateComputePipelines(device(), VK_NULL_HANDLE, 1, &computePipelineCreateInfo, nullptr, &result);
if (res != VK_SUCCESS) {
vk_errorf( res, "vkCreateComputePipelines failed" );
+ // Which pipeline, once per shader type: a vendor driver through Venus may refuse one variant only.
+ static uint32_t s_uLoggedTypes = 0;
+ if ( !( s_uLoggedTypes & ( 1u << ( (uint32_t)type & 31u ) ) ) )
+ {
+ s_uLoggedTypes |= 1u << ( (uint32_t)type & 31u );
+ vk_log.errorf( " failing compute pipeline: shader type %u, layers %u, ycbcr mask 0x%x, blur layers %u, colorspace mask 0x%x, output eotf %u, itm %u, fp16 %d, SPIR-V capabilities:%s",
+ (uint32_t)type, layerCount, ycbcrMask, blur_layer_count, colorspace_mask, (uint32_t)output_eotf, (uint32_t)itm_enable, m_bSupportsFp16 ? 1 : 0,
+ (uint32_t)type < SHADER_TYPE_COUNT ? s_shaderCaps[type].c_str() : "" );
+ }
return VK_NULL_HANDLE;
}