anv: Implement VK_EXT_non_seamless_cube_map.

Signed-off-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12730>
This commit is contained in:
Georg Lehmann 2021-08-29 19:58:36 +02:00 committed by Marge Bot
parent 3d37291e1c
commit 9ccc683973
4 changed files with 14 additions and 3 deletions

View File

@ -556,7 +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_non_seamless_cube_map DONE (anv, 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+)

View File

@ -6,4 +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
VK_EXT_non_seamless_cube_map on RADV, ANV

View File

@ -285,6 +285,7 @@ get_device_extensions(const struct anv_physical_device *device,
.EXT_inline_uniform_block = true,
.EXT_line_rasterization = true,
.EXT_memory_budget = device->sys.available,
.EXT_non_seamless_cube_map = true,
.EXT_pci_bus_info = true,
.EXT_physical_device_drm = true,
.EXT_pipeline_creation_cache_control = true,
@ -1820,6 +1821,13 @@ void anv_GetPhysicalDeviceFeatures2(
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_NON_SEAMLESS_CUBE_MAP_FEATURES_EXT : {
VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *features =
(VkPhysicalDeviceNonSeamlessCubeMapFeaturesEXT *)ext;
features->nonSeamlessCubeMap = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT: {
VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *features =
(VkPhysicalDevicePrimitiveTopologyListRestartFeaturesEXT *)ext;

View File

@ -953,6 +953,9 @@ VkResult genX(CreateSampler)(
sampler->n_planes * 32, 32);
}
const bool seamless_cube =
!(pCreateInfo->flags & VK_SAMPLER_CREATE_NON_SEAMLESS_CUBE_MAP_BIT_EXT);
for (unsigned p = 0; p < sampler->n_planes; p++) {
const bool plane_has_chroma =
sampler->conversion && sampler->conversion->format->planes[p].has_chroma;
@ -1004,7 +1007,7 @@ VkResult genX(CreateSampler)(
.ShadowFunction =
vk_to_intel_shadow_compare_op[pCreateInfo->compareEnable ?
pCreateInfo->compareOp : VK_COMPARE_OP_NEVER],
.CubeSurfaceControlMode = OVERRIDE,
.CubeSurfaceControlMode = seamless_cube ? OVERRIDE : PROGRAMMED,
.BorderColorPointer = border_color_offset,