mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
Non-Adreno round 4: Mali GPU-drawing block, gamescope YCbCr retry, GL probe, bridge draw sync
- Setup's "Steam interface: GPU drawing" is hidden on Mali and a saved "on" is cleared: with PanVK it rebooted an Edge 60 (G615) as steamwebhelper started. Kept for Xclipse. - gamescope 0130: a composite pipeline refused at start-up is retried with a layout without immutable YCbCr samplers (G615 through Venus refused every composite shader; their SPIR-V has no Float16, so fp16 was not the cause). - Venus: droiddeck-glprobe opens GL through GLX the way the Steam client does, with the loader's reasons logged; when it fails the client's GL goes to llvmpipe. - vkbridge self-test: the draw check waits for the render pass's stores before copying out (a tiler read zeros without the dependency).
This commit is contained in:
1 parent
3ef49faa26
commit
6c8a086190
11 files changed
+203
-5
No files matched your search
@@ -78,3 +78,10 @@ app's Wayland-hosted gamescope never reaches, or need a newer gamescope than the
|
||||
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.
|
||||
- `0130-composite-without-immutable-ycbcr-samplers.patch`: one composite pipeline is compiled at
|
||||
start-up; when the driver refuses it, the descriptor layout is rebuilt without binding 4's immutable
|
||||
YCbCr samplers (that binding then takes the slot's ordinary sampler) and the probe tried again, with
|
||||
both outcomes in the log. `GAMESCOPE_NO_YCBCR_SAMPLERS=1` forces it. A Mali-G615 through Venus
|
||||
refused every composite shader (blit, blur, RCAS: SPIR-V capabilities Shader, Sampled1D,
|
||||
ImageQuery, no Float16) while EASU, NIS and the NV12 converter, which share the layout but never
|
||||
touch binding 4, compiled.
|
||||
@@ -0,0 +1,78 @@
|
||||
diff --git a/src/rendervulkan.cpp b/src/rendervulkan.cpp
|
||||
index 103baee..d344a99 100644
|
||||
--- a/src/rendervulkan.cpp
|
||||
+++ b/src/rendervulkan.cpp
|
||||
@@ -319,6 +319,33 @@ bool CVulkanDevice::BInit(VkInstance instance, VkSurfaceKHR surface)
|
||||
return false;
|
||||
if (!createShaders())
|
||||
return false;
|
||||
+ {
|
||||
+ // One composite pipeline up front: a driver that refuses it with the immutable YCbCr
|
||||
+ // samplers gets the layout without them (NV12 textures then sample without conversion).
|
||||
+ if ( getenv( "GAMESCOPE_NO_YCBCR_SAMPLERS" ) && *getenv( "GAMESCOPE_NO_YCBCR_SAMPLERS" ) == '1' )
|
||||
+ {
|
||||
+ vk_log.infof( "GAMESCOPE_NO_YCBCR_SAMPLERS=1: composite layout without immutable YCbCr samplers" );
|
||||
+ vk.DestroyPipelineLayout( device(), m_pipelineLayout, nullptr );
|
||||
+ vk.DestroyDescriptorSetLayout( device(), m_descriptorSetLayout, nullptr );
|
||||
+ m_bYcbcrImmutableSamplers = false;
|
||||
+ if ( !createLayouts() )
|
||||
+ return false;
|
||||
+ }
|
||||
+ VkPipeline probe = compilePipeline( 1, 0, SHADER_TYPE_BLIT, 1, 0, 0, 0, false );
|
||||
+ if ( probe == VK_NULL_HANDLE && m_bYcbcrImmutableSamplers )
|
||||
+ {
|
||||
+ vk_log.errorf( "composite pipeline refused; retrying without immutable YCbCr samplers" );
|
||||
+ vk.DestroyPipelineLayout( device(), m_pipelineLayout, nullptr );
|
||||
+ vk.DestroyDescriptorSetLayout( device(), m_descriptorSetLayout, nullptr );
|
||||
+ m_bYcbcrImmutableSamplers = false;
|
||||
+ if ( !createLayouts() )
|
||||
+ return false;
|
||||
+ probe = compilePipeline( 1, 0, SHADER_TYPE_BLIT, 1, 0, 0, 0, false );
|
||||
+ vk_log.infof( "composite pipeline without immutable YCbCr samplers: %s", probe ? "accepted" : "STILL refused" );
|
||||
+ }
|
||||
+ if ( probe != VK_NULL_HANDLE )
|
||||
+ vk.DestroyPipeline( device(), probe, nullptr );
|
||||
+ }
|
||||
if (!createScratchResources())
|
||||
return false;
|
||||
|
||||
@@ -869,7 +896,7 @@ bool CVulkanDevice::createLayouts()
|
||||
.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,
|
||||
.descriptorCount = VKR_SAMPLER_SLOTS,
|
||||
.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT,
|
||||
- .pImmutableSamplers = ycbcrSamplers.data(),
|
||||
+ .pImmutableSamplers = m_bYcbcrImmutableSamplers ? ycbcrSamplers.data() : nullptr,
|
||||
},
|
||||
VkDescriptorSetLayoutBinding {
|
||||
.binding = 5,
|
||||
@@ -1870,6 +1897,8 @@ void CVulkanCmdBuffer::dispatch(uint32_t x, uint32_t y, uint32_t z)
|
||||
imageDescriptors[i].sampler = m_device->sampler(m_samplerState[i]);
|
||||
imageDescriptors[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
ycbcrImageDescriptors[i].imageLayout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
+ if ( !m_device->ycbcrImmutableSamplers() )
|
||||
+ ycbcrImageDescriptors[i].sampler = imageDescriptors[i].sampler;
|
||||
if (m_boundTextures[i] == nullptr)
|
||||
continue;
|
||||
|
||||
diff --git a/src/rendervulkan.hpp b/src/rendervulkan.hpp
|
||||
index 901e6a6..e0ede11 100644
|
||||
--- a/src/rendervulkan.hpp
|
||||
+++ b/src/rendervulkan.hpp
|
||||
@@ -876,6 +876,7 @@ public:
|
||||
inline bool hasDrmPrimaryDevId() {return m_bHasDrmPrimaryDevId;}
|
||||
inline dev_t primaryDevId() {return m_drmPrimaryDevId;}
|
||||
inline bool supportsFp16() {return m_bSupportsFp16;}
|
||||
+ inline bool ycbcrImmutableSamplers() {return m_bYcbcrImmutableSamplers;}
|
||||
inline std::vector<VkExtensionProperties>& supportedExtensions() {return m_supportedExts;}
|
||||
|
||||
inline std::pair<void *, uint32_t> uploadBufferData(uint32_t size)
|
||||
@@ -925,6 +926,9 @@ protected:
|
||||
VkQueue m_generalQueue = nullptr;
|
||||
VkSamplerYcbcrConversion m_ycbcrConversion = VK_NULL_HANDLE;
|
||||
VkSampler m_ycbcrSampler = VK_NULL_HANDLE;
|
||||
+ // Binding 4 carries immutable YCbCr samplers; off when the driver refuses every composite
|
||||
+ // pipeline with them (Mali-G615 through Venus: VK_ERROR_INITIALIZATION_FAILED).
|
||||
+ bool m_bYcbcrImmutableSamplers = true;
|
||||
VkDescriptorSetLayout m_descriptorSetLayout = VK_NULL_HANDLE;
|
||||
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE;
|
||||
VkDescriptorPool m_descriptorPool = VK_NULL_HANDLE;
|
||||
Reference in new issue
Block a user