Closed Bug 1657690 Opened 4 years ago Closed 4 years ago

backface-visibility regression when using negative scale

Categories

(Core :: Graphics: WebRender, defect, P3)

80 Branch
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- wontfix
firefox81 --- fixed

People

(Reporter: me, Assigned: gw)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: correctness, regression, testcase)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

Using Firefox Nightly/Developer Edition (see below) with webrender enabled, load this fiddle: https://jsfiddle.net/yodfzhtm/

I believe the bug occurs any time "backface-visibility: hidden" is used on a "transform-style: preserve-3d" element inside an element with "transform: scale*".

Application Basics

Name: Firefox
Version: 80.0b4
Build ID: 20200804180257
Distribution ID:
Update Channel: aurora
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0
OS: Darwin 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64
Multiprocess Windows: 3/3 Enabled by default
Remote Processes: 11
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false

Graphics

Features
Compositing: WebRender
Asynchronous Pan/Zoom: wheel input enabled; scrollbar drag enabled; keyboard enabled; autoscroll enabled
WebGL 1 Driver WSI Info: CGL
WebGL 1 Driver Renderer: Intel Inc. -- Intel(R) HD Graphics 630
WebGL 1 Driver Version: 4.1 INTEL-14.7.8
WebGL 1 Driver 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_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic 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
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_float_blend EXT_frag_depth EXT_shader_texture_lod EXT_sRGB EXT_texture_compression_rgtc EXT_texture_filter_anisotropic MOZ_debug OES_element_index_uint OES_fbo_render_mipmap 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_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_explicit_present WEBGL_lose_context
WebGL 2 Driver WSI Info: CGL
WebGL 2 Driver Renderer: Intel Inc. -- Intel(R) HD Graphics 630
WebGL 2 Driver Version: 4.1 INTEL-14.7.8
WebGL 2 Driver 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_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic 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
WebGL 2 Extensions: EXT_color_buffer_float EXT_float_blend EXT_texture_compression_rgtc EXT_texture_filter_anisotropic MOZ_debug OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_explicit_present WEBGL_lose_context
Uses Tiling: true
Uses Tiling (Content): true
Off Main Thread Painting Enabled: true
Off Main Thread Painting Worker Count: 4
Target Frame Rate: 60
GPU #1
Active: Yes
Vendor ID: 0x8086
Device ID: 0x591b
RAM: 0
GPU #2
Active: Yes
Vendor ID: 0x1002
Device ID: 0x67ef
RAM: 0
Diagnostics
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureFallbackCanvasBackend: none
Display0: 1920x1080 scale:1.000000
Display1: 1680x1050 scale:2.000000
Display2: 1920x1080 scale:1.000000
DisplayCount: 3
TileHeight: 512
TileWidth: 512
Decision Log
HW_COMPOSITING:
available by default
force_enabled by user: Force-enabled by pref
OPENGL_COMPOSITING:
available by default
force_enabled by user: Force-enabled by pref
WEBRENDER:
opt-in by default: WebRender is an opt-in feature
available by user: Force enabled by pref
WEBRENDER_QUALIFIED:
available by default
blocklisted by env: No qualified hardware
WEBRENDER_COMPOSITOR:
available by default
WEBRENDER_ANGLE:
opt-in by default: WebRender ANGLE is an opt-in feature
WEBRENDER_DCOMP_PRESENT:
opt-in by default: WebRender DirectComposition is an opt-in feature
OMTP:
available by default
WEBGPU:
disabled by default: Disabled by default
available by user: Enabled via dom.webgpu.enabled
blocked by runtime: WebGPU can only be enabled in nightly

Actual results:

The red square is visible.

Expected results:

The red square should not be visible.

Note the visibility is correct when using the same browser with "gfx.webrender.force-disabled = true" (BuildID = 20200804180257, Compositing = OpenGL) or in Firefox 79 (Build ID = 20200720193547, Compositing = WebRender) .

Summary: backface-visibility regression when using preserve-3d → backface-visibility regression when using negative scale

Thanks for the report!
mozregression --good 2020-01-01 --bad 2020-08-06 --pref gfx.webrender.all:true -a https://bugzilla.mozilla.org/attachment.cgi?id=9168557

8:16.12 INFO: Last good revision: 99616c0729ec7a21dc0c1bde523c9779b71a0af9
8:16.12 INFO: First bad revision: 72f4a4d07192ef6dc64f8d3a8fdfe6124db14ae7
8:16.12 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=99616c0729ec7a21dc0c1bde523c9779b71a0af9&tochange=72f4a4d07192ef6dc64f8d3a8fdfe6124db14ae7

72f4a4d07192ef6dc64f8d3a8fdfe6124db14ae7 Glenn Watson — Bug 1654442 - Add primitives to picture cache slices earlier during scene building r=nical

(That's the commit that surprisingly fixed bug 1655330.)

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
Flags: needinfo?(gwatson)
OS: Unspecified → All
Regressed by: 1654442
Hardware: Unspecified → All
Severity: -- → S3
Priority: -- → P3
Assignee: nobody → gwatson
Flags: needinfo?(gwatson)

Ensure the current ancestor spatial node for backface visibility
calculations is tracked, even when an otherwise redundant stacking
context is removed.

The code handling flattened stacking contexts is overcomplicated,
due to limitations in the current public API. For now, this seems
like a reasonable fix, although long term we should adapt the
public API so that the internals are not so complex (specifically,
the current stacking context API serves many related purposes, and
should be split up into more explicit APIs for defining a 3d context,
filter list etc).

Pushed by gwatson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3522dfed46ee Fix an edge case backface visibility regression. r=kvark
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

The patch landed in nightly and beta is affected.
:gw, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(gwatson)

S3, and we're out of betas for 80.

Flags: needinfo?(gwatson)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: