Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x11: always prefer EGL over GLX (may break vdpau) #5298

Closed
wants to merge 1 commit into from
Closed

x11: always prefer EGL over GLX (may break vdpau) #5298

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 27, 2017

VDPAU is pretty much on its way out. It's inadequate for new video
formats such as HEVC, and has been neglected by nvidia (unfixed bugs
like broken rendering even of 8 bit HEVC). VDPAU also doesn't work on
EGL, but fortunately nvdec does.

On the other hand, AMD has support for both vdpau and vaapi. AMD+Vaapi
with libva 2 and some extensions that were added after the 2.0 release
(probably still git-only) supports full EGL interop, making vdpau
unnecessary.

The problem is that we strictly prefer GLX if the vdpau GL extension is
present. This means on AMD we will always GLX over EGL, this preferring
vdpau over vaapi. This makes the hardware decoding situation worse for
AMD.

Decide that it's time to drop the GLX probing, and always use EGL.


I don't know if everyone would agree to this. Those who prefer vdpau for whatever reasons probably won't.

This does of course not affect vo=vdpau.

@kkkrackpot
Copy link
Contributor

I'm the one who prefers VDPAU for whatever reason (namely, because CUVID/NVDEC seems somehow broken with h264)...

Anyway, it would be good to keep a way to set VDPAU+GLX explicitly.

@haasn
Copy link
Member

haasn commented Dec 27, 2017

x11egl + display-sync is broken for me (nvidia), even with swdec. It doesn't vsync properly.

Edit: The logs reveal:

