New issue
Advanced search Search tips

Issue 706366 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug

Blocked on:
issue swiftshader:35
issue 707298



Sign in to add a comment

Failed to create hardware WebGL context, software context doesn't update game

Reported by kont...@trzeci.eu, Mar 29 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

Example URL:
http://beta.unity3d.com/jonas/AngryBots/

Steps to reproduce the problem:
1. Open any page what uses WebGL context (and supports fallback to software render) 
2. Observe that an app or a game displays first frame
3. Observe that the app isn't updating a 3D content anymore. 
4. Observe that audio works, application reacts on mouse/keyboard input - it's fully functional. 

--- 

The content of canvas can be forced to be refreshed by:
- scrolling a page
- zooming a page
- changing size of canvas

What is the expected behavior?
Software WebGL mode should refresh content like hardware mode does. 

What went wrong?
Simplified version of creating context:

// -------- setup
let contextAttributes = {
		antialias :  false,
		depth :  true,
		stencil :  true
}
canvas.addEventListener("webglcontextcreationerror", function(e) { console.log(e.statusMessage); }, false);

// -------- test
contextAttributes.failIfMajorPerformanceCaveat = true;
let ctx = canvas.getContext("webgl", contextAttributes);
// CONSOLE: Could not create a WebGL context, VENDOR = 0x1002, DEVICE = 0x6606, GL_VERSION = 15.200.1045.0, Sandboxed = yes, Optimus = no, AMD switchable = no, Reset notification strategy = 0x0000, GPU process crash count = 0, ErrorMessage = bindToCurrentThread failed: .

contextAttributes.failIfMajorPerformanceCaveat = true;
let ctx = canvas.getContext("webgl", contextAttributes);
// Context created, no error, but content of canvas isn't refreshing itself

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 57.0.2987.110  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 25.0 r0

- Firefox and Ms Edge can create a hardware context.
- Tested also on Canary: 59.0.3055.0
 
gpu.htm
52.6 KB View Download

Comment 1 by kont...@trzeci.eu, Mar 29 2017

Copy/Paste error. Here you can see one more time JS testing snippet: 

// ------------------------------
// -------- setup
let contextAttributes = {
		antialias :  false,
		depth :  true,
		stencil :  true
}
canvas.addEventListener("webglcontextcreationerror", function(e) { console.log(e.statusMessage); }, false);

// -------- test
contextAttributes.failIfMajorPerformanceCaveat = true;
let ctx = canvas.getContext("webgl", contextAttributes);
// CONSOLE: Could not create a WebGL context, VENDOR = 0x1002, DEVICE = 0x6606, GL_VERSION = 15.200.1045.0, Sandboxed = yes, Optimus = no, AMD switchable = no, Reset notification strategy = 0x0000, GPU process crash count = 0, ErrorMessage = bindToCurrentThread failed: .
// ctx is null

contextAttributes.failIfMajorPerformanceCaveat = false;
let ctx = canvas.getContext("webgl", contextAttributes);
// Context created, no error, but content of canvas isn't refreshing itself

// ------------------------------


Comment 2 by kont...@trzeci.eu, Mar 29 2017

Also a comment, that changing context attributes: 
let contextAttributes = {
		antialias :  false,
		depth :  false,
		stencil :  false
}

Doesn't solve this issue. 

Comment 3 by e...@chromium.org, Mar 29 2017

Components: -Blink Blink>WebGL

Comment 4 by capn@chromium.org, Mar 29 2017

This sounds like it could be  Issue swiftshader:35 . When you switch back and forth between tabs, does the content get updated?

Please also paste the entire output of chrome://gpu

Comment 5 by kont...@trzeci.eu, Mar 29 2017

Hi,
I attached gpu.htm in the topic of this issue, if it's not complete I can provide it in 1 day. 
IIRC, when tabs were switched it also updated content.

The linked ticket https://bugs.chromium.org/p/swiftshader/issues/detail?id=35 stands that it was fixed in Canary: 59.0.3049.0. 

I tested that the newest Canary version: 59.0.3055.0 is affected by my issue.

Comment 6 by kbr@chromium.org, Mar 29 2017

