1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553
|
/*
** Copyright (c) 2018-2020 Valve Corporation
** Copyright (c) 2018-2020 LunarG, Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and associated documentation files (the "Software"),
** to deal in the Software without restriction, including without limitation
** the rights to use, copy, modify, merge, publish, distribute, sublicense,
** and/or sell copies of the Software, and to permit persons to whom the
** Software is furnished to do so, subject to the following conditions:
**
** The above copyright notice and this permission notice shall be included in
** all copies or substantial portions of the Software.
**
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
** DEALINGS IN THE SOFTWARE.
*/
#include "project_version.h"
#include "layer/trace_layer.h"
#include "encode/vulkan_capture_manager.h"
#include "encode/vulkan_handle_wrapper_util.h"
#include "generated/generated_layer_func_table.h"
#include "generated/generated_vulkan_api_call_encoders.h"
#include "util/platform.h"
#include "vulkan/vk_layer.h"
#include <cstring>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>
GFXRECON_BEGIN_NAMESPACE(gfxrecon)
const VkLayerProperties kLayerProps = {
GFXRECON_PROJECT_LAYER_NAME,
VK_HEADER_VERSION_COMPLETE,
VK_MAKE_VERSION(GFXRECON_PROJECT_VERSION_MAJOR, GFXRECON_PROJECT_VERSION_MINOR, GFXRECON_PROJECT_VERSION_PATCH),
GFXRECON_PROJECT_DESCRIPTION
" Version " GFXRECON_VERSION_STR(GFXRECON_PROJECT_VERSION_MAJOR) "." GFXRECON_VERSION_STR(
GFXRECON_PROJECT_VERSION_MINOR) "." GFXRECON_VERSION_STR(GFXRECON_PROJECT_VERSION_PATCH)
GFXRECON_PROJECT_VERSION_DESIGNATION
};
const std::vector<VkExtensionProperties> kDeviceExtensionProps = { VkExtensionProperties{ "VK_EXT_tooling_info", 1 } };
/// An alphabetical list of device extensions which we do not report upstream if
/// other layers or ICDs expose them to us.
const char* const kUnsupportedDeviceExtensions[] = {
// Supporting the CPU moving around descriptor set data directly has too many
// perf/robustness tradeoffs to be worth it.
VK_EXT_SHADER_MODULE_IDENTIFIER_EXTENSION_NAME,
VK_NVX_BINARY_IMPORT_EXTENSION_NAME,
VK_VALVE_DESCRIPTOR_SET_HOST_MAPPING_EXTENSION_NAME,
VK_KHR_VIDEO_QUEUE_EXTENSION_NAME,
VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME,
VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME,
VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME,
VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME,
VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME,
VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME,
VK_NVX_BINARY_IMPORT_EXTENSION_NAME,
VK_HUAWEI_SUBPASS_SHADING_EXTENSION_NAME,
VK_EXT_PIPELINE_PROPERTIES_EXTENSION_NAME,
VK_EXT_DESCRIPTOR_BUFFER_EXTENSION_NAME,
VK_NV_COPY_MEMORY_INDIRECT_EXTENSION_NAME,
VK_NV_MEMORY_DECOMPRESSION_EXTENSION_NAME
};
static void remove_extensions(std::vector<VkExtensionProperties>& extensionProps,
const char* const screenedExtensions[],
const size_t screenedCount)
{
auto new_end = std::remove_if(
extensionProps.begin(),
extensionProps.end(),
[&screenedExtensions, screenedCount](const VkExtensionProperties& extension) {
return std::find_if(screenedExtensions, &screenedExtensions[screenedCount], [&extension](auto screened) {
return strncmp(extension.extensionName, screened, VK_MAX_EXTENSION_NAME_SIZE) == 0;
}) != &screenedExtensions[screenedCount];
});
extensionProps.resize(new_end - extensionProps.begin());
}
static const VkLayerInstanceCreateInfo* get_instance_chain_info(const VkInstanceCreateInfo* pCreateInfo,
VkLayerFunction func)
{
const VkLayerInstanceCreateInfo* chain_info =
reinterpret_cast<const VkLayerInstanceCreateInfo*>(pCreateInfo->pNext);
while (chain_info &&
((chain_info->sType != VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO) || (chain_info->function != func)))
{
chain_info = reinterpret_cast<const VkLayerInstanceCreateInfo*>(chain_info->pNext);
}
return chain_info;
}
static const VkLayerDeviceCreateInfo* get_device_chain_info(const VkDeviceCreateInfo* pCreateInfo, VkLayerFunction func)
{
const VkLayerDeviceCreateInfo* chain_info = reinterpret_cast<const VkLayerDeviceCreateInfo*>(pCreateInfo->pNext);
while (chain_info &&
((chain_info->sType != VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO) || (chain_info->function != func)))
{
chain_info = reinterpret_cast<const VkLayerDeviceCreateInfo*>(chain_info->pNext);
}
return chain_info;
}
static std::mutex instance_handles_lock;
static std::unordered_map<const void*, VkInstance> instance_handles;
static void add_instance_handle(VkInstance instance)
{
// Store the instance for use with vkCreateDevice.
std::lock_guard<std::mutex> lock(instance_handles_lock);
instance_handles[encode::GetDispatchKey(instance)] = instance;
}
static VkInstance get_instance_handle(const void* handle)
{
std::lock_guard<std::mutex> lock(instance_handles_lock);
auto entry = instance_handles.find(encode::GetDispatchKey(handle));
return (entry != instance_handles.end()) ? entry->second : VK_NULL_HANDLE;
}
// The GetPhysicalDeviceProcAddr of the next layer in the chain.
// Retrieved during instance creation and forwarded to by this layer's
// GetPhysicalDeviceProcAddr() after unwrapping its VkInstance parameter.
static std::mutex gpdpa_lock;
static std::unordered_map<VkInstance, PFN_GetPhysicalDeviceProcAddr> next_gpdpa;
static void set_instance_next_gpdpa(const VkInstance instance, PFN_GetPhysicalDeviceProcAddr p_next_gpdpa)
{
GFXRECON_ASSERT(instance != VK_NULL_HANDLE);
std::lock_guard<std::mutex> lock(gpdpa_lock);
next_gpdpa[instance] = p_next_gpdpa;
}
static PFN_GetPhysicalDeviceProcAddr get_instance_next_gpdpa(const VkInstance instance)
{
GFXRECON_ASSERT(instance != VK_NULL_HANDLE);
std::lock_guard<std::mutex> lock(gpdpa_lock);
auto it_gpdpa = next_gpdpa.find(instance);
if (it_gpdpa == next_gpdpa.end())
{
return nullptr;
}
return it_gpdpa->second;
}
VKAPI_ATTR VkResult VKAPI_CALL dispatch_CreateInstance(const VkInstanceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkInstance* pInstance)
{
VkResult result = VK_ERROR_INITIALIZATION_FAILED;
VkLayerInstanceCreateInfo* chain_info =
const_cast<VkLayerInstanceCreateInfo*>(get_instance_chain_info(pCreateInfo, VK_LAYER_LINK_INFO));
if (chain_info && chain_info->u.pLayerInfo)
{
PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr;
if (fpGetInstanceProcAddr)
{
PFN_vkCreateInstance fpCreateInstance =
reinterpret_cast<PFN_vkCreateInstance>(fpGetInstanceProcAddr(VK_NULL_HANDLE, "vkCreateInstance"));
if (fpCreateInstance)
{
// Advance the link info for the next element on the chain
auto pLayerInfo = chain_info->u.pLayerInfo;
chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext;
result = fpCreateInstance(pCreateInfo, pAllocator, pInstance);
if ((result == VK_SUCCESS) && pInstance && (*pInstance != nullptr))
{
add_instance_handle(*pInstance);
VkInstance unwrapped_instance = *pInstance;
encode::VulkanCaptureManager* manager = encode::VulkanCaptureManager::Get();
assert(manager != nullptr);
manager->InitVkInstance(pInstance, fpGetInstanceProcAddr);
// Register the next layer's GetPhysicalDeviceProcAddr func only after *pInstance
// has been updated to our wrapper in manager->InitVkInstance() above:
auto fpNextGetPhysicalDeviceProcAddr = reinterpret_cast<PFN_GetPhysicalDeviceProcAddr>(
fpGetInstanceProcAddr(unwrapped_instance, "vk_layerGetPhysicalDeviceProcAddr"));
set_instance_next_gpdpa(*pInstance, fpNextGetPhysicalDeviceProcAddr);
}
}
}
}
return result;
}
VKAPI_ATTR VkResult VKAPI_CALL dispatch_CreateDevice(VkPhysicalDevice physicalDevice,
const VkDeviceCreateInfo* pCreateInfo,
const VkAllocationCallbacks* pAllocator,
VkDevice* pDevice)
{
VkResult result = VK_ERROR_INITIALIZATION_FAILED;
VkLayerDeviceCreateInfo* chain_info =
const_cast<VkLayerDeviceCreateInfo*>(get_device_chain_info(pCreateInfo, VK_LAYER_LINK_INFO));
if (chain_info && chain_info->u.pLayerInfo)
{
VkInstance layer_instance = get_instance_handle(physicalDevice);
PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr;
PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr;
if (fpGetInstanceProcAddr && fpGetDeviceProcAddr && layer_instance)
{
PFN_vkCreateDevice fpCreateDevice =
reinterpret_cast<PFN_vkCreateDevice>(fpGetInstanceProcAddr(layer_instance, "vkCreateDevice"));
if (fpCreateDevice)
{
// Advance the link info for the next element on the chain
chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext;
result = fpCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice);
if ((result == VK_SUCCESS) && pDevice && (*pDevice != nullptr))
{
encode::VulkanCaptureManager* manager = encode::VulkanCaptureManager::Get();
assert(manager != nullptr);
manager->InitVkDevice(pDevice, fpGetDeviceProcAddr);
}
}
}
}
return result;
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetInstanceProcAddr(VkInstance instance, const char* pName)
{
PFN_vkVoidFunction result = nullptr;
// This is required by the loader and is called directly with an "instance" actually
// set to the internal "loader_instance". Detect that case and return
if (!strcmp(pName, "vkCreateInstance"))
{
return reinterpret_cast<PFN_vkVoidFunction>(encode::CreateInstance);
}
if (instance != VK_NULL_HANDLE)
{
auto table = encode::GetInstanceTable(instance);
if ((table != nullptr) && (table->GetInstanceProcAddr != nullptr))
{
result = table->GetInstanceProcAddr(encode::GetWrappedHandle(instance), pName);
}
}
if ((result != nullptr) || (instance == VK_NULL_HANDLE))
{
// Only check for a layer implementation of the requested function if it is available from the next level, or if
// the instance handle is null and we can't determine if it is available from the next level.
const auto entry = func_table.find(pName);
if (entry != func_table.end())
{
result = entry->second;
}
}
return result;
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetDeviceProcAddr(VkDevice device, const char* pName)
{
PFN_vkVoidFunction result = nullptr;
if (device != VK_NULL_HANDLE)
{
auto table = encode::GetDeviceTable(device);
if ((table != nullptr) && (table->GetDeviceProcAddr != nullptr))
{
result = table->GetDeviceProcAddr(encode::GetWrappedHandle(device), pName);
if (result != nullptr)
{
// Only check for a layer implementation of the requested function if it is available from the next
// level.
const auto entry = func_table.find(pName);
if (entry != func_table.end())
{
result = entry->second;
}
}
}
}
return result;
}
/**
* We don't actually need to do anything for this function,
* but we do need to unwrap the instance before the downstream layer
* sees it.
*/
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance ourInstanceWrapper, const char* pName)
{
PFN_vkVoidFunction result = nullptr;
if (ourInstanceWrapper != VK_NULL_HANDLE)
{
const VkInstance nextLayersInstance = encode::GetWrappedHandle<VkInstance>(ourInstanceWrapper);
PFN_GetPhysicalDeviceProcAddr next_gpdpa = get_instance_next_gpdpa(ourInstanceWrapper);
if (next_gpdpa != nullptr)
{
result = next_gpdpa(nextLayersInstance, pName);
}
}
return result;
}
VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties)
{
VkResult result = VK_SUCCESS;
if ((pLayerName != nullptr) && (util::platform::StringCompare(pLayerName, kLayerProps.layerName) == 0))
{
if (pPropertyCount != nullptr)
{
uint32_t extension_count = static_cast<uint32_t>(kDeviceExtensionProps.size());
if (pProperties == nullptr)
{
*pPropertyCount = extension_count;
}
else
{
if ((*pPropertyCount) < extension_count)
{
result = VK_INCOMPLETE;
extension_count = *pPropertyCount;
}
else if ((*pPropertyCount) > extension_count)
{
*pPropertyCount = extension_count;
}
for (uint32_t i = 0; i < extension_count; ++i)
{
pProperties[i] = kDeviceExtensionProps[i];
}
}
}
}
else
{
// If this function was not called with the layer's name, we expect to dispatch down the chain to obtain the ICD
// provided extensions.
// In order to screen out unsupported extensions, we always query the chain
// twice, and remove those that are present from the count.
auto instance_table = encode::GetInstanceTable(physicalDevice);
auto wrapped_device = encode::GetWrappedHandle(physicalDevice);
uint32_t downstream_property_count = 0;
result = instance_table->EnumerateDeviceExtensionProperties(
wrapped_device, pLayerName, &downstream_property_count, nullptr);
if (result != VK_SUCCESS)
{
return result;
}
std::vector<VkExtensionProperties> downstream_properties(downstream_property_count);
result = instance_table->EnumerateDeviceExtensionProperties(
wrapped_device, pLayerName, &downstream_property_count, downstream_properties.data());
if (result != VK_SUCCESS)
{
return result;
}
remove_extensions(downstream_properties,
kUnsupportedDeviceExtensions,
std::end(kUnsupportedDeviceExtensions) - std::begin(kUnsupportedDeviceExtensions));
// Output the reduced count or the reduced extension list:
if (pProperties == nullptr)
{
*pPropertyCount = static_cast<uint32_t>(downstream_properties.size());
}
else
{
if (*pPropertyCount < static_cast<uint32_t>(downstream_properties.size()))
{
result = VK_INCOMPLETE;
}
*pPropertyCount = std::min(*pPropertyCount, static_cast<uint32_t>(downstream_properties.size()));
std::copy(downstream_properties.begin(), downstream_properties.begin() + *pPropertyCount, pProperties);
}
}
return result;
}
VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceExtensionProperties(const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties)
{
VkResult result = VK_SUCCESS;
if (pLayerName && (util::platform::StringCompare(pLayerName, kLayerProps.layerName) == 0))
{
if (pPropertyCount != nullptr)
{
*pPropertyCount = 0;
}
}
else
{
result = VK_ERROR_LAYER_NOT_PRESENT;
}
return result;
}
VKAPI_ATTR VkResult VKAPI_CALL EnumerateInstanceLayerProperties(uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
{
VkResult result = VK_SUCCESS;
if (pProperties == nullptr)
{
if (pPropertyCount != nullptr)
{
*pPropertyCount = 1;
}
}
else
{
if ((pPropertyCount != nullptr) && (*pPropertyCount >= 1))
{
util::platform::MemoryCopy(pProperties, sizeof(*pProperties), &kLayerProps, sizeof(kLayerProps));
*pPropertyCount = 1;
}
else
{
result = VK_INCOMPLETE;
}
}
return result;
}
VKAPI_ATTR VkResult VKAPI_CALL EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
{
GFXRECON_UNREFERENCED_PARAMETER(physicalDevice);
return EnumerateInstanceLayerProperties(pPropertyCount, pProperties);
}
GFXRECON_END_NAMESPACE(gfxrecon)
// To be safe, we extern "C" these items to remove name mangling for all the items we want to export for Android and old
// loaders to find.
extern "C"
{
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface* pVersionStruct)
{
assert(pVersionStruct != NULL);
assert(pVersionStruct->sType == LAYER_NEGOTIATE_INTERFACE_STRUCT);
// Fill in the function pointers if our version is at least capable of having the structure contain them.
if (pVersionStruct->loaderLayerInterfaceVersion >= 2)
{
pVersionStruct->pfnGetInstanceProcAddr = gfxrecon::GetInstanceProcAddr;
pVersionStruct->pfnGetDeviceProcAddr = gfxrecon::GetDeviceProcAddr;
pVersionStruct->pfnGetPhysicalDeviceProcAddr = gfxrecon::GetPhysicalDeviceProcAddr;
}
if (pVersionStruct->loaderLayerInterfaceVersion > CURRENT_LOADER_LAYER_INTERFACE_VERSION)
{
pVersionStruct->loaderLayerInterfaceVersion = CURRENT_LOADER_LAYER_INTERFACE_VERSION;
}
return VK_SUCCESS;
}
// The following two functions are not directly invoked by the desktop loader, which instead uses the function
// pointers returned by the negotiate function.
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
const char* pName)
{
return gfxrecon::GetInstanceProcAddr(instance, pName);
}
VK_LAYER_EXPORT VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetDeviceProcAddr(VkDevice device, const char* pName)
{
return gfxrecon::GetDeviceProcAddr(device, pName);
}
// The following four functions are not invoked by the desktop loader, which retrieves the layer specific properties
// and extensions from both the layer's JSON file and during the negotiation process.
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL
vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
const char* pLayerName,
uint32_t* pPropertyCount,
VkExtensionProperties* pProperties)
{
assert(physicalDevice == VK_NULL_HANDLE);
return gfxrecon::EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceExtensionProperties(
const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties)
{
return gfxrecon::EnumerateInstanceExtensionProperties(pLayerName, pPropertyCount, pProperties);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
{
return gfxrecon::EnumerateInstanceLayerProperties(pPropertyCount, pProperties);
}
VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
uint32_t* pPropertyCount,
VkLayerProperties* pProperties)
{
assert(physicalDevice == VK_NULL_HANDLE);
return gfxrecon::EnumerateDeviceLayerProperties(physicalDevice, pPropertyCount, pProperties);
}
} // extern "C"
|