[   0.051][v][vo/gpu/opengl] EGL_VERSION=1.4
[   0.051][v][vo/gpu/opengl] EGL_VENDOR=NVIDIA
[   0.051][v][vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL_ES OpenGL
[   0.051][v][vo/gpu/opengl] Trying to create Desktop OpenGL context.
[   0.083][v][vo/gpu/opengl] chose visual 0x2b
[   0.159][v][vo/gpu/opengl] GL_VERSION='4.4.0 NVIDIA 387.34'
[   0.159][v][vo/gpu/opengl] Detected desktop OpenGL 4.4.
[   0.159][v][vo/gpu/opengl] GL_VENDOR='NVIDIA Corporation'
[   0.159][v][vo/gpu/opengl] GL_RENDERER='GeForce GTX 970/PCIe/SSE2'
[   0.159][v][vo/gpu/opengl] GL_SHADING_LANGUAGE_VERSION='4.40 NVIDIA via Cg compiler'
[   0.159][d][vo/gpu/opengl] Combined OpenGL extensions string:
[   0.159][d][vo/gpu/opengl] EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_output_base EGL_EXT_stream_acquire_mode EGL_IMG_context_priority EGL_KHR_config_attribs EGL_KHR_create_context_no_error EGL_KHR_create_context EGL_KHR_display_reference EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_partial_update EGL_KHR_swap_buffers_with_damage EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_reusable_sync EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_KHR_stream_cross_process_fd EGL_KHR_stream_fifo EGL_KHR_stream_producer_eglsurface EGL_KHR_surfaceless_context EGL_NV_nvrm_fence_sync EGL_NV_post_sub_buffer EGL_NV_stream_metadata EGL_NV_stream_reset EGL_NV_stream_sync EGL_NV_stream_consumer_gltexture_yuv EGL_NV_stream_attrib EGL_NV_sync EGL_NV_system_time EGL_NV_output_drm_flip_event GL_AMD_multi_draw_indirect GL_AMD_seamless_cubemap_per_texture GL_AMD_vertex_shader_viewport_index GL_AMD_vertex_shader_layer GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_bindless_texture GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_compute_shader GL_ARB_compute_variable_group_size GL_ARB_conditional_render_inverted GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_2_compatibility GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_fragment_shader_interlock GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gl_spirv GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader_int64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_parallel_shader_compile GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_post_depth_coverage GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_locations GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_seamless_cubemap_per_texture GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_ballot GL_ARB_shader_bit_encoding GL_ARB_shader_clock GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shader_viewport_layer_array GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_sparse_buffer GL_ARB_sparse_texture GL_ARB_sparse_texture2 GL_ARB_sparse_texture_clamp GL_ARB_spirv_extensions GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_filter_anisotropic GL_ARB_texture_filter_minmax GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset_clamp GL_EXT_post_depth_coverage GL_EXT_provoking_vertex GL_EXT_raster_multisample GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects GL_EXT_separate_specular_color GL_EXT_shader_image_load_formatted GL_EXT_shader_image_load_store GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_sparse_texture2 GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_filter_minmax GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback2 GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_EXT_window_rectangles GL_EXT_import_sync_object GL_NV_robustness_video_memory_purge GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KHR_context_flush_control GL_KHR_debug GL_EXT_memory_object GL_EXT_memory_object_fd GL_KHR_parallel_shader_compile GL_KHR_no_error GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_EXT_semaphore GL_EXT_semaphore_fd GL_KTX_buffer_region GL_NV_alpha_to_coverage_dither_control GL_NV_bindless_multi_draw_indirect GL_NV_bindless_multi_draw_indirect_count GL_NV_bindless_texture GL_NV_blend_equation_advanced GL_NV_blend_equation_advanced_coherent GL_NV_blend_minmax_factor GL_NV_blend_square GL_NV_command_list GL_NV_compute_program5 GL_NV_conditional_render GL_NV_conservative_raster GL_NV_conservative_raster_dilate GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_draw_texture GL_NV_draw_vulkan_image GL_NV_ES1_1_compatibility GL_NV_ES3_1_compatibility GL_NV_explicit_multisample GL_NV_fence GL_NV_fill_rectangle GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_coverage_to_color GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_fragment_shader_interlock GL_NV_framebuffer_mixed_samples GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_geometry_shader_passthrough GL_NV_gpu_program4 GL_NV_internalformat_sample_query GL_NV_gpu_program4_1 GL_NV_gpu_program5 GL_NV_gpu_program5_mem_extended GL_NV_gpu_program_fp64 GL_NV_gpu_shader5 GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_parameter_buffer_object2 GL_NV_path_rendering GL_NV_path_rendering_shared_edge GL_NV_point_sprite GL_NV_primitive_restart GL_NV_query_resource GL_NV_query_resource_tag GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_sample_locations GL_NV_sample_mask_override_coverage GL_NV_shader_atomic_counters GL_NV_shader_atomic_float GL_NV_shader_atomic_fp16_vector GL_NV_shader_atomic_int64 GL_NV_shader_buffer_load GL_NV_shader_storage_buffer_object GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_multisample GL_NV_texture_rectangle GL_NV_texture_rectangle_compressed GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_transform_feedback2 GL_NV_uniform_buffer_unified_memory GL_NV_vertex_attrib_integer_64bit GL_NV_vertex_buffer_unified_memory GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NV_viewport_array2 GL_NV_viewport_swizzle GL_NVX_conditional_render GL_NVX_gpu_memory_info GL_NV_shader_thread_group GL_NV_shader_thread_shuffle GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum
[   0.160][v][vo/gpu/opengl] GL_*_swap_control extension missing.

Seems like it isn't finding any of the valid vsync control extensions, so it's falling back to the default/system-wide settings. (vsync disabled)

@haasn
Copy link
Member

haasn commented Dec 27, 2017

Seems like the relevant function call would be eglSwapInterval (https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglSwapInterval.xhtml) which is never probed from opengl/common.c.

Fuck knows what versions of EGL have it / what extensions are required, the documentation doesn't say

@ghost
Copy link
Author

ghost commented Dec 27, 2017

Works perfectly fine for me. Seems like you have vsync disabled in the nvidia control panel or so. The official default for EGL swap interval is 1 AFAIK, so mpv doesn't try to set it (or even hook it up in any way).

Copy link
Member

@kevmitch kevmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to be getting rid of the weird x11_probe context. For those skeptical, note that this doesn't remove vdpau+glx interop. It just doesn't probe for it automatically. While it's not nice to have to manually specify --gpu-context=x11 for vdpau interop on old nvidia, it's not nice either to have to specify --gpu-context=egl on new AMD. The choice is therefore between a dying API and one that is now used by two out of three graphics vendors on Linux and allows us to handle hwdec interop with no quality reduction.

@@ -22,6 +22,8 @@ Interface changes
--- mpv 0.29.0 ---
- drop deprecated --videotoolbox-format, --ff-aid, --ff-vid, --ff-sid,
--ad-spdif-dtshd, --softvol options
- always prefer EGL over GLX, which helps with AMD/vaapi, but will break
vdpau - use --gpu-context=x11 to be able to use vdpau
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should add that --vo=vdpau and --hwdec=vdpau-copy are unaffected

@ghost
Copy link
Author

ghost commented Dec 27, 2017

For those who want to try, #5300 makes EGL backends respect the swapinterval setting.

VDPAU is pretty much on its way out. It's inadequate for new video
formats such as HEVC, and has been neglected by nvidia (unfixed bugs
like broken rendering even of 8 bit HEVC). VDPAU also doesn't work on
EGL, but fortunately nvdec does.

On the other hand, AMD has support for both vdpau and vaapi. AMD+Vaapi
with libva 2 and some extensions that were added after the 2.0 release
(probably still git-only) supports full EGL interop, making vdpau
unnecessary.

The problem is that we strictly prefer GLX if the vdpau GL extension is
present. This means on AMD we will always GLX over EGL, this preferring
vdpau over vaapi. This makes the hardware decoding situation worse for
AMD.

Decide that it's time to drop the GLX probing, and always use EGL.
@ghost
Copy link
Author

ghost commented Dec 27, 2017

@kevmitch added.

@kevmitch
Copy link
Member

Just realized about git master dependencies. Maybe we should hold off merging this until the relevant code is in libva and mesa releases, otherwise the number of people this hurts will likely be more than it helps.

@ghost
Copy link
Author

ghost commented Jan 4, 2018

Also, can anyone confirm that Mesa/AMD does not have an extension or anything that makes vdpau interop usable with EGL? (Because that would solve the issue.)

@DanOscarsson
Copy link
Contributor

Does this patch mean that I who have a NVIDIA card will not get vdpau by default?
I still prefer vdpau as it contains both hardware decoding and a good presentation API.

@ghost
Copy link
Author

ghost commented Jan 6, 2018

It doesn't touch vo_vdpau at all. It doesn't matter much with vo_gpu (with OpenGL backends) either, because we already prefer nvdec by default. Vdpau is in disrepair and doesn't support important aspects of newer codecs.

The presentation API doesn't seem to be overlay useful either. There's a vdpauglx backend for vo_gpu, which makes primitive use of the vdpau presentation API, and it appears to report less ideal timings than just native GLX/EGL.

@DanOscarsson
Copy link
Contributor

The vdpau presentation API includes scheduling several frames to display at specific vsyncs and a way to follow up after when it was displayed. Missing in va API and opengl. vulkan have a swapchain but there you cannot schedule several frames in advance at specific vsyncs. I hope this will be standardised some day.

@aufkrawall
Copy link

Was the VAAPI GLX interop really that useless? Who knows when Radeon EGL will really work with upstream when mesa-git and libva-git still need to be patched even today?
vaapi-copy mode steals a huge amount of performance with 4k 60fps content.

@kkkrackpot
Copy link
Contributor

vaapi-copy mode steals a huge amount of performance with 4k 60fps content.

For me vaapi-copy works quite well on Intel Kaby Lake, even 4K@60, both HEVC and VP9
However, I'm not sure about ATI-AMD cards and if it's related to EGL/GLX question at all.

@aufkrawall
Copy link

vaapi-copy is currently the only way to use vaapi with Radeon & mpv, and only vaapi can decode HEVC 10 bit in hardware.
copy-modes have overhead and reduce GPU performance compared to non-copy (might be less true for APUs). So current situation with Radeon is quite unsatisfying. There was a vaapi GLX interop for Radeon in mpv which got removed and there apparently isn't a replacement in sight.

@ghost
Copy link
Author

ghost commented Feb 2, 2018

The old GLX interop was crap and broke with anything that didn't use the old colorspaces, and it also broke some of the fancier GL renderer features. The EGL interop (or an equivalent alternative) is the only way forward. So bug those Mesa people, if they haven't merged it yet.

@wang-bin
Copy link
Contributor

vdpau can work with egl. Let vdpau render video to a x11 pixmap using the presentation queue created from VdpPresentationQueueTargetCreateX11, then create EGLImage from pixmap using extension EGL_KHR_image_pixmap.

@ghost
Copy link
Author

ghost commented Mar 27, 2018

Yeah, but that's a bad hack and probably not even faster than using vdpau-copy.

@wang-bin
Copy link
Contributor

wang-bin commented Apr 23, 2018

Yeah, but that's a bad hack and probably not even faster than using vdpau-copy.

It's the best we can do. In my tests it's faster than copy. BTW, why do you think it's a hack? interoping with pixmaps is standard, see http://www.nvidia.com/content/GTC-2010/pdfs/2016_GTC2010.pdf

@aufkrawall
Copy link

aufkrawall commented Apr 23, 2018

vaapi x11egl will work also on AMD with Mesa 18.1.

Edit: It got backported into Mesa 18.0.1

@aufkrawall
Copy link

Since Mesa 18.0.1 and FFmpeg 4.0 have been released for some time now, imho this can be merged without regrets before mpv 0.29.0.

@Gusar321
Copy link
Contributor

Fully agree with aufkrawall. We now have the problem that users would get hardware decoding out of the box on AMD (well, not completely, they still need to set hwdec), but loading VAAPI fails because GLX is picked and the user has to be instructed to manually set --gpu-context=x11egl

@mc4man
Copy link

mc4man commented Jun 3, 2018

You may want to check this change on hybrid nvidia hardware, at least here it makes the use of hwdec=vdpau or --hwdec=vdpau not possible.

@Gusar321
Copy link
Contributor

Gusar321 commented Jun 4, 2018

Did vdpau ever work on hybrid nvidia systems? I don't see how this change could affect specifically hybrid systems. It does affect vdpau as a whole, but that's a deliberate change due to the following:

a) vdpau is dead (no 10bit video, no VP9 decoding, no Wayland support, 8bit HEVC is buggy on nvidia)
b) vdpau's replacement at nvidia, nvdec, works with egl
c) if someone does does want vdpau despite the above two, they can specify gpu-context=x11

