From 71880a29119bc2ddcd2a3c680e23464906049dcb Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Fri, 27 Mar 2026 01:16:25 +0800 Subject: [PATCH] pvr: support VK_EXT_non_seamless_cube_map When running GLES2 conformance tests with Zink on the PowerVR driver, I found that the PowerVR driver has the same kind of weird behavior of not ignoreing wrap mode for seamless cubes with Apple AGX (See !21978 for the description of the quirk on AGX). As GLES2 exposes non-seamless cubes, exposing non-seamless cube support at PowerVR help seems to help lot about these GLES2 tests. Implementing full GLES 3 and relying on the workaround for AGX is another choice, but it's still too far. Implementing non-seamless cube seems to be as easy as setting a bit in the sampler control word, so do it. Signed-off-by: Icenowy Zheng Reviewed-by: Simon Perretta Part-of: --- src/imagination/vulkan/pvr_arch_sampler.c | 5 ++++- src/imagination/vulkan/pvr_physical_device.c | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_arch_sampler.c b/src/imagination/vulkan/pvr_arch_sampler.c index 8f94d97b156..1b96bfccfe6 100644 --- a/src/imagination/vulkan/pvr_arch_sampler.c +++ b/src/imagination/vulkan/pvr_arch_sampler.c @@ -198,7 +198,10 @@ VkResult PVR_PER_ARCH(CreateSampler)(VkDevice _device, } } - pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) {} + pvr_csb_pack (&sampler->descriptor.words[1], TEXSTATE_SAMPLER_WORD1, word) { + word.cemedge_dontfilter = + (pCreateInfo->flags & VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT); + } #ifndef NDEBUG /* YUV plane addresses are stored in the sampler on rogue. We need to add diff --git a/src/imagination/vulkan/pvr_physical_device.c b/src/imagination/vulkan/pvr_physical_device.c index 219fd89b7c7..8628a1e2969 100644 --- a/src/imagination/vulkan/pvr_physical_device.c +++ b/src/imagination/vulkan/pvr_physical_device.c @@ -189,6 +189,7 @@ static void pvr_physical_device_get_supported_extensions( .EXT_index_type_uint8 = false, .EXT_line_rasterization = true, .EXT_map_memory_placed = true, + .EXT_non_seamless_cube_map = true, .EXT_physical_device_drm = true, .EXT_private_data = true, .EXT_provoking_vertex = true, @@ -411,6 +412,9 @@ static void pvr_physical_device_get_supported_features( .memoryMapRangePlaced = false, .memoryUnmapReserve = true, + /* VK_EXT_non_seamless_cube_map */ + .nonSeamlessCubeMap = true, + /* Vulkan 1.3 / VK_EXT_private_data */ .privateData = true,