aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/vulkan.c
Commit message (Collapse)AuthorAgeFilesLines
...
* hwcontext_vulkan: fix planar RGB imagesLynne2024-11-181-7/+20
| | | | They were non-working for quite a while.
* avutil/hwcontext_vulkan: add missing packed YUV444 format mappingsJames Almer2024-10-271-1/+3
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avutil/hwcontext_vulkan: add support for AV_PIX_FMT_Y216James Almer2024-10-231-0/+1
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* vulkan: move alignment of host-visible allocations outside of ff_vk_alloc_memLynne2024-10-231-6/+3
| | | | | The issue is that if dedicated allocation is used, VkBufferCreateInfo.size and the actual allocated size mismatched, which is a validation error.
* vulkan: move buffer allocation av_log messageLynne2024-10-181-3/+4
| | | | | Its more useful when buffers are allocated, not in the pool.
* vulkan: do not create imageviews with video encode/decode usageLynne2024-10-161-1/+8
| | | | | | | | | | This function is only used for filtering and generic compute. The issue is that a view inherits the usage flags from the image by default, and the spec says the view format must be compatible with the usage. VkImageViewUsageCreateInfo allows us to filter out the indeded uses of the imageview. Pffff.
* vulkan: enable selecting a compatible representation of formatLynne2024-10-161-2/+96
| | | | | | | | | When using **integer** images inside shaders, it turns out that conversion doesn't automatically happen, but we need to explicitly use the imageviews to get the image exposed as a suitable representation for the shader. Finally enables bitexact image representations.
* vulkan: keep track of mapped memory in the buffer structureLynne2024-10-151-2/+4
| | | | Can/could be useful to know which buffers are mapped.
* vulkan: add support for AV_PIX_FMT_RGB96Lynne2024-10-151-1/+2
|
* vulkan: add support for AV_PIX_FMT_RGBA128Lynne2024-10-151-1/+11
|
* avutil/hwcontext_vulkan: add proper maps for XV3{0,6}James Almer2024-10-141-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* vulkan: fix layout qualifiers for 32-bit RGBA float storage repsLynne2024-10-121-2/+2
| | | | | | | | r8 r16/r16f r32f Sure, GLSL. Makes sense.
* hwcontext_vulkan: add support for AV_PIX_FMT_RGBF32Lynne2024-10-111-1/+2
|
* hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32Lynne2024-10-111-1/+11
|
* vulkan: use correct signed image type for storage imagesLynne2024-10-111-2/+15
| | | | | Using signed or unsigned integer formats/layouts requires that "uimage" or "iimage" are used.
* vulkan: extend ff_vk_shader_rep_fmt to be useful for bitexactnessLynne2024-10-111-4/+126
| | | | | | | | The original either reported 8 or 16-bit conversion from the original, rather than being able to return the actual original. This makes it usable in a situation where preserving exactness is required.
* vulkan: fix ImageView flexible array struct allocationLynne2024-10-091-2/+3
| | | | | Same as the previous commit, the compiler may insert padding. Thanks to Marvin Scholz for pointing this out.
* libavutil/vulkan: fix flexible array struct allocationMarvin Scholz2024-10-091-1/+1
| | | | | | The flexible array member struct can have padding added by the compiler which was not taken into account properly, which could lead to a heap buffer overflow.
* vulkan: add a #define when printf debugging is enabledLynne2024-10-091-1/+3
|
* vulkan: always enable GL_EXT_control_flow_attributesLynne2024-10-061-0/+1
|
* vulkan: always enable GL_EXT_shader_explicit_arithmetic_typesLynne2024-10-061-0/+1
| | | | | Implicit types were a mistake. lowp/mediump/highp was a sin.
* libavutil/vulkan: Prevent crash on shaders with no descriptorsIndecisiveTurtle2024-10-061-2/+2
| | | | Needed to prevent crashes on vc2 vulkan encoder patch
* vulkan: add profiling debug settingLynne2024-10-041-1/+2
| | | | | This simply keeps all shader optimizations, but allows debug data to be generated.
* vulkan: don't enable GL_EXT_buffer_reference by defaultLynne2024-10-041-2/+0
| | | | Only nlmeans_vulkan uses it.
* vulkan: parse instance list and add the DEBUG_UTILS extensionLynne2024-10-041-0/+2
| | | | Required to let users know whether debugging is active.
* hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instructionLynne2024-10-041-0/+2
|
* vulkan: always enable GL_EXT_scalar_block_layoutLynne2024-10-041-0/+1
| | | | | | This makes std430 (which we use everywhere already) fully match C layout. Extension was made mandatory in 1.2.
* vulkan: check if current buffer has finished execution before picking anotherLynne2024-10-041-4/+11
| | | | | This saves resources, as dependencies are freed/reclaimed with a lower latency, and provies a speedup.
* vulkan: use shader objects if supportedLynne2024-10-041-3/+54
| | | | Shader objects finally allow completely independent shaders.
* vulkan: move shader data execution state to execution poolsLynne2024-10-041-54/+103
| | | | | This finally permits using fully compiled shaders across multiple execution contexts.
* vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShaderLynne2024-10-041-282/+344
| | | | | | | Pipelines are just shaders. There's no reason to treat them differently. This also lets us implement shader objects and is an overall cleanup.
* vulkan: use push descriptors where possibleLynne2024-09-231-41/+83
| | | | | | | | Push descriptors are in theory slightly faster, but come with limitations for which we have to check. Either way, they're not difficult to implement, so even though no one should be using peasant-tier descriptors, do it anyway.
* vulkan: add support for regular descriptor poolsLynne2024-09-231-114/+271
| | | | | | | | | | | | | This permits: - The use of Vulkan filtering on many more devices - Better debugging due to lack of descriptor buffer support in layers Much of the changes here are due to a requirement that updates to descriptors must happen between the command buffer being waited on, and the pipeline not being bound. We routinely did it the other way around, by updating only after we bind the pipeline.
* vulkan: separate out descriptor layouts from setsLynne2024-09-231-16/+19
| | | | Just avoids a single temporary allocation.
* vulkan: add ff_vk_exec_add_dep_bool_semLynne2024-09-221-10/+98
| | | | | This function simply takes in a binary semaphore as a dependency to an execution.
* vulkan: flexibly allocate temporary imageviewsLynne2024-09-221-3/+4
| | | | No reason to allocate 16 when 3 will do.
* hwcontext_vulkan: add support for x2bgr10 and proper DRM mappings for 10-bit ↵Lynne2024-09-161-1/+2
| | | | | | images This allows mapping of 10-bit DRM images.
* vulkan(_decode): fix, simplify and improve queriesLynne2024-09-091-35/+8
| | | | | | | | | | | The old query code never worked properly, and did some hideous heuristics to read the status bit, and work that into a return code. This is all best left to callers to do, which simplifies our code a lot. This also fixes minor validation errors regarding calling queries which are not in their active state.
* vulkan: add a ff_vk_init functionLynne2024-09-091-1/+56
| | | | | This function sets the class correctly, and calls functions that all users have to call anyway.
* vulkan: error out if query is called without being initializedLynne2024-09-091-0/+5
|
* vulkan: use correct return codes for query errorsLynne2024-09-091-1/+1
|
* vulkan: make sure descriptor buffers are always DEVICE_LOCALLynne2024-08-131-0/+1
| | | | | Implementations are required to list memory heaps in the most optimal order. But its better to be explicit for this particular allocation.
* vulkan: load queue families upon loading propertiesLynne2024-08-111-18/+23
| | | | | Avoids the need to call ff_vk_qf_init if manually filling in a queue family structure.
* vulkan: add support for encode feedback queriesLynne2024-08-111-10/+16
|
* vulkan: use allocator callback for buffer creationLynne2024-08-111-1/+1
| | | | This would've let to a segfault if custom allocators were used.
* hwcontext_vulkan: rewrite upload/downloadLynne2024-08-111-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was long overdue. The old transfer dubiously tried to merge as much code as possible, and had very little in the way of optimizations, apart from basic host-mapping. The new code uses buffer pools for any temporary bufflers, and handles falling back to buffer-based uploads if host-mapping fails. Roundtrip performance difference: ffmpeg -init_hw_device "vulkan=vk:0,debug=0,disable_multiplane=1" -f lavfi \ -i color=red:s=3840x2160 -vf hwupload,hwdownload,format=yuv420p -f null - 7900XTX: Before: 224fps After: 502fps Ada, with proprietary drivers: Before: 29fps After: 54fps Alder Lake: Before: 85fps After: 108fps With the host-mapping codepath disabled: Before: 32fps After: 51fps
* hwcontext_vulkan: initialize optical flow queues if availableLynne2024-08-111-1/+5
| | | | Lets us implement FPS conversion.
* vulkan: use the new queue family mechanismLynne2024-08-111-48/+20
|
* vulkan: rename read_only to singularLynne2024-07-141-5/+5
| | | | | | | | | There's nothing stopping users from writing to such buffers. Its more accurate to say they are singular, i.e. not duplicated between multiple submissions. This can be helpful for global statistics, or error propagation purposes.
* vulkan: set VkDescriptorAddressInfoEXT.sTypeLynne2024-07-141-0/+1
| | | | | This was not done, resulting in validation issues, and potential driver issues.