@mc4man
Copy link

mc4man commented Jun 5, 2018

Well of course vdpau hwdec works on nvidia hybrid hardware.
The gpu-context=x11 does allow use.
So if wanting to 'semi-break' current use of hwdec=vdpau to mitigate amd's deficiencies fine, just add to the man that gpu-context=x11 will be needed.
There are times or times on certain hardware when vdpau works better than nvdec/cuda.

@philipl
Copy link
Member

philipl commented Feb 21, 2019

To the extent that anyone wants to actually tackle this problem, we could just dig a little deeper to distinguish the nvidia and amd cases so that the glx preference doesn't apply on amd.

Of course, I'm personally happy with switching the default because I don't care about vdpau anymore.

@DanOscarsson
Copy link
Contributor

Yes, if would be good if correct choice could be done for both nvidia and amd.

I only use nvidia and would prefer it to work like today. Nvidia have since this request was added, fixed fixed several of the problems with vdpau.

@aufkrawall
Copy link

But it still doesn't support VP9 and HEVC 10 bit, right? So it's rather dead, despite of any bug fixes.

@haasn
Copy link
Member

haasn commented Mar 3, 2019

Of course, I'm personally happy with switching the default because I don't care about vdpau anymore.

+1

@Gusar321
Copy link
Contributor

Gusar321 commented Aug 9, 2019

Today again someone's "problem" with getting hardware decode to work was solved by specifying gpu-context=x11egl. This PR really should get merged. Or, to not screw up Nvidia users, I propose the following:

Rather than looking for the vdpau_interop extension and choosing GLX vs EGL based on that, check the GL vendor string - if it's "NVIDIA Corporation" use GLX, otherwise use EGL. That would provide out-of-the-box functionality for both AMD/VAAPI and Nvidia/VDPAU.

@jeeb
Copy link
Member

jeeb commented Sep 15, 2019

Merged as 0abe34e .

@jeeb jeeb closed this Sep 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants