New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 828262 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
OOO until 2019-01-24
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug

Blocking:
issue 829632
issue 834500



Sign in to add a comment

Unreal Engine's WebGL/WASM export renders incorrectly if MobileHDR mode is disabled

Project Member Reported by kbr@chromium.org, Apr 3 2018

Issue description

Google Chrome	67.0.3386.0 (Official Build) canary (64-bit)
Revision	83a2c341a3999a32a01e268bdb891a56d6edd548-refs/heads/master@{#547395}
OS: macOS 10.13.3

What steps will reproduce the problem?
(1) Download and unzip this archive:
https://drive.google.com/open?id=11FzINUW1s9MAkIiDvR5poBh5Stv0ojIF
(2) From the unzipped directory run:
python -m SimpleHTTPServer
(3) Navigate to:
http://localhost:8000/BP_blank4.html

What is the expected result?

Expect scene to render as in attached screenshot (from Firefox Nightly 61).


What happens instead?

Scene is blank.

From code inspection and from using the SpectorJS extension (in which the scene renders correctly), it looks like the problem may be in the handling of the preserveDrawingBuffer context creation option. This engine uses clearBufferfv and clearBufferfi to clear its color and depth/stencil buffers, and it looks like those APIs don't correctly maintain the DrawingBuffer::buffer_clear_needed_ flag like WebGLRenderingContextBase::ClearIfComposited does.

Graphics Feature Status
Canvas: Hardware accelerated
CheckerImaging: Enabled
Flash: Hardware accelerated
Flash Stage3D: Hardware accelerated
Flash Stage3D Baseline profile: Hardware accelerated
Compositing: Hardware accelerated
Multiple Raster Threads: Enabled
Native GpuMemoryBuffers: Hardware accelerated
Rasterization: Unavailable
Surface Synchronization: Enabled
Video Decode: Hardware accelerated
Viz Service Display Compositor: Disabled
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
add_and_true_to_loop_condition
adjust_src_dst_region_for_blitframebuffer
avoid_stencil_buffers
decode_encode_srgb_for_generatemipmap
depth_stencil_renderbuffer_resize_emulation
disable_framebuffer_cmaa
disable_webgl_rgb_multisampling_usage
dont_use_loops_to_initialize_variables
emulate_abs_int_function
get_frag_data_info_bug
init_two_cube_map_levels_before_copyteximage
msaa_is_slow
pack_parameters_workaround_with_pack_buffer
rebind_transform_feedback_before_resume
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
reset_teximage2d_base_level
rewrite_texelfetchoffset_to_texelfetch
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
unpack_image_height_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_unused_standard_shared_blocks
Problems Detected
Macs with NVidia GPUs experience rendering issues on High Sierra: 773705
Disabled Features: gpu_rasterization
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565
Applied Workarounds: msaa_is_slow
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Multisample renderbuffers with format GL_RGB8 have performance issues on Intel GPUs.: 607130
Applied Workarounds: disable_webgl_rgb_multisampling_usage
Use GL_INTEL_framebuffer_CMAA on ChromeOS: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glResumeTransformFeedback works incorrectly on Intel GPUs: 638514
Applied Workarounds: rebind_transform_feedback_before_resume
Result of abs(i) where i is an integer in vertex shader is wrong: 642227
Applied Workarounds: emulate_abs_int_function
Rewrite texelFetchOffset to texelFetch for Intel Mac: 642605
Applied Workarounds: rewrite_texelfetchoffset_to_texelfetch
Rewrite condition in for and while loops for Intel Mac: 644669
Applied Workarounds: add_and_true_to_loop_condition
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Init first two levels before CopyTexImage2D for cube map texture on Intel Mac 10.12: 648197
Applied Workarounds: init_two_cube_map_levels_before_copyteximage
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
Tex(Sub)Image3D performs incorrectly when uploading from unpack buffer with GL_UNPACK_IMAGE_HEIGHT greater than zero on Intel Macs: 654258
Applied Workarounds: unpack_image_height_workaround_with_unpack_buffer
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
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)
Certain Apple devices leak stencil buffers: 713854
Applied Workarounds: avoid_stencil_buffers
Reset TexImage2D base level to 0 on Intel Mac 10.12.4: 705865
Applied Workarounds: reset_teximage2d_base_level
Depth/stencil renderbuffers can't be resized on NVIDIA on early macOS 10.13: 775202
Applied Workarounds: depth_stencil_renderbuffer_resize_emulation
Don't expose disjoint_timer_query extensions to WebGL: 808744
Shader variable initialization in a loop caused perf regression on Mac Intel.: 809422
Applied Workarounds: dont_use_loops_to_initialize_variables
Viz service display compositor is not enabled by default.
Disabled Features: viz_display_compositor
Version Information
Data exported	2018-04-03T03:37:41.133Z
Chrome version	Chrome/67.0.3386.0
Operating system	Mac OS X 10.13.3
Software rendering list URL	https://chromium.googlesource.com/chromium/src/+/83a2c341a3999a32a01e268bdb891a56d6edd548/gpu/config/software_rendering_list.json
Driver bug list URL	https://chromium.googlesource.com/chromium/src/+/83a2c341a3999a32a01e268bdb891a56d6edd548/gpu/config/gpu_driver_bug_list.json
ANGLE commit id	d104918fd531
2D graphics backend	Skia/67 0806b7ce3b594aef2b28bed8230a7923ed93415a-
Command Line	/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary --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/ --flag-switches-begin --enable-features=OmniboxUIExperimentNarrowDropdown,OmniboxUIExperimentShowSuggestionFavicons,OmniboxUIExperimentVerticalMargin,WebAssembly --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	55
In-process GPU	false
Passthrough Command Decoder	false
Direct Composition	false
Supports overlays	false
Sandboxed	true
GPU0	VENDOR = 0x10de, DEVICE= 0x0fe9
GPU1	VENDOR = 0x8086, DEVICE= 0x0d26 *ACTIVE*
Optimus	true
Optimus	true
AMD switchable	false
Driver vendor	
Driver version	10.28.10 355.11.10.10.20.111
Driver date	
Pixel shader version	4.10
Vertex shader version	4.10
Max. MSAA samples	8
Machine model name	MacBookPro
Machine model version	11.3
GL_VENDOR	NVIDIA Corporation
GL_RENDERER	NVIDIA GeForce GT 750M OpenGL Engine
GL_VERSION	4.1 NVIDIA-10.28.10 355.11.10.10.20.111
GL_EXTENSIONS	GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions	GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent
Disabled WebGL Extensions	EXT_disjoint_timer_query EXT_disjoint_timer_query_webgl2
Window system binding vendor	
Window system binding version	
Window system binding extensions	
Direct rendering	Yes
Reset notification strategy	0x0000
GPU process crash count	0
Compositor Information
Tile Update Mode	Zero-copy
Partial Raster	Enabled
GpuMemoryBuffers Status
ATC	Software only
ATCIA	Software only
DXT1	Software only
DXT5	Software only
ETC1	Software only
R_8	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
R_16	Software only
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
BGRX_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE
BGRX_1010102	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RGBX_1010102	Software only
BGRA_8888	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RGBA_F16	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420	Software only
YUV_420_BIPLANAR	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422	GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
Display(s) Information
Info	Display[69732482] bounds=[0,0 1440x900], workarea=[0,23 1440x877], scale=2, 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 4096x2160 pixels
Decode h264 extended	up to 4096x2160 pixels
Decode h264 main	up to 4096x2160 pixels
Decode h264 high	up to 4096x2160 pixels
Encode h264 baseline	up to 4096x2160 pixels and/or 30.000 fps
Encode h264 main	up to 4096x2160 pixels and/or 30.000 fps
Encode h264 high	up to 4096x2160 pixels and/or 30.000 fps

 
Screen Shot 2018-04-02 at 7.49.45 PM.png
401 KB View Download

