Message ID | 20230820183544.239058-1-spencercw@gmail.com |
---|---|
State | Accepted |
Commit | f0b1cab53816aa53b78e63d3c53d02aa2a081820 |
Headers | show |
Series | [FFmpeg-devel] hwcontext_vulkan: always use create_pnext in vulkan_pool_alloc | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
Aug 20, 2023, 20:36 by spencercw@gmail.com: > Currently, create_pnext is only used if an applicable external memory > extension is enabled. This will usually the case when used from the command > line, but may not be when the Vulkan context is created manually. > > For images used in video decoding, create_pnext contains the video profile > list, which is mandatory.[1] This fixes a GPU crash when using RADV. > > [1] https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageCreateInfo.html#VUID-VkImageCreateInfo-usage-04815 > > Signed-off-by: Chris Spencer <spencercw@gmail.com> > --- > libavutil/hwcontext_vulkan.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c > index 75314f1407..54faf16a69 100644 > --- a/libavutil/hwcontext_vulkan.c > +++ b/libavutil/hwcontext_vulkan.c > @@ -2179,7 +2179,8 @@ static AVBufferRef *vulkan_pool_alloc(void *opaque, size_t size) > } > > err = create_frame(hwfc, &f, hwctx->tiling, hwctx->usage, hwctx->img_flags, > - hwctx->nb_layers, eiinfo.handleTypes ? &eiinfo : NULL); > + hwctx->nb_layers, > + eiinfo.handleTypes ? &eiinfo : hwctx->create_pnext); > if (err) > return NULL; > Thanks, pushed.
diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 75314f1407..54faf16a69 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2179,7 +2179,8 @@ static AVBufferRef *vulkan_pool_alloc(void *opaque, size_t size) } err = create_frame(hwfc, &f, hwctx->tiling, hwctx->usage, hwctx->img_flags, - hwctx->nb_layers, eiinfo.handleTypes ? &eiinfo : NULL); + hwctx->nb_layers, + eiinfo.handleTypes ? &eiinfo : hwctx->create_pnext); if (err) return NULL;
Currently, create_pnext is only used if an applicable external memory extension is enabled. This will usually the case when used from the command line, but may not be when the Vulkan context is created manually. For images used in video decoding, create_pnext contains the video profile list, which is mandatory.[1] This fixes a GPU crash when using RADV. [1] https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkImageCreateInfo.html#VUID-VkImageCreateInfo-usage-04815 Signed-off-by: Chris Spencer <spencercw@gmail.com> --- libavutil/hwcontext_vulkan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)