diff --git a/docs/features.txt b/docs/features.txt index 3bd71a7fdf2..cb05729c09f 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -556,6 +556,7 @@ Khronos extensions that are not part of any Vulkan version: VK_EXT_memory_budget DONE (anv, radv, tu) VK_EXT_memory_priority DONE (radv) VK_EXT_multi_draw DONE (anv, lvp, radv) + VK_EXT_non_seamless_cube_map DONE (radv) VK_EXT_pci_bus_info DONE (anv, radv) VK_EXT_physical_device_drm DONE (anv, radv, tu, v3dv) VK_EXT_post_depth_coverage DONE (anv/gfx10+, lvp, radv/gfx10+) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 57d5ba5b2a3..80c9287a9b9 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -6,3 +6,4 @@ zink GL_EXT_memory_object_win32 and GL_EXT_semaphore_win32 support vertexAttributeInstanceRateZeroDivisor support for lavapipe panfrost Valhall support (conformant OpenGL ES 3.1 on Mali-G57) VK_EXT_primitives_generated_query on RADV +VK_EXT_non_seamless_cube_map on RADV diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 7f8310694f9..3c1c4a88032 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -499,6 +499,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device .EXT_memory_budget = true, .EXT_memory_priority = true, .EXT_multi_draw = true, + .EXT_non_seamless_cube_map = true, .EXT_pci_bus_info = true, #ifndef _WIN32 .EXT_physical_device_drm = true, @@ -1763,6 +1764,12 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, features->primitivesGeneratedQueryWithNonZeroStreams = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT : { + VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *features = + (VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)ext; + features->nonSeamlessCubeMap = true; + break; + } default: break; } @@ -6413,6 +6420,7 @@ radv_init_sampler(struct radv_device *device, struct radv_sampler *sampler, VkBorderColor border_color = uses_border_color ? pCreateInfo->borderColor : VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK; uint32_t border_color_ptr; + bool disable_cube_wrap = pCreateInfo->flags & VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT; const struct VkSamplerReductionModeCreateInfo *sampler_reduction = vk_find_struct_const(pCreateInfo->pNext, SAMPLER_REDUCTION_MODE_CREATE_INFO); @@ -6452,7 +6460,7 @@ radv_init_sampler(struct radv_device *device, struct radv_sampler *sampler, S_008F30_MAX_ANISO_RATIO(max_aniso_ratio) | S_008F30_DEPTH_COMPARE_FUNC(depth_compare_func) | S_008F30_FORCE_UNNORMALIZED(pCreateInfo->unnormalizedCoordinates ? 1 : 0) | S_008F30_ANISO_THRESHOLD(max_aniso_ratio >> 1) | S_008F30_ANISO_BIAS(max_aniso_ratio) | - S_008F30_DISABLE_CUBE_WRAP(0) | S_008F30_COMPAT_MODE(compat_mode) | + S_008F30_DISABLE_CUBE_WRAP(disable_cube_wrap) | S_008F30_COMPAT_MODE(compat_mode) | S_008F30_FILTER_MODE(filter_mode) | S_008F30_TRUNC_COORD(trunc_coord)); sampler->state[1] = (S_008F34_MIN_LOD(radv_float_to_ufixed(CLAMP(pCreateInfo->minLod, 0, 15), 8)) | S_008F34_MAX_LOD(radv_float_to_ufixed(CLAMP(pCreateInfo->maxLod, 0, 15), 8)) |