Lynne
aad40fed33
vulkan: fix sw_frame_deps counter
...
The code used as a basis was the buffer dependency code, where the
counter was incremented after each buffer, but for the sw_frame dep
API, we only support adding individual frames at a time.
3 months ago
Lynne
1876026f83
vulkan: add ff_vk_exec_add_dep_sw_frame
...
Some software frames may be mapped, and we'd like to have
them as proper dependencies.
3 months ago
Lynne
c918b42dcd
vulkan: retrieve Vulkan 1.1 properties
...
Required to know the subgroup size.
3 months ago
Lynne
16fa710340
vulkan: fix printing descriptors to shader for shaders with no descriptors
3 months ago
Lynne
a516b2da22
vulkan: add support for 10-bit planar RGB
3 months ago
Lynne
eb8f3b8460
hwcontext_vulkan: fix planar RGB images
...
They were non-working for quite a while.
3 months ago
James Almer
bb57b78013
avutil/hwcontext_vulkan: add missing packed YUV444 format mappings
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 months ago
James Almer
5c622d4cc1
avutil/hwcontext_vulkan: add support for AV_PIX_FMT_Y216
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 months ago
Lynne
9eb7e8d2a4
vulkan: move alignment of host-visible allocations outside of ff_vk_alloc_mem
...
The issue is that if dedicated allocation is used, VkBufferCreateInfo.size
and the actual allocated size mismatched, which is a validation error.
4 months ago
Lynne
dfaade76db
vulkan: move buffer allocation av_log message
...
Its more useful when buffers are allocated, not in the
pool.
4 months ago
Lynne
931d45d4d6
vulkan: do not create imageviews with video encode/decode usage
...
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.
4 months ago
Lynne
4b128de44a
vulkan: enable selecting a compatible representation of format
...
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.
4 months ago
Lynne
98f6d43146
vulkan: keep track of mapped memory in the buffer structure
...
Can/could be useful to know which buffers are mapped.
4 months ago
Lynne
3afdfe830f
vulkan: add support for AV_PIX_FMT_RGB96
4 months ago
Lynne
903f7f053a
vulkan: add support for AV_PIX_FMT_RGBA128
4 months ago
James Almer
fd8b0dcfed
avutil/hwcontext_vulkan: add proper maps for XV3{0,6}
...
Signed-off-by: James Almer <jamrial@gmail.com>
4 months ago
Lynne
0e19b05375
vulkan: fix layout qualifiers for 32-bit RGBA float storage reps
...
r8
r16/r16f
r32f
Sure, GLSL. Makes sense.
4 months ago
Lynne
168e8ae9bf
hwcontext_vulkan: add support for AV_PIX_FMT_RGBF32
4 months ago
Lynne
d55a351741
hwcontext_vulkan: add support for AV_PIX_FMT_RGBAF32
4 months ago
Lynne
1addd0fdca
vulkan: use correct signed image type for storage images
...
Using signed or unsigned integer formats/layouts requires that
"uimage" or "iimage" are used.
4 months ago
Lynne
c982376076
vulkan: extend ff_vk_shader_rep_fmt to be useful for bitexactness
...
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.
4 months ago
Lynne
80a0567a2f
vulkan: fix ImageView flexible array struct allocation
...
Same as the previous commit, the compiler may insert padding.
Thanks to Marvin Scholz for pointing this out.
4 months ago
Marvin Scholz
f5e2914a89
libavutil/vulkan: fix flexible array struct allocation
...
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.
4 months ago
Lynne
b8d1b4358b
vulkan: add a #define when printf debugging is enabled
4 months ago
Lynne
6871fd3170
vulkan: always enable GL_EXT_control_flow_attributes
4 months ago
Lynne
8c250da8f3
vulkan: always enable GL_EXT_shader_explicit_arithmetic_types
...
Implicit types were a mistake.
lowp/mediump/highp was a sin.
4 months ago
IndecisiveTurtle
d80676117a
libavutil/vulkan: Prevent crash on shaders with no descriptors
...
Needed to prevent crashes on vc2 vulkan encoder patch
4 months ago
Lynne
a304cbeb8d
vulkan: add profiling debug setting
...
This simply keeps all shader optimizations, but allows debug
data to be generated.
4 months ago
Lynne
832947be02
vulkan: don't enable GL_EXT_buffer_reference by default
...
Only nlmeans_vulkan uses it.
4 months ago
Lynne
356d1cc8ff
vulkan: parse instance list and add the DEBUG_UTILS extension
...
Required to let users know whether debugging is active.
4 months ago
Lynne
535e5eb7f3
hwcontext_vulkan: enable VK_KHR_shader_relaxed_extended_instruction
4 months ago
Lynne
d80f9f55c8
vulkan: always enable GL_EXT_scalar_block_layout
...
This makes std430 (which we use everywhere already) fully match C
layout.
Extension was made mandatory in 1.2.
4 months ago
Lynne
37d5cb84e8
vulkan: check if current buffer has finished execution before picking another
...
This saves resources, as dependencies are freed/reclaimed with a lower latency,
and provies a speedup.
4 months ago
Lynne
877c5a9692
vulkan: use shader objects if supported
...
Shader objects finally allow completely independent shaders.
4 months ago
Lynne
d233d9902f
vulkan: move shader data execution state to execution pools
...
This finally permits using fully compiled shaders across
multiple execution contexts.
4 months ago
Lynne
0a37d5a3b1
vulkan: merge FFVkSPIRVShader and FFVkPipeline into FFVkShader
...
Pipelines are just shaders. There's no reason to treat them
differently.
This also lets us implement shader objects and is an overall
cleanup.
4 months ago
Lynne
bc36fe6f1f
vulkan: use push descriptors where possible
...
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.
5 months ago
Lynne
8a7af4aa49
vulkan: add support for regular descriptor pools
...
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.
5 months ago
Lynne
3d75ba7495
vulkan: separate out descriptor layouts from sets
...
Just avoids a single temporary allocation.
5 months ago
Lynne
2395444c80
vulkan: add ff_vk_exec_add_dep_bool_sem
...
This function simply takes in a binary semaphore as a dependency
to an execution.
5 months ago
Lynne
c4048013e5
vulkan: flexibly allocate temporary imageviews
...
No reason to allocate 16 when 3 will do.
5 months ago
Lynne
0fa6f33875
hwcontext_vulkan: add support for x2bgr10 and proper DRM mappings for 10-bit images
...
This allows mapping of 10-bit DRM images.
5 months ago
Lynne
5e9845f11e
vulkan(_decode): fix, simplify and improve queries
...
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.
5 months ago
Lynne
620822c0c5
vulkan: add a ff_vk_init function
...
This function sets the class correctly, and calls functions
that all users have to call anyway.
5 months ago
Lynne
06483d039a
vulkan: error out if query is called without being initialized
5 months ago
Lynne
fd86c373c2
vulkan: use correct return codes for query errors
5 months ago
Lynne
d138d7a595
vulkan: make sure descriptor buffers are always DEVICE_LOCAL
...
Implementations are required to list memory heaps in the most optimal
order. But its better to be explicit for this particular allocation.
6 months ago
Lynne
d6c08a41cb
vulkan: load queue families upon loading properties
...
Avoids the need to call ff_vk_qf_init if manually filling in
a queue family structure.
6 months ago
Lynne
83cd77563f
vulkan: add support for encode feedback queries
6 months ago
Lynne
8eac11105b
vulkan: use allocator callback for buffer creation
...
This would've let to a segfault if custom allocators were used.
6 months ago