WebGL texImage2D is miserably slower than MS Edge
Reported by
orange4g...@gmail.com,
Nov 22
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Steps to reproduce the problem: 1. Download attached file 2. Run 'onscreen.html' or 'offscreen.html' 3. on either Chrome and Edge What is the expected behavior? It renders some solid textures, total 60 frames in 1 second. Edge renders it smoothly. What went wrong? Chrome and Firefox are almost using 100% GPU resource and ends up with poor performance either onscreen and offscreen. I know this topic is discussed many times, but it seems no one is taking it seriously and just treating it as kind of a normal/unhandleable behavior. I'm using GeForce GTX 750 Ti, not bad one. Even this GPU, just rendering solid backgrounds in Chrome and Firefox takes 100 percent of my GPU resource with huge FPS drop while Edge takes only 15~20 percent with 60 FPS. Sure, CPU-GPU memory transferring is usually takes expensive cost but NOT MUCH expensive like this. Even MS Edge is rendering it smoothly. Chrome and Web market are getting bigger and bigger and now being a platform itself. With up-coming technologies like WebAssembly, graphic related web application like video editing tool can be also run on Chrome. But it can't be done because of these problems. It's too sad that it's been a VERY VERY long time since after texImage2D problem was stated at the first time at 2011 (https://bugs.chromium.org/p/chromium/issues/detail?id=91208) and after 7 years later now, nothing was improved. Did this work before? No Does this work in other browsers? N/A Chrome version: 70.0.3538.102 Channel: stable OS Version: 10.0 Flash Version:
,
Nov 22
,
Nov 22
The bisect will only be possible if this used to work well in an old Chrome, but yes please provide the chrome://gpu - this issue may be hardware specific, because we haven't seen many reports of it. It may be that we have a workaround on that hardware that has a significant performance hit, and if so maybe it can be optimized.
,
Nov 22
,
Nov 22
I wonder if there's some kind of conversion happening. We could look at running a build with debug symbols through a profiler.
,
Nov 22
That's embarrassing. Turns out my own hardware problem ? ;( Here's my chrome://gpu https://pastebin.com/Yib9LS13
,
Nov 22
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 22
I updated my GPU driver and problem has been solved. Sorry for bothering. Here's the chrome://gpu after upgrading (though it seems nothing is changed.) https://pastebin.com/raw/Yib9LS13 One question is, although the main problem is solved, it still takes almost 20% of GPU resource. On the other programs, like some kind of VideoPlayer or re-write version of above example code(onscreen.html) in C++ OpenGL (with FBO), it takes much less GPU resource to render them. (less than 5%) Although it's hard to compare with such a trivial VideoPlayer and Chromium since Chromium is a much huge program with multiple processes, is there any chance chromium gets improvement? At least in terms of OffscreenCanvas? Thank you.
,
Nov 22
Ouch. sorry. That above pastebin link is wrong (same with the first one). Here is the right one. https://pastebin.com/raw/sRgeUf95
,
Nov 23
[Updated]: Turns out it is still happening. Sometimes it works with 20% but when I re-open it or open another window, it suddenly goes bad. While Edge has almost same performance and charging resource on triple window
,
Nov 23
Same with Firefox, behaving like Chrome
,
Nov 24
The exact same problem happens again after upgrading my video driver ;(.
,
Nov 27
As per comment #0, tried to reproduce the issue on reported chrome 70.0.3538.102 using windows 10. Attaching screenshot for reference. Steps: ----- 1. Launched chrome 2. Downloaded given file and launched through local server 3. Opened task manager As we have observed the gpu memory as attached screenshot. @reporter: Could you please check the attached screenshot and let us know if anything missed from our end and also confirm the issue. and can you please verify this issue on latest chrome beta 71.0.3578.62, you can download latest chrome builds here:" https://www.chromium.org/getting-involved/dev-channel ". Let us know whether issue still persists. Thanks..!
,
Nov 27
These samples run fine on my Windows workstation with AMD R7 240 GPU. They run at 60 FPS and consume far less than 100% GPU time according to Windows' task manager. See attached screenshot. They also run fine in 2 windows simultaneously. Submitter, you should use requestAnimationFrame rather than setInterval to schedule your graphics work. requestAnimationFrame participates more cooperatively with the browser's rendering and compositing pipeline. See attached modified test case files. Please report back whether this problem is still happening after switching to use requestAnimationFrame. Graphics Feature Status Canvas: Hardware accelerated Flash: Hardware accelerated Flash Stage3D: Hardware accelerated Flash Stage3D Baseline profile: Hardware accelerated Compositing: Hardware accelerated Multiple Raster Threads: Enabled Native GpuMemoryBuffers: Software only. Hardware acceleration disabled Out-of-process Rasterization: Disabled Hardware Protected Video Decode: Unavailable Rasterization: Hardware accelerated Skia Deferred Display List: Disabled Skia Renderer: Disabled Surface Control: Disabled Surface Synchronization: Enabled Video Decode: Hardware accelerated Viz Service Display Compositor: Disabled WebGL: Hardware accelerated WebGL2: Hardware accelerated Driver Bug Workarounds clear_uniforms_before_first_program_use decode_encode_srgb_for_generatemipmap disable_discard_framebuffer disable_dxgi_zero_copy_video disable_framebuffer_cmaa exit_on_context_lost force_cube_complete scalarize_vec_and_mat_constructor_args disabled_extension_GL_KHR_blend_equation_advanced disabled_extension_GL_KHR_blend_equation_advanced_coherent Problems Detected Protected video decoding with swap chain is for Windows and Intel only Disabled Features: protected_video_decode Some drivers are unable to reset the D3D device in the GPU process sandbox Applied Workarounds: exit_on_context_lost Clear uniforms before first program use on all platforms: 124764, 349137 Applied Workarounds: clear_uniforms_before_first_program_use Always rewrite vec/mat constructors to be consistent: 398694 Applied Workarounds: scalarize_vec_and_mat_constructor_args ANGLE crash on glReadPixels from incomplete cube map texture: 518889 Applied Workarounds: force_cube_complete Framebuffer discarding can hurt performance on non-tilers: 570897 Applied Workarounds: disable_discard_framebuffer Use GL_INTEL_framebuffer_CMAA on ChromeOS: 535198 Applied Workarounds: disable_framebuffer_cmaa Disable KHR_blend_equation_advanced until cc shaders are updated: 661715 Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent) Decode and Encode before generateMipmap for srgb format textures on Windows: 634519 Applied Workarounds: decode_encode_srgb_for_generatemipmap Zero-copy DXGI video hangs or displays incorrect colors on AMD drivers: 623029 Applied Workarounds: disable_dxgi_zero_copy_video Native GpuMemoryBuffers have been disabled, either via about:flags or command line. Disabled Features: native_gpu_memory_buffers Viz service display compositor is not enabled by default. Disabled Features: viz_display_compositor Skia renderer is not used by default. Disabled Features: skia_renderer Skia deferred display list is not used by default. Disabled Features: skia_deferred_display_list Version Information Data exported 2018-11-27T18:18:10.172Z Chrome version Chrome/72.0.3622.0 Operating system Windows NT 10.0.16299 Software rendering list URL https://chromium.googlesource.com/chromium/src/+/74770d660797220710701b2c66ad38390ab86d43/gpu/config/software_rendering_list.json Driver bug list URL https://chromium.googlesource.com/chromium/src/+/74770d660797220710701b2c66ad38390ab86d43/gpu/config/gpu_driver_bug_list.json ANGLE commit id 15992bef28d8 2D graphics backend Skia/72 2871509751abec7e489b2688aae02534c26565ff- Command Line "C:\Users\kbr\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --flag-switches-begin --flag-switches-end --isolate-origins=https://chromium.org/,https://corp.googleapis.com/,https://storage.googleapis.com,https://ajax.googleapis.com,https://fonts.googleapis.com,https://googleplex.com/,https://googlesource.com/,https://youtube.com/,https://google.com/,https://googleacquisitionmigration.com/,https://googleusercontent.com/,https://googleprod.com/,https://nest.com/,https://myworkday.com/,https://chromiumapp.org/,https://lucidchart.com/,https://service-now.com/,https://concursolutions.com/,https://salesforce.com/,https://gcorppartners.com/,https://morganstanley.com/,https://schwab.com/,https://qualtrics.com/,https://ultipro.com/,https://google.secure2-enroll.com/,https://googlegroups.com/,https://google.secure.force.com/,https://ebenefitsnow.com/,https://firebase.com/,https://elo.plusrelocation.com/,https://anthem.com/,https://g.viapeople.net/,https://gdjap.com/,https://asana.com/,https://perquisite.net/,https://postini.com/,https://perkhub.com/,https://gstave.us/,https://geolearning.com/,https://lecorpio.com/,https://inverify.net/,https://preceda.com.au/,https://secureacceptance.cybersource.com/,https://solium.com/,https://fgvms.com/,https://ridecell.com/,https://tds.ie/,https://sprinklr.com/,https://smartsheet.com/,https://fieldglass.net/,https://dochub.com/ Driver Information Initialization time 167 In-process GPU false Passthrough Command Decoder true Sandboxed true GPU0 VENDOR = 0x1002 [Google Inc.], DEVICE= 0x683d [ANGLE (AMD Radeon R7 200 Series Direct3D11 vs_5_0 ps_5_0)] *ACTIVE* Optimus false AMD switchable false Desktop compositing Aero Glass Direct composition true Supports overlays false Overlay capabilities Diagonal Monitor Size of \\.\DISPLAY1 29.7" Driver D3D12 feature level Not supported Driver Vulkan API version Not supported Driver vendor Advanced Micro Devices, Inc. Driver version 22.19.662.4 Driver date 7-20-2017 GPU CUDA compute capability major version 0 Pixel shader version 5.0 Vertex shader version 5.0 Max. MSAA samples 8 Machine model name Machine model version GL_VENDOR Google Inc. GL_RENDERER ANGLE (AMD Radeon R7 200 Series Direct3D11 vs_5_0 ps_5_0) GL_VERSION OpenGL ES 2.0 (ANGLE 2.1.0.15992bef28d8) GL_EXTENSIONS GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_explicit_context GL_ANGLE_explicit_context_gles1 GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample 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_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_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba 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_bptc GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb 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_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_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_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_vertex_array_object OES_compressed_EAC_R11_signed_texture OES_compressed_EAC_R11_unsigned_texture OES_compressed_EAC_RG11_signed_texture OES_compressed_EAC_RG11_unsigned_texture OES_compressed_ETC2_RGB8_texture OES_compressed_ETC2_RGBA8_texture OES_compressed_ETC2_punchthroughA_RGBA8_texture OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture OES_compressed_ETC2_sRGB8_alpha8_texture OES_compressed_ETC2_sRGB8_texture Disabled Extensions GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent Disabled WebGL Extensions Window system binding vendor Google Inc. (adapter LUID: 00000000000134fb) Window system binding version 1.4 (ANGLE 2.1.0.15992bef28d8) Window system binding 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 EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_CHROMIUM_sync_control EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_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 Direct rendering Yes Reset notification strategy 0x8252 GPU process crash count 0 Compositor Information Tile Update Mode One-copy Partial Raster Enabled GpuMemoryBuffers Status R_8 Software only R_16 Software only RG_88 Software only BGR_565 Software only RGBA_4444 Software only RGBX_8888 GPU_READ, SCANOUT RGBA_8888 GPU_READ, SCANOUT BGRX_8888 Software only BGRX_1010102 Software only RGBX_1010102 Software only BGRA_8888 Software only RGBA_F16 Software only YVU_420 Software only YUV_420_BIPLANAR Software only UYVY_422 Software only Display(s) Information Info Display[2528732444] bounds=[0,0 2560x1600], workarea=[0,0 2560x1560], scale=1, external. Color space information {primaries:BT709, transfer:IEC61966_2_1, matrix:RGB, range:FULL} Bits per color component 8 Bits per pixel 24 Video Acceleration Information Decode h264 baseline up to 1920x1088 pixels Decode h264 main up to 1920x1088 pixels Decode h264 high up to 1920x1088 pixels Encode h264 baseline up to 3840x2176 pixels and/or 30.000 fps Encode h264 main up to 3840x2176 pixels and/or 30.000 fps Encode h264 high up to 3840x2176 pixels and/or 30.000 fps Diagnostics 0 b3DAccelerationEnabled true b3DAccelerationExists true bAGPEnabled true bAGPExistenceValid true bAGPExists true bCanRenderWindow true bDDAccelerationEnabled true bDriverBeta false bDriverDebug false bDriverSigned false bDriverSignedValid false bNoHardware false dwBpp 32 dwDDIVersion 12 dwHeight 1600 dwRefreshRate 60 dwWHQLLevel 0 dwWidth 2560 iAdapter 0 lDriverSize 1962120 lMiniVddSize 0 szAGPStatusEnglish Enabled szAGPStatusLocalized Enabled szChipType AMD Radeon Graphics Processor (0x683D) szD3DStatusEnglish Enabled szD3DStatusLocalized Enabled szDACType Internal DAC(400MHz) szDDIVersionEnglish 12 szDDIVersionLocalized 12 szDDStatusEnglish Enabled szDDStatusLocalized Enabled szDXVAHDEnglish Not Supported szDXVAModes ModeMPEG2_A ModeMPEG2_C ModeVC1_C ModeWMV9_C szDescription AMD Radeon R7 200 Series szDeviceId 0x683D szDeviceIdentifier {D7B71EE2-2B7D-11CF-EC77-1500BCC2DB35} szDeviceName \\.\DISPLAY1 szDisplayMemoryEnglish 66497 MB szDisplayMemoryLocalized 66497 MB szDisplayModeEnglish 2560 x 1600 (32 bit) (60Hz) szDisplayModeLocalized 2560 x 1600 (32 bit) (60Hz) szDriverAssemblyVersion 22.19.662.4 szDriverAttributes Final Retail szDriverDateEnglish 7/19/2017 4:00:00 PM szDriverDateLocalized 7/19/2017 16:00:00 szDriverLanguageEnglish English szDriverLanguageLocalized English szDriverModelEnglish WDDM 2.2 szDriverModelLocalized WDDM 2.2 szDriverName C:\WINDOWS\System32\DriverStore\FileRepository\c0316467.inf_amd64_3d8fbd78102e53d7\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\c0316467.inf_amd64_3d8fbd78102e53d7\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\c0316467.inf_amd64_3d8fbd78102e53d7\aticfx64.dll,C:\WINDOWS\System32\DriverStore\FileRepository\c0316467.inf_amd64_3d8fbd78102e53d7\amdxc64.dll szDriverNodeStrongName oem25.inf:cb0ae414ac142df8:ati2mtag_R575ADS:22.19.662.4:pci\ven_1002&dev_683d&subsys_22831458 szDriverSignDate Unknown szDriverVersion 22.19.0662.0004 szKeyDeviceID Enum\PCI\VEN_1002&DEV_683D&SUBSYS_22831458&REV_00 szKeyDeviceKey \Registry\Machine\System\CurrentControlSet\Control\Video\{07392F79-B7BE-11E8-80F1-DC4A3E8D5303}\0000 szManufacturer Advanced Micro Devices, Inc. szMiniVdd unknown szMiniVddDateEnglish Unknown szMiniVddDateLocalized unknown szMonitorMaxRes Unknown szMonitorName Generic PnP Monitor szNotesEnglish No problems found. szNotesLocalized No problems found. szOverlayEnglish Not Supported szRankOfInstalledDriver 00D10001 szRegHelpText Unknown szRevision Unknown szRevisionId 0x0000 szSubSysId 0x22831458 szTestResultD3D7English Not run szTestResultD3D7Localized Not run szTestResultD3D8English Not run szTestResultD3D8Localized Not run szTestResultD3D9English Not run szTestResultD3D9Localized Not run szTestResultDDEnglish Not run szTestResultDDLocalized Not run szVdd unknown szVendorId 0x1002 Log Messages GpuProcessHostUIShim: GpuProcessHostUIShim:
,
Nov 28
Thanks guys for the replies! @phanindra.mandapaka I tested on the versions above 72.0 (both canary and developer version) and results were same. Chrome task manager is also same with the screenshot you've provided. @kbr Yes sure, I know requestAnimationFrame is much more efficient than setInterval and I also tested with it, but it ends up with same results. It happens occasionally instead of all the time when I launched the samples so what I'm doing is keeping testing on those samples again and again and trying to find regular rules when the problem occurs. I am also considering one of the case that the defection of my GPU maybe the reason. (but actually other 3D games like Overwatch is running very well on this machine so this has low possibility.) I'll keep posting if there is anything I discovered.
,
Nov 28
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 28
orange4glace@: OK. Please tell us if you come up with more reliable reproduction steps. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by woxxom@gmail.com
, Nov 22