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

Does ANGLE still work correctly? #8530

Closed
hooke007 opened this issue Feb 3, 2021 · 6 comments
Closed

Does ANGLE still work correctly? #8530

hooke007 opened this issue Feb 3, 2021 · 6 comments
Labels

Comments

@hooke007
Copy link
Contributor

hooke007 commented Feb 3, 2021

Important Information

Reproduction steps

Start the mpv with:
mpv --vo=gpu --gpu-api=opengl --gpu-context=angle --log-file="~~desktop/opengl-angle.log"

Expected behavior

No error text?

Actual behavior

The words Could not bind API! are in the log file.

Log file

[   0.461][v][vo/gpu/opengl] Initializing GPU context 'angle'
[   0.557][v][vo/gpu] Using Direct3D 11 feature level 11_0
[   0.557][v][vo/gpu] Device Name: NVIDIA GeForce RTX 2070 Super
[   0.557][v][vo/gpu] Device ID: 10de:1e91 (rev a1)
[   0.557][v][vo/gpu] Subsystem ID: 1d05:108a
[   0.557][v][vo/gpu] LUID: 0000000000010b8f
[   0.564][d][vo/gpu] EGL extensions: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_windows_ui_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_display_semaphore_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control EGL_ANGLE_robust_resource_initialization EGL_ANGLE_create_context_extensions_enabled EGL_ANDROID_blob_cache EGL_ANDROID_recordable EGL_ANGLE_image_d3d11_texture EGL_ANGLE_create_context_backwards_compatible EGL_KHR_create_context_no_error EGL_KHR_reusable_sync 
[   0.564][v][vo/gpu/opengl] EGL_VERSION=1.5 (ANGLE 2.1.14813 git hash: 74f7be6d1fd0)
[   0.564][v][vo/gpu/opengl] EGL_VENDOR=Google Inc. (adapter LUID: 0000000000010b8f)
[   0.564][v][vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL_ES
[   0.564][v][vo/gpu/opengl] Trying to create Desktop OpenGL context.
[   0.564][v][vo/gpu/opengl] Could not bind API!
[   0.564][v][vo/gpu/opengl] Trying to create GLES 3.x context.
[   0.564][d][vo/gpu/opengl] Chosen EGLConfig:
[   0.564][d][vo/gpu/opengl]   EGL_CONFIG_ID=0x65
[   0.564][d][vo/gpu/opengl]   EGL_RED_SIZE=0xa
[   0.564][d][vo/gpu/opengl]   EGL_GREEN_SIZE=0xa
[   0.564][d][vo/gpu/opengl]   EGL_BLUE_SIZE=0xa
[   0.564][d][vo/gpu/opengl]   EGL_ALPHA_SIZE=0x2
[   0.564][d][vo/gpu/opengl]   EGL_COLOR_BUFFER_TYPE=0x308e
[   0.564][d][vo/gpu/opengl]   EGL_CONFIG_CAVEAT=0x3038
[   0.564][d][vo/gpu/opengl]   EGL_CONFORMANT=0x44
[   0.564][d][vo/gpu/opengl]   EGL_NATIVE_VISUAL_ID=0x0
[   0.575][v][vo/gpu] Using DXGI 1.2+
[   0.575][v][vo/gpu] Queried output: \\.\DISPLAY4, 3840x2160 @ 10 bits, colorspace: RGB_FULL_G22_NONE_P709 (0)
[   0.575][v][vo/gpu] Selected swapchain format R10G10B10A2_UNORM (24), attempting to utilize it.
[   0.576][v][vo/gpu] Selected swapchain color space RGB_FULL_G22_NONE_P709 (0), attempting to utilize it.
[   0.576][v][vo/gpu] Swapchain capabilities for color space RGB_FULL_G22_NONE_P709 (0): normal: yes, overlay: no
[   0.576][v][vo/gpu] Swapchain successfully configured to color space RGB_FULL_G22_NONE_P709 (0)!
[   0.576][v][vo/gpu] Using flip-model presentation
[   0.576][v][vo/gpu] GL_VERSION='OpenGL ES 3.0.0 (ANGLE 2.1.14813 git hash: 74f7be6d1fd0)'
[   0.576][v][vo/gpu] Detected GLES 3.0.
[   0.576][v][vo/gpu] GL_VENDOR='Google Inc.'
[   0.576][v][vo/gpu] GL_RENDERER='ANGLE (NVIDIA GeForce RTX 2070 Super Direct3D11 vs_5_0 ps_5_0)'
[   0.576][v][vo/gpu] GL_SHADING_LANGUAGE_VERSION='OpenGL ES GLSL ES 3.00 (ANGLE 2.1.14813 git hash: 74f7be6d1fd0)'
[   0.576][d][vo/gpu] Combined OpenGL extensions string:
[   0.576][d][vo/gpu] EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_windows_ui_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_display_semaphore_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control EGL_ANGLE_robust_resource_initialization EGL_ANGLE_create_context_extensions_enabled EGL_ANDROID_blob_cache EGL_ANDROID_recordable EGL_ANGLE_image_d3d11_texture EGL_ANGLE_create_context_backwards_compatible EGL_KHR_create_context_no_error EGL_KHR_reusable_sync  GL_ANGLE_base_vertex_base_instance GL_ANGLE_client_arrays GL_ANGLE_copy_texture_3d GL_ANGLE_depth_texture GL_ANGLE_explicit_context GL_ANGLE_explicit_context_gles1 GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_get_tex_level_parameter GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_memory_size GL_ANGLE_multi_draw GL_ANGLE_multiview_multisample GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_provoking_vertex GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_multisample GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_lose_context GL_CHROMIUM_sync_query GL_EXT_EGL_image_external_wrap_modes GL_EXT_blend_func_extended GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_draw_buffers_indexed GL_EXT_draw_elements_base_vertex GL_EXT_float_blend GL_EXT_frag_depth GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_multisampled_render_to_texture GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_bptc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_norm16 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_KHR_parallel_shader_compile GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_compressed_EAC_R11_signed_texture GL_OES_compressed_EAC_R11_unsigned_texture GL_OES_compressed_EAC_RG11_signed_texture GL_OES_compressed_EAC_RG11_unsigned_texture GL_OES_compressed_ETC2_RGB8_texture GL_OES_compressed_ETC2_RGBA8_texture GL_OES_compressed_ETC2_punchthroughA_RGBA8_texture GL_OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture GL_OES_compressed_ETC2_sRGB8_alpha8_texture GL_OES_compressed_ETC2_sRGB8_texture GL_OES_depth24 GL_OES_depth32 GL_OES_draw_buffers_indexed GL_OES_draw_elements_base_vertex GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_border_clamp GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_texture_stencil8 GL_OES_vertex_array_object GL_OVR_multiview GL_OVR_multiview2 GL_WEBGL_video_texture 
[   0.576][v][vo/gpu] Loaded extension GL_EXT_texture_norm16.
[   0.576][v][vo/gpu] Loaded extension GL_EXT_color_buffer_half_float.
[   0.576][v][vo/gpu] Loaded extension GL_EXT_disjoint_timer_query.
[   0.576][v][vo/gpu] Loaded extension GL_ANGLE_translated_shader_source.
[   0.577][d][vo/gpu/opengl] Texture formats:
@hooke007 hooke007 added the os:win label Feb 3, 2021
@Akemi
Copy link
Member

Akemi commented Feb 3, 2021

don't be skimpy and post a full log, pls.

also maybe clarify what actually happens. does mpv crash? does it not start? doe it not initialise the context? some lines in a verbose output is not "actual behaviour". we want to know what the problem is.

@hooke007
Copy link
Contributor Author

hooke007 commented Feb 3, 2021

don't be skimpy and post a full log, pls.

opengl-angle.log

also maybe clarify what actually happens. does mpv crash? does it not start? doe it not initialise the context? some lines in a verbose output is not "actual behaviour". we want to know what the problem is.

Most of times I couldn‘t find the differences of the output between ANGLE and WIN (or dxinterop).
But when I tested one hdr source (played to sdr), I got the different outputs.
Could not bind API! always shows in the log if I use the ANGLE, so I wonder if it works correctly and if it is the reason make the different output (in that case).

opengl-angle
opengl-angle-ty
opengl-win (It shows the same with d3d11 backend)
opengl-win-ty

@CounterPillow
Copy link
Contributor

CounterPillow commented Feb 4, 2021

[   0.472][v][vo/gpu] Disabling HDR peak computation (one or more of the following is not supported: compute shaders=0, SSBO=0).

that's why. ANGLE doesn't do compute shaders, nor does it do SSBO. Not doing HDR tonemapping the same way as a mode where those things are available is expected behaviour.

In general, you should not use ANGLE if one of the other modes works.

If you want to use Direct3d, I think you should use --gpu-api=d3d11, not ANGLE (which is a layer translating OpenGL ES to Direct3d).

@hooke007
Copy link
Contributor Author

hooke007 commented Feb 4, 2021

It solves my confusion. And could I think Could not bind API! is the useless information which actually doesn't affect the output?

@jeeb
Copy link
Member

jeeb commented Feb 4, 2021

Basically what happens in the following sequence:

[   0.564][v][vo/gpu/opengl] Trying to create Desktop OpenGL context.
[   0.564][v][vo/gpu/opengl] Could not bind API!
[   0.564][v][vo/gpu/opengl] Trying to create GLES 3.x context.
  1. Since this is general GL initialization, it attempts to first utilize desktop GL.
  2. Could not initialize it (the reason for which is visible from an earlier line, it only has GL ES):
    EGL_CLIENT_APIS=OpenGL_ES
    
  3. Then goes for GL ES, and that succeeds with GL ES 3.

Technically the desktop GL attempt is in this case "useless", but would have to check if there's a convenient way of skipping this for ANGLE and/or for GL ES-only things in general..

@Akemi
Copy link
Member

Akemi commented Feb 4, 2021

since the question has been answered and everything works as intended, i am going to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants