Closed
Bug 1322691
Opened 8 years ago
Closed 7 years ago
Performance regress in WebGL video textures
Categories
(Core :: Graphics: CanvasWebGL, defect, P3)
Tracking
()
People
(Reporter: postfilter, Assigned: jgilbert)
References
(Blocks 1 open bug)
Details
(Keywords: perf, regression, Whiteboard: gfx-noted)
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20161209030212
Steps to reproduce:
Visit:
http://alteredqualia.com/xg/examples/webgl_video_aspect_ratio.html
Observe framerate FPS counter in the upper left corner.
Actual results:
In both current stable Firefox 50.0.2 and latest Firefox Nightly 53.0a1 (2016-12-09) performance is just ~25 fps.
Expected results:
This is a regress. I still have older portable versions of Firefox (48.0.2 and 49.0.2), where the same test still runs at 60 fps.
Also Chrome (both stable and canary) runs this test at 60 fps.
-------
Alternatively, you can check also these tests:
http://codeflow.org/issues/slow_video_to_texture/
For example I got these numbers in Firefox Nightly 53.0a1:
texImage2D 720p => 59.64 fps / 8.20 ms upload
texImage2D 1080p => 48.81 fps / 16.09 ms upload
texSubImage2D 720p => 54.87 fps / 8.23 ms upload
texSubImage2D 1080p => 40.73 fps / 16.78ms upload
Compared to e.g. latest Chrome Canary 57.0.2946.0 (where except its own issue with texSubImage2D, uploads are order of magnitude faster):
texImage2D 720p => 59.92 fps / 0.24 ms upload
texImage2D 1080p => 59.69 fps / 0.23 ms upload
texSubImage2D 720p => 59.84 fps / 4.50 ms upload
texSubImage2D 1080p => 20.32 fps / 44.94 ms upload
Comment 1•8 years ago
|
||
Tested with http://alteredqualia.com/xg/examples/webgl_video_aspect_ratio.html
Regression window( webgl.enable-webgl2 and webgl.enable-prototype-webgl2 = false):
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=4be1c47c9cbc1e827667226574cb00391e1a124c&tochange=b15f05a94c716fdbed45b5f46a0fd5b8ae6443ef
Regressed by: Bug 1286348
Blocks: 1286348
status-firefox50:
--- → affected
status-firefox51:
--- → affected
status-firefox52:
--- → affected
status-firefox53:
--- → affected
Component: Graphics → Canvas: WebGL
Keywords: perf,
regression
Updated•8 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: gfx-noted
We should revisit once the dependent bug 1322746 is fixed.
Assignee | ||
Comment 4•7 years ago
|
||
Please retest in Nightly now that bug 1322746 has landed.
Flags: needinfo?(postfilter)
Reporter | ||
Comment 5•7 years ago
|
||
Thanks.
I tested both in the latest nightly and the current stable Firefox and here is what I've got:
1. test:
http://alteredqualia.com/xg/examples/webgl_video_aspect_ratio.html
Firefox Nightly 57.0a1 (2017-09-06) (64-bit)
--------------------------------------------
D3D11 ANGLE backend: 60 fps
OpenGL backend: 22-24 fps
Firefox 55.0.3
--------------------------------------------
D3D11 ANGLE backend: 60 fps
OpenGL backend: 60 fps
2. test (H.264 video):
http://codeflow.org/issues/slow_video_to_texture/
Firefox Nightly 57.0a1 (2017-09-06) (64-bit)
--------------------------------------------
D3D11 ANGLE
texImage2D 720p 60.07 fps / 10.18 ms
texImage2D 1080p 42.85 fps / 18.09 ms
texSubImage2D 720p 60.09 fps / 10.20 ms
texSubImage2D 1080p 43.75 fps / 17.86 ms
OpenGL
texImage2D 720p 59.96 fps / 10.84 ms
texImage2D 1080p 41.07 fps / 19.16 ms
texSubImage2D 720p 60.12 fps / 10.65 ms
texSubImage2D 1080p 41.99 fps / 19.22 ms
Firefox 55.0.3
--------------------------------------------
D3D11 ANGLE
texImage2D 720p 60.03 fps / 9.51 ms
texImage2D 1080p 44.21 fps / 17.58 ms
texSubImage2D 720p 60.13 fps / 7.42 ms
texSubImage2D 1080p 44.10 fps / 17.70 ms
OpenGL
texImage2D 720p 60.00 fps / 8.15 ms
texImage2D 1080p 41.94 fps / 18.94 ms
texSubImage2D 720p 60.10 fps / 9.04 ms
texSubImage2D 1080p 42.66 fps / 18.83 ms
So compared to the state from the original bug report (Firefox 50 and 53):
Test 1)
- D3D11 ANGLE backend got fixed somewhere between Firefox 53 and 55, and it's still fast in 57
- OpenGL backend got fixed somewhere between Firefox 53 and 55, and then regressed again somewhere between 55 and 57
Test 2)
- didn't really change much, maybe got slightly slower, both D3D11 ANGLE and OpenGL backends are still significantly slower in Firefox than in Chrome
Flags: needinfo?(postfilter)
Assignee | ||
Comment 6•7 years ago
|
||
I need more info on your test setup. This is what I get:
Nightly 57 (Build ID 20170906100107)
texImage2D 720p 59.05 0.67
texImage2D 1080p 59.05 0.66
texSubImage2D 720p 58.78 0.64
texSubImage2D 1080p 59.05 0.65
Nightly 57 (Build ID 20170901100309)
texImage2D 720p 46.46 14.31
texImage2D 1080p 29.02 26.89
texSubImage2D 720p 46.87 14.39
texSubImage2D 1080p 29.54 26.76
This is all d3d11, since we haven't optimized the preffed-off opengl backend yet.
Assignee | ||
Updated•7 years ago
|
Flags: needinfo?(postfilter)
Reporter | ||
Comment 7•7 years ago
|
||
Nightly Build ID here seems to be the same as your fast version: 20170906100107
My OS is Windows 8.1 64-bit, GPU is Nvidia GTX 970M (driver version 384.94), it's a notebook with Optimus.
Here is graphics section of about:support:
Graphics
--------
Features
Compositing: Direct3D 11 (Advanced Layers)
Asynchronous Pan/Zoom: none
WebGL 1 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000b767) EGL_VERSION: 1.4 (ANGLE 2.1.0.dec065540d5f) 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_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query 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_nv12 EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 1 Driver Renderer: Google Inc. -- ANGLE (NVIDIA GeForce GTX 970M Direct3D11 vs_5_0 ps_5_0)
WebGL 1 Driver Version: OpenGL ES 2.0 (ANGLE 2.1.0.dec065540d5f)
WebGL 1 Driver Extensions: GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_pack_reverse_row_order GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 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_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range 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_dxt1 GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug 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_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives 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_vertex_array_object
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture
WebGL 2 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 000000000000b767) EGL_VERSION: 1.4 (ANGLE 2.1.0.dec065540d5f) 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_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query 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_nv12 EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 2 Driver Renderer: Google Inc. -- ANGLE (NVIDIA GeForce GTX 970M Direct3D11 vs_5_0 ps_5_0)
WebGL 2 Driver Version: OpenGL ES 3.0 (ANGLE 2.1.0.dec065540d5f)
WebGL 2 Driver Extensions: GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_pack_reverse_row_order GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 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_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range 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_dxt1 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_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_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives 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_vertex_array_object
WebGL 2 Extensions: EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc
Direct2D: true
DirectWrite: true (6.3.9600.18696)
GPU #1
Active: Yes
Description: NVIDIA GeForce GTX 970M
Vendor ID: 0x10de
Device ID: 0x13d8
Driver Version: 22.21.13.8494
Driver Date: 7-18-2017
Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Subsys ID: 11021462
RAM: 3072
GPU #2
Active: No
Description: Intel(R) HD Graphics 4600
Vendor ID: 0x8086
Device ID: 0x0416
Driver Version: 10.18.14.4578
Driver Date: 1-4-2017
Drivers: igdumdim64 igd10iumd64 igd10iumd64 igdumdim32 igd10iumd32 igd10iumd32
Subsys ID: 11021462
RAM: Unknown
Diagnostics
AzureCanvasAccelerated: 0
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: skia
Device Reset: Trigger Device Reset
Decision Log
GPU_PROCESS:
unavailable by default: Multi-process mode is not enabled
WEBRENDER:
opt-in by default: WebRender is an opt-in feature
unavailable by runtime: GPU Process is disabled
Flags: needinfo?(postfilter)
Assignee | ||
Comment 8•7 years ago
|
||
You have multi-process disabled for some reason, so that might be breaking the optimization. (non-multi-process is a non-default path)
Do you know why it's disabled?
Flags: needinfo?(postfilter)
Reporter | ||
Comment 9•7 years ago
|
||
Yay! That was it -> multi-process <- mystery solved, thanks.
Meanwhile my Nightly auto-updated to Build ID 20170906220306, so just to be sure I run the same latest version with both multi-process enabled and disabled:
multi-process enabled
------------------------------------
texImage2D 720p 60.20 1.23
texImage2D 1080p 60.11 1.26
texSubImage2D 720p 60.19 1.17
texSubImage2D 1080p 60.16 1.26
multi-process disabled
------------------------------------
texImage2D 720p 60.10 9.99
texImage2D 1080p 44.11 17.50
texSubImage2D 720p 60.13 10.01
texSubImage2D 1080p 44.72 17.42
I toggled it off manually in Nightly since some earlier days when it was crashing on some WebGL demos, will try to leave it on now.
Flags: needinfo?(postfilter)
Assignee | ||
Comment 10•7 years ago
|
||
Sweet. I'll take a look at why it's not working without e10s later.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
Assignee: nobody → jgilbert
status-firefox55:
--- → wontfix
status-firefox56:
--- → wontfix
status-firefox57:
--- → fixed
status-firefox-esr52:
--- → wontfix
Target Milestone: --- → mozilla57
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•