[Fix] (ShaderTranspiler, Link, DirectGLES, DirectVulkan): demote tessellation/geometry gl_PointSize to an ordinary varying where the device cannot host the built-in - the value survives for gl_in reads and by-name capture, both backends' declines stay for shapes the pass refuses, and the verdict rides the L1 key

This commit is contained in:
2026-08-28 06:21:30 -04:00
parent 92dc41ebf9
commit d7f66722d1
21 changed files with 1320 additions and 6 deletions
@@ -222,6 +222,12 @@ namespace MobileGL::MG_Util::BackendLoader {
vkGetPhysicalDeviceFeatures(physicalDevice, &supportedFeatures);
caps.SupportsWideLines = supportedFeatures.wideLines == VK_TRUE;
caps.SupportsShaderFloat64 = supportedFeatures.shaderFloat64 == VK_TRUE;
// One feature covers both stage families here, unlike the ES loader's two extension
// tiers; the renderer enables it on the device whenever advertised
// (VulkanRenderer::CreateLogicalDeviceAndQueues), so this probe and that enable can
// never disagree about the physical device.
caps.SupportsTessellationAndGeometryPointSize =
supportedFeatures.shaderTessellationAndGeometryPointSize == VK_TRUE;
caps.SupportsImageCubeArray = supportedFeatures.imageCubeArray == VK_TRUE;
{
// Probe the formats a colour render target actually uses. A driver that refuses the flag
@@ -350,6 +356,7 @@ namespace MobileGL::MG_Util::BackendLoader {
FillFragmentInterpolationLimits(caps, properties.limits);
caps.SupportsWideLines = false;
caps.SupportsShaderFloat64 = false;
caps.SupportsTessellationAndGeometryPointSize = false;
caps.SupportsImageCubeArray = false;
caps.Supports2DArrayCompatible3DImages = false;
// This helper only receives properties, not VkPhysicalDeviceFeatures. Leave optional
@@ -87,6 +87,13 @@ namespace MobileGL {
// needs it, which includes every 64-bit vertex attribute: the attribute itself arrives
// as 32-bit words, but the bitcast result and everything computed from it is Float64.
Bool SupportsShaderFloat64 = false;
// VkPhysicalDeviceFeatures::shaderTessellationAndGeometryPointSize. Any
// tessellation/geometry module declaring OpCapability TessellationPointSize /
// GeometryPointSize needs it (VUID-VkShaderModuleCreateInfo-pCode-08740's
// capability table); without it the shared phase-B chain demotes the built-in
// to an ordinary varying. One feature for both stage families, unlike the ES
// loader's two extension tiers.
Bool SupportsTessellationAndGeometryPointSize = false;
// VkPhysicalDeviceFeatures::imageCubeArray. Required before a
// VK_IMAGE_VIEW_TYPE_CUBE_ARRAY view may be created at all
// (VUID-VkImageViewCreateInfo-viewType-01004), which is every cube map array texture -