From 51b7fe81be5892b0c2590443b3ff2d684878a83c Mon Sep 17 00:00:00 2001 From: Lynne Date: Tue, 14 Mar 2023 21:38:55 +0100 Subject: [PATCH] hwcontext_vulkan: enable additional device properties --- libavutil/hwcontext_vulkan.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index ff2cde2dd6..93b6c6de4b 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1248,6 +1248,8 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, COPY_FEATURE(hwctx->device_features, fragmentStoresAndAtomics) COPY_FEATURE(hwctx->device_features, vertexPipelineStoresAndAtomics) COPY_FEATURE(hwctx->device_features, shaderInt64) + COPY_FEATURE(hwctx->device_features, shaderInt16) + COPY_FEATURE(hwctx->device_features, shaderFloat64) #undef COPY_FEATURE /* We require timeline semaphores */ @@ -1256,10 +1258,27 @@ static int vulkan_device_create_internal(AVHWDeviceContext *ctx, err = AVERROR(ENOSYS); goto end; } + + p->device_features_1_1.samplerYcbcrConversion = dev_features_1_1.samplerYcbcrConversion; + p->device_features_1_1.storagePushConstant16 = dev_features_1_1.storagePushConstant16; + p->device_features_1_2.timelineSemaphore = 1; p->device_features_1_2.bufferDeviceAddress = dev_features_1_2.bufferDeviceAddress; - p->device_features_1_1.samplerYcbcrConversion = dev_features_1_1.samplerYcbcrConversion; + p->device_features_1_2.storagePushConstant8 = dev_features_1_2.storagePushConstant8; + p->device_features_1_2.shaderInt8 = dev_features_1_2.shaderInt8; + p->device_features_1_2.storageBuffer8BitAccess = dev_features_1_2.storageBuffer8BitAccess; + p->device_features_1_2.uniformAndStorageBuffer8BitAccess = dev_features_1_2.uniformAndStorageBuffer8BitAccess; + p->device_features_1_2.shaderFloat16 = dev_features_1_2.shaderFloat16; + p->device_features_1_2.shaderSharedInt64Atomics = dev_features_1_2.shaderSharedInt64Atomics; + p->device_features_1_2.vulkanMemoryModel = dev_features_1_2.vulkanMemoryModel; + p->device_features_1_2.vulkanMemoryModelDeviceScope = dev_features_1_2.vulkanMemoryModelDeviceScope; + p->device_features_1_2.hostQueryReset = dev_features_1_2.hostQueryReset; + p->device_features_1_3.synchronization2 = dev_features_1_3.synchronization2; + p->device_features_1_3.computeFullSubgroups = dev_features_1_3.computeFullSubgroups; + p->device_features_1_3.shaderZeroInitializeWorkgroupMemory = dev_features_1_3.shaderZeroInitializeWorkgroupMemory; + p->device_features_1_3.dynamicRendering = dev_features_1_3.dynamicRendering; + p->desc_buf_features.descriptorBuffer = desc_buf_features.descriptorBuffer; p->desc_buf_features.descriptorBufferPushDescriptors = desc_buf_features.descriptorBufferPushDescriptors;