Skip to content

Commit

Permalink
build: Fix Windows Test ICD build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aqnuep committed Jul 4, 2024
1 parent b523ab6 commit 301c522
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/icd/test_icd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceDisplayPropertiesKHR(VkPh
return VK_SUCCESS;
}

#ifndef VULKANSC // Vulkan SC does not support Vulkan Video
static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice,
const VkVideoProfileInfoKHR* pVideoProfile,
VkVideoCapabilitiesKHR* pCapabilities) {
Expand Down Expand Up @@ -1606,6 +1607,7 @@ GetVideoSessionMemoryRequirementsKHR(VkDevice device, VkVideoSessionKHR videoSes
}
return VK_SUCCESS;
}
#endif // VULKANSC

static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures2* pFeatures) {
Expand Down Expand Up @@ -2093,6 +2095,7 @@ GetPhysicalDeviceFragmentShadingRatesKHR(VkPhysicalDevice physicalDevice, uint32
return VK_SUCCESS;
}

#ifndef VULKANSC // Vulkan SC does not support VK_KHR_map_memory2
static VKAPI_ATTR VkResult VKAPI_CALL MapMemory2KHR(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) {
return MapMemory(device, pMemoryMapInfo->memory, pMemoryMapInfo->offset, pMemoryMapInfo->size, pMemoryMapInfo->flags, ppData);
}
Expand All @@ -2101,7 +2104,9 @@ static VKAPI_ATTR VkResult VKAPI_CALL UnmapMemory2KHR(VkDevice device, const VkM
UnmapMemory(device, pMemoryUnmapInfo->memory);
return VK_SUCCESS;
}
#endif // VULKANSC

#ifndef VULKANSC // Vulkan SC does not support VK_KHR_cooperative_matrix
static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixPropertiesKHR(
VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkCooperativeMatrixPropertiesKHR* pProperties) {
if (!pProperties) {
Expand All @@ -2123,6 +2128,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCooperativeMatrixProperti
}
return VK_SUCCESS;
}
#endif // VULKANSC

static VKAPI_ATTR VkResult VKAPI_CALL GetPhysicalDeviceCalibrateableTimeDomainsKHR(VkPhysicalDevice physicalDevice,
uint32_t* pTimeDomainCount,
Expand Down Expand Up @@ -2171,13 +2177,15 @@ static VKAPI_ATTR void VKAPI_CALL GetPhysicalDeviceMultisamplePropertiesEXT(VkPh
}
}

#ifndef VULKANSC // Vulkan SC does not support VK_NV_ray_tracing
static VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureMemoryRequirementsNV(
VkDevice device, const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo, VkMemoryRequirements2KHR* pMemoryRequirements) {
// arbitrary
pMemoryRequirements->memoryRequirements.size = 4096;
pMemoryRequirements->memoryRequirements.alignment = 1;
pMemoryRequirements->memoryRequirements.memoryTypeBits = 0xFFFF;
}
#endif // VULKANSC

static VKAPI_ATTR VkResult VKAPI_CALL
GetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void* pHostPointer,
Expand All @@ -2186,12 +2194,15 @@ GetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFla
return VK_SUCCESS;
}

#ifndef VULKANSC // Vulkan SC does not support VK_EXT_descriptor_buffer
static VKAPI_ATTR void VKAPI_CALL GetDescriptorSetLayoutSizeEXT(VkDevice device, VkDescriptorSetLayout layout,
VkDeviceSize* pLayoutSizeInBytes) {
// Need to give something non-zero
*pLayoutSizeInBytes = 4;
}
#endif // VULKANSC

#ifndef VULKANSC // Vulkan SC does not support VK_EXT_shader_module_identifier
static VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT(VkDevice device, VkShaderModule shaderModule,
VkShaderModuleIdentifierEXT* pIdentifier) {
if (pIdentifier) {
Expand All @@ -2200,7 +2211,9 @@ static VKAPI_ATTR void VKAPI_CALL GetShaderModuleIdentifierEXT(VkDevice device,
pIdentifier->identifier[0] = 0x01;
}
}
#endif // VULKANSC

#ifndef VULKANSC // Vulkan SC does not support VK_KHR_ray_tracing
static VKAPI_ATTR VkDeviceAddress VKAPI_CALL
GetAccelerationStructureDeviceAddressKHR(VkDevice device, const VkAccelerationStructureDeviceAddressInfoKHR* pInfo) {
// arbitrary - need to be aligned to 256 bytes
Expand All @@ -2215,6 +2228,7 @@ static VKAPI_ATTR void VKAPI_CALL GetAccelerationStructureBuildSizesKHR(
pSizeInfo->updateScratchSize = 4;
pSizeInfo->buildScratchSize = 4;
}
#endif // VULKANSC

static VKAPI_ATTR VkResult VKAPI_CALL RegisterDisplayEventEXT(VkDevice device, VkDisplayKHR display,
const VkDisplayEventInfoEXT* pDisplayEventInfo,
Expand Down

0 comments on commit 301c522

Please sign in to comment.