Components: Internals>GPU>SwiftShader
Owner: capn@chromium.org
Status: Assigned (was: Unconfirmed)
Assigning to capn@ to triage.

Comment 7 by kont...@trzeci.eu, Mar 30 2017

Hi, I can confirm that switching tabs repaints a canvas.

Comment 8 by capn@chromium.org, Mar 30 2017

Pasting your about:gpu plaintext here for reference:

Graphics Feature Status
Canvas: Software only, hardware acceleration unavailable
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
Rasterization: Software only. Hardware acceleration disabled
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
clear_uniforms_before_first_program_use
decode_encode_srgb_for_generatemipmap
disable_d3d11
disable_discard_framebuffer
disable_framebuffer_cmaa
exit_on_context_lost
force_cube_complete
msaa_is_slow
scalarize_vec_and_mat_constructor_args
texsubimage_faster_than_teximage
Problems Detected
GPU rasterization should only be enabled on NVIDIA Pascal and Maxwell, Intel Broadwell+, and AMD RX-R2 GPUs for now.: 643850
Disabled Features: gpu_rasterization
Accelerated VPx decoding is hanging on some videos.: 654111
Disabled Features: accelerated_vpx_decode
Some drivers are unable to reset the D3D device in the GPU process sandbox
Applied Workarounds: exit_on_context_lost
TexSubImage is faster for full uploads on ANGLE
Applied Workarounds: texsubimage_faster_than_teximage
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
Disable Direct3D11 on systems with AMD switchable graphics: 451420
Applied Workarounds: disable_d3d11
ANGLE crash on glReadPixels from incomplete cube map texture: 518889
Applied Workarounds: force_cube_complete
On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565
Applied Workarounds: msaa_is_slow
Framebuffer discarding can hurt performance on non-tilers: 570897
Applied Workarounds: disable_discard_framebuffer
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Decode and Encode before generateMipmap for srgb format textures on Windows: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Accelerated rasterization has been disabled, either via blacklist, about:flags or the command line.
Disabled Features: rasterization
Native GpuMemoryBuffers have been disabled, either via about:flags or command line.
Disabled Features: native_gpu_memory_buffers
Version Information
Data exported	3/28/2017, 5:32:09 PM
Chrome version	Chrome/57.0.2987.110
Operating system	Windows NT 10.0.14393
Software rendering list version	12.13
Driver bug list version	9.29
ANGLE commit id	c1a5d16e964a
2D graphics backend	Skia/57 ae9cc5d3588d52f4b371b55845704b25d88cf06d
Command Line Args	Files (x86)\Google\Chrome\Application\chrome.exe" --flag-switches-begin --flag-switches-end
Driver Information
Initialization time	110
In-process GPU	false
Passthrough Command Decoder	false
Sandboxed	true
GPU0	VENDOR = 0x1002, DEVICE= 0x6606
GPU1	VENDOR = 0x8086, DEVICE= 0x0416 *ACTIVE*
Optimus	false
AMD switchable	true
Desktop compositing	Aero Glass
Diagonal Monitor Size of \\.\DISPLAY2	24.0"
Diagonal Monitor Size of \\.\DISPLAY1	24.0"
Driver vendor	Advanced Micro Devices, Inc.
Driver version	15.200.1045.0
Driver date	6-22-2015
Pixel shader version	3.0
Vertex shader version	3.0
Max. MSAA samples	8
Machine model name	
Machine model version	
GL_VENDOR	Google Inc.
GL_RENDERER	ANGLE (Intel(R) HD Graphics 4600 Direct3D9Ex vs_3_0 ps_3_0)
GL_VERSION	OpenGL ES 2.0 (ANGLE 2.1.0.c1a5d16e964a)
GL_EXTENSIONS	GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays 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_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_frag_depth GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_fence GL_NV_pack_subimage GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary 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
Disabled Extensions	GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent
Window system binding vendor	Google Inc. (adapter LUID: 000000000000d5d3)
Window system binding version	1.4 (ANGLE 2.1.0.c1a5d16e964a)
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_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_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource
Direct rendering	Yes
Reset notification strategy	0x8252
GPU process crash count	0
Compositor Information
Tile Update Mode	One-copy
Partial Raster	Enabled
GpuMemoryBuffers Status
ATC	Software only
ATCIA	Software only
DXT1	Software only
DXT5	Software only
ETC1	Software only
R_8	Software only
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	Software only
BGRX_8888	Software only
BGRA_8888	Software only
YVU_420	Software only
YUV_420_BIPLANAR	Software only
UYVY_422	Software only
Diagnostics
... loading ...
Log Messages
GpuProcessHostUIShim: The GPU process exited normally. Everything is okay.
[3716:7336:0325/122427.059:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0325/122427.059:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 high
[3716:7336:0328/090153.091:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0328/090153.091:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 main
[3716:7336:0328/090515.526:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0328/090515.526:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 main
[3716:7336:0328/161422.289:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0328/161422.289:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 main
[3716:7336:0328/161505.052:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0328/161505.052:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 main
[3716:7336:0328/161749.177:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 593
[3716:7336:0328/161749.177:ERROR:gpu_video_decode_accelerator.cc(375)] : HW video decode not available for profile h264 main
GpuProcessHostUIShim: The GPU process exited normally. Everything is okay.
We're affected by the same problem, and we can reproduce it locally. Is there anything what we can help you to debug this issue?
To extend context: 
- It's exactly the same physical machine what is described in about:gpu log.
- It's a laptop: We could reproduce the issue on external screen and on embedded. 
- Ugly/hacky solution for it is to force refresh by changing size of canvas.

Changing canvas size might be an expensive operation, do you know if we can workaround this issue in some less intrusive way?

Comment 11 by capn@chromium.org, Mar 30 2017

Blockedon: swiftshader:35
Cc: sugoi@chromium.org geoffl...@chromium.org
Labels: -Pri-2 Pri-1
This about:gpu page shows that WebGL 1 and 2 are fully GPU accelerated, but Direct3D 11 is disabled because it's an AMD switchable. Direct3D 11 is a requisite of WebGL 2 on Windows, so something went wrong there.

Apparently it fails to even create a WebGL 1 context, and only allowing it to fall back to SwiftShader provides a WebGL context, but then Chrome doesn't update the frames properly.

I think these are three separate issues. WebGL 2 is not disabled properly, a WebGL 1 context can't be created on a whitelisted GPU combo, and I think we're seeing something very similar to  Issue swiftshader:35 .

I can confirm that on Chrome Canary with --disable-gpu the frames are not updating properly. When I replace the ANGLE libraries with SwiftShader, things are fine. So the symptoms are very similar to  Issue swiftshader:35  but apparently not all scenarios were fixed.

I'll look into the SwiftShader issue. I've CC'd Geoff Lang to take a look the blacklisting and context creation issue.
Cc: zmo@chromium.org

Comment 13 by zmo@chromium.org, Mar 30 2017

The design choice is not to make implicit dependency between feature status.  So I guess we just need to add more entries where D3D11 is disabled, we also disable WebGL2.

Comment 14 by kont...@trzeci.eu, Mar 30 2017

One comment from the owner of the machine where this problem has a place is that it used to work some time ago. Unfortunately I don't know if it was before update of Chrome, or something in system (drivers, windows update) has changed. 

Comment 15 by capn@chromium.org, Mar 31 2017

Blockedon: 707298

Comment 16 by capn@chromium.org, Apr 17 2017

Owner: zmo@chromium.org
 Issue 707298  has been fixed. Mo, could you take care of the blacklisting issue?

Comment 17 by zmo@chromium.org, Apr 17 2017

Status: Started (was: Assigned)
https://codereview.chromium.org/2824833002/

Comment 18 by capn@chromium.org, Jun 14 2017

Components: -Internals>GPU>SwiftShader
The patch referenced in #17 has landed. zmo@, is there anything left to do here?

Comment 20 by kont...@trzeci.eu, Nov 3 2017

I can confirm it works fine. Thx! 

Comment 21 by piman@chromium.org, Feb 26 2018

Status: Fixed (was: Started)
Marking fixed per earlier comments

Sign in to add a comment