Comment 1 by kbr@chromium.org, Apr 3 2018

Owner: kbr@chromium.org
Status: Assigned (was: Available)
Confirmed that adding calls to:
  GetDrawingBuffer()->SetBufferClearNeeded(false);
in WebGL2RenderingContextBase::clearBufferfv works around the problem. That trivial solution isn't the complete picture since we need to see whether the scissor rectangle was set like in WebGLRenderingContextBase::ClearIfComposited.

I'll figure out how to produce a test case for this.

Comment 2 by kbr@chromium.org, Apr 6 2018

Blocking: 829632
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f

commit a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f
Author: Kenneth Russell <kbr@chromium.org>
Date: Fri Apr 06 04:22:02 2018

Make clearBuffer APIs work with preserveDrawingBuffer:false.

The state of which buffers (color, depth, stencil) were modified was
not being tracked properly with the introduction of the ES 3.0 / WebGL
2.0 APIs. Generalize DrawingBuffer's tracking, and make these APIs
update the state properly.

Tested with new WebGL conformance test in
https://github.com/KhronosGroup/WebGL/pull/2628 .

Bug:  828262 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I8d87b1940a73c689c2107d969139ad8c9c265ce5
Reviewed-on: https://chromium-review.googlesource.com/994463
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548667}
[modify] https://crrev.com/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
[modify] https://crrev.com/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.h
[modify] https://crrev.com/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
[modify] https://crrev.com/a96f5f8168db928f0ac94ee9a4c4f32a6dc8444f/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h

Labels: TE-Verified-67.0.3393.0 TE-Verified-M67
Able to reproduce the issue using chrome reported version #67.0.3386.0.

Verified the fix on Mac 10.13.3, Win-10 and Ubuntu 14.04 using Chrome version #67.0.3393.0 as per the comment #0.
Attaching screen shot for reference.
Observed that a scene rendered as in attached screenshot at comment #0.
Hence, the fix is working as expected. 
Adding the verified labels.

Thanks...!!
828262.png
602 KB View Download
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5fd79c66c041e669cb7cc0d0a41dbcdac886649

commit d5fd79c66c041e669cb7cc0d0a41dbcdac886649
Author: Kenneth Russell <kbr@chromium.org>
Date: Thu Apr 12 23:23:34 2018

Roll WebGL aef0b3a..7c0541d

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/aef0b3a..7c0541d

Bug:  804118 ,  818336 ,  828262 ,  angleproject:2381 
Tbr: zmo@chromium.org, kainino@chromium.org, jdarpinian@chromium.org
Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_angle_rel_ng;luci.chromium.try:win_angle_rel_ng
Change-Id: I28b3d55e43f5633ffe4c8cd6e7e375dd2fba2b9b
Reviewed-on: https://chromium-review.googlesource.com/1010910
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550408}
[modify] https://crrev.com/d5fd79c66c041e669cb7cc0d0a41dbcdac886649/DEPS
[modify] https://crrev.com/d5fd79c66c041e669cb7cc0d0a41dbcdac886649/content/test/gpu/gpu_tests/webgl_conformance_revision.txt

Comment 6 by kbr@chromium.org, Apr 13 2018

Status: Fixed (was: Assigned)
The new WebGL conformance test for this, https://chromium.googlesource.com/external/khronosgroup/webgl/+/master/sdk/tests/conformance2/rendering/clearbuffer-and-draw.html , is now running on the bots. Closing.

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d5fd79c66c041e669cb7cc0d0a41dbcdac886649

commit d5fd79c66c041e669cb7cc0d0a41dbcdac886649
Author: Kenneth Russell <kbr@chromium.org>
Date: Thu Apr 12 23:23:34 2018

Roll WebGL aef0b3a..7c0541d

https://chromium.googlesource.com/external/khronosgroup/webgl.git/+log/aef0b3a..7c0541d

Bug:  804118 ,  818336 ,  828262 ,  angleproject:2381 
Tbr: zmo@chromium.org, kainino@chromium.org, jdarpinian@chromium.org
Cq-Include-Trybots: luci.chromium.try:win_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_angle_rel_ng;luci.chromium.try:win_angle_rel_ng
Change-Id: I28b3d55e43f5633ffe4c8cd6e7e375dd2fba2b9b
Reviewed-on: https://chromium-review.googlesource.com/1010910
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550408}
[modify] https://crrev.com/d5fd79c66c041e669cb7cc0d0a41dbcdac886649/DEPS
[modify] https://crrev.com/d5fd79c66c041e669cb7cc0d0a41dbcdac886649/content/test/gpu/gpu_tests/webgl_conformance_revision.txt

Comment 8 by kbr@chromium.org, Apr 19 2018

Blocking: 834500

Sign in to add a comment