visgl / deck.gl

WebGL2 powered visualization framework
https://deck.gl
MIT License
12.22k stars 2.08k forks source link

[Bug] Initializing GeoJSONLayer with one LineString feature takes ~500ms #7418

Open urdeveloper opened 1 year ago

urdeveloper commented 1 year ago

Description

Adding a GeoJSON layer with one LineString feature (two vertexes) takes about 500ms. I was only able to reproduce this in Chrome and Firefox on Windows and MacOS. I don't see this behavior when using Safari on iOS or MacOS.

Flavors

Expected Behavior

My expectation was creating a layer in its simplest form should almost be instantaneous.

Steps to Reproduce

To reproduce the issue, please run the following CodePen: https://codepen.io/urdeveloper-the-flexboxer/pen/dyKzgeB

Click on Draw Path, then Draw Point then Draw Path. The delay to draw a red line is very noticeable. Drawing the red point is roughly three times faster but still slow in my opinion.

Environment

Logs

The warnings from Chrome:

(After clicking on Draw Path) [Violation] 'requestAnimationFrame' handler took 593ms

(After clicking on Draw Point) [Violation] 'requestAnimationFrame' handler took 164ms

(After clicking on Draw Point again) [Violation] 'requestAnimationFrame' handler took 560ms

Pessimistress commented 1 year ago

This kind of issues are highly dependent on hardware/OS and very hard to reproduce. Do you mind sharing your machine information from chrome://gpu?

urdeveloper commented 1 year ago

Thanks for looking into this. I completely agree that we'll get different results with different hardware/OS. What's interesting is that I see the same performance issue on MacOS when using Chrome/Edge but not Safari.

Wasn't sure if there was any better way to show the log here, let me know you wanted to reduce it:

Graphics Feature Status Canvas: Hardware accelerated Canvas out-of-process rasterization: Disabled Direct Rendering Display Compositor: Disabled Compositing: Hardware accelerated Multiple Raster Threads: Enabled OpenGL: Enabled Rasterization: Hardware accelerated Raw Draw: Disabled Video Decode: Hardware accelerated Video Encode: Hardware accelerated Vulkan: Disabled WebGL: Hardware accelerated WebGL2: Hardware accelerated WebGPU: Hardware accelerated Driver Bug Workarounds check_ycbcr_studio_g22_left_p709_for_nv12_support clear_uniforms_before_first_program_use decode_encode_srgb_for_generatemipmap disable_accelerated_av1_encode disable_decode_swap_chain disable_direct_composition_sw_video_overlays disable_dynamic_video_encode_framerate_update disable_vp_super_resolution enable_bgra8_overlays_with_yuv_overlay_support enable_webgl_timer_query_extensions exit_on_context_lost max_msaa_sample_count_4 msaa_is_slow msaa_is_slow_2 no_downscaled_overlay_promotion disabled_extension_GL_KHR_blend_equation_advanced disabled_extension_GL_KHR_blend_equation_advanced_coherent Problems Detected 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 On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565, 1298585 Applied Workarounds: msaa_is_slow 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 Expose WebGL's disjoint_timer_query extensions on platforms with site isolation: 808744, 870491 Applied Workarounds: enable_webgl_timer_query_extensions Disable DecodeSwapChain for Intel Gen9 and older devices: 1107403 Applied Workarounds: disable_decode_swap_chain Intel GPUs fail to report BGRA8 overlay support: 1119491 Applied Workarounds: enable_bgra8_overlays_with_yuv_overlay_support 8x MSAA for WebGL contexts is slow on Win Intel: 1145793 Applied Workarounds: max_msaa_sample_count_4 Disable software overlays for Intel GPUs. All Skylake+ devices support hw overlays, older devices peform poorly.: 1192748 Applied Workarounds: disable_direct_composition_sw_video_overlays Check YCbCr_Studio_G22_Left_P709 color space for NV12 overlay support on Intel: 1103852 Applied Workarounds: check_ycbcr_studio_g22_left_p709_for_nv12_support Intel GPUs do not promote downscaled overlays: 1245835 Applied Workarounds: no_downscaled_overlay_promotion AVC/AV1 hardware encoder MFT output bitrate incorrect upon framerate update on Intel GPUs.: 1295815 Applied Workarounds: disable_dynamic_video_encode_framerate_update Don't use video processor super resolution on Intel Gen9 and older GPUs and non-Intel GPUs.: 1318380 Applied Workarounds: disable_vp_super_resolution On pre-Ice Lake Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565, 1298585, 1341830 Applied Workarounds: msaa_is_slow_2 Disable hardware MFT Av1 encoder on machines with multiple GPUs: 1367038 Applied Workarounds: disable_accelerated_av1_encode ANGLE Features allowCompressedFormats (Frontend workarounds): Enabled: true Allow compressed formats cacheCompiledShader (Frontend features) anglebug:7036: Disabled Enable to cache compiled shaders disableAnisotropicFiltering (Frontend workarounds): Disabled Disable support for anisotropic filtering disableProgramBinary (Frontend features) anglebug:5007: Disabled Disable support for GL_OES_get_program_binary disableProgramCachingForTransformFeedback (Frontend workarounds): Disabled On some GPUs, program binaries don't contain transform feedback varyings emulatePixelLocalStorage (Frontend features) anglebug:7279: Disabled: false Emulate ANGLE_shader_pixel_local_storage using shader images enableCaptureLimits (Frontend features) anglebug:5750: Disabled Set the context limits like frame capturing was enabled enableCompressingPipelineCacheInThreadPool (Frontend workarounds) anglebug:4722: Disabled: false Enable compressing pipeline cache in thread pool. enableProgramBinaryForCapture (Frontend features) anglebug:5658: Disabled Even if FrameCapture is enabled, enable GL_OES_get_program_binary forceDepthAttachmentInitOnClear (Frontend workarounds) anglebug:7246: Disabled: isAMD Force depth attachment initialization on clear ops forceGlErrorChecking (Frontend features) https://issuetracker.google.com/220069903: Disabled Force GL error checking (i.e. prevent applications from disabling error checking forceInitShaderVariables (Frontend features): Disabled Force-enable shader variable initialization forceRobustResourceInit (Frontend features) anglebug:6041: Disabled Force-enable robust resource init loseContextOnOutOfMemory (Frontend workarounds): Enabled: true Some users rely on a lost context notification if a GL_OUT_OF_MEMORY error occurs scalarizeVecAndMatConstructorArgs (Frontend workarounds) 1165751: Disabled: false Always rewrite vec/mat constructors to be consistent addMockTextureNoRenderTarget (D3D workarounds) anglebug:2152: Disabled: isIntel && capsVersion >= IntelDriverVersion(160000) && capsVersion < IntelDriverVersion(164815) On some drivers when rendering with no render target, two bugs lead to incorrect behavior allowClearForRobustResourceInit (D3D workarounds) 941620: Enabled: true Some drivers corrupt texture data when clearing for robust resource initialization. allowES3OnFL100 (D3D workarounds): Disabled: false Allow ES3 on 10.0 devices allowTranslateUniformBlockToStructuredBuffer (D3D workarounds) anglebug:3682: Enabled: IsWin10OrGreater() There is a slow fxc compile performance issue with dynamic uniform indexing if translating a uniform block with a large array member to cbuffer. callClearTwice (D3D workarounds) 655534: Disabled: isIntel && isSkylake && capsVersion >= IntelDriverVersion(160000) && capsVersion < IntelDriverVersion(164771) Using clear() may not take effect depthStencilBlitExtraCopy (D3D workarounds) anglebug:1452: Disabled Bug in some drivers triggers a TDR when using CopySubresourceRegion from a staging texture to a depth/stencil disableB5G6R5Support (D3D workarounds): Disabled: (isIntel && capsVersion >= IntelDriverVersion(150000) && capsVersion < IntelDriverVersion(154539)) || isAMD Textures with the format DXGI_FORMAT_B5G6R5_UNORM have incorrect data disableRasterizerOrderViews (D3D workarounds) anglebug:7279: Disabled Disable ROVs for testing emulateIsnanFloat (D3D workarounds) 650547: Disabled: isIntel && isSkylake && capsVersion >= IntelDriverVersion(160000) && capsVersion < IntelDriverVersion(164542) Using isnan() on highp float will get wrong answer emulateTinyStencilTextures (D3D workarounds): Disabled: isAMD && !(deviceCaps.featureLevel < D3D_FEATURE_LEVEL_10_1) 1x1 and 2x2 mips of depth/stencil textures aren't sampled correctly expandIntegerPowExpressions (D3D workarounds): Enabled: true The HLSL optimizer has a bug with optimizing 'pow' in certain integer-valued expressions flushAfterEndingTransformFeedback (D3D workarounds): Disabled: isNvidia Some drivers sometimes write out-of-order results to StreamOut buffers when transform feedback is used to repeatedly write to the same buffer positions forceAtomicValueResolution (D3D workarounds) anglebug:3246: Disabled: isNvidia On some drivers the return value from RWByteAddressBuffer.InterlockedAdd does not resolve when used in the .yzw components of a RWByteAddressBuffer.Store operation getDimensionsIgnoresBaseLevel (D3D workarounds): Disabled: isNvidia Some drivers do not take into account the base level of the texture in the results of the HLSL GetDimensions builtin mrtPerfWorkaround (D3D workarounds): Enabled: true Some drivers have a bug where they ignore null render targets preAddTexelFetchOffsets (D3D workarounds): Enabled: isIntel HLSL's function texture.Load returns 0 when the parameter Location is negative, even if the sum of Offset and Location is in range rewriteUnaryMinusOperator (D3D workarounds): Disabled: isIntel && (isBroadwell || isHaswell) && capsVersion >= IntelDriverVersion(150000) && capsVersion < IntelDriverVersion(154624) Evaluating unary minus operator on integer may get wrong answer in vertex shaders selectViewInGeometryShader (D3D workarounds): Disabled: !deviceCaps.supportsVpRtIndexWriteFromVertexShader The viewport or render target slice will be selected in the geometry shader stage for the ANGLE_multiview extension setDataFasterThanImageUpload (D3D workarounds): Enabled: !(isIvyBridge || isBroadwell || isHaswell) Set data faster than image upload skipVSConstantRegisterZero (D3D workarounds): Disabled: isNvidia In specific cases the driver doesn't handle constant register zero correctly useInstancedPointSpriteEmulation (D3D workarounds): Disabled: isFeatureLevel9_3 Some D3D11 renderers do not support geometry shaders for pointsprite emulation useSystemMemoryForConstantBuffers (D3D workarounds) 593024: Enabled: isIntel Copying from staging storage to constant buffer storage does not work zeroMaxLodWorkaround (D3D workarounds): Disabled: isFeatureLevel9_3 Missing an option to disable mipmaps on a mipmapped texture DAWN Info

D3D12 backend - Intel(R) UHD Graphics 630 [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_d3d12_resource_heap_tier2: https://crbug.com/dawn/27: Enable support for resource heap tier 2. Resource heap tier 2 allows mixing of texture and buffers in the same heap. This allows better heap re-use and reduces fragmentation. use_d3d12_render_pass: https://crbug.com/dawn/36: Use the D3D12 render pass API introduced in Windows build 1809 by default. On versions of Windows prior to build 1809, or when this toggle is turned off, Dawn will emulate a render pass. use_d3d12_residency_management: https://crbug.com/dawn/193: Enable residency management. This allows page-in and page-out of resource heaps in GPU memory. This component improves overcommitted performance by keeping the most recently used resources local to the GPU. Turning this component off can cause allocation failures when application memory exceeds physical device memory. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. use_temp_buffer_in_small_format_texture_to_texture_copy_from_greater_to_less_mip_level: https://crbug.com/1161355: Split texture-to-texture copy into two copies: copy from source texture into a temporary buffer, and copy from the temporary buffer into the destination texture under specific situations. This workaround is by default enabled on some Intel GPUs which have a driver bug in the execution of CopyTextureRegion() when we copy with the formats whose texel block sizes are less than 4 bytes from a greater mip level to a smaller mip level on D3D12 backends. d3d12_split_buffer_texture_copy_for_rows_per_image_paddings: https://crbug.com/dawn/1289: D3D12 requires more buffer storage than it should when rowsPerImage is greater than copyHeight, which means there are pure padding row(s) on each image. In this situation, the buffer used for B2T/T2B copy might be big enough according to WebGPU's spec but it doesn't meet D3D12's requirement, then we need to workaround it via split the copy operation into two copies, in order to make B2T/T2B copy being done correctly on D3D12. d3d12_force_clear_copyable_depth_stencil_texture_on_creation: https://crbug.com/dawn/1487: Always clearing copyable depth stencil textures when creating them instead of skipping the initialization when the entire subresource is the copy destination as a workaround on Intel D3D12 drivers. apply_clear_big_integer_color_value_with_draw: https://crbug.com/dawn/537: Apply the clear value of the color attachment with a draw call when load op is 'clear'. This toggle is enabled by default on D3D12 backends when we set large integer values (> 2^24 or < -2^24 for signed integer formats) as the clear value of a color attachment with 32-bit integer or unsigned integer formats because D3D12 APIs only support using float numbers as clear values, while a float number cannot always precisely represent an integer that is greater than 2^24 or smaller than -2^24). This toggle is also enabled on Intel GPUs on Metal backend due to a driver issue on Intel Metal driver. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc pipeline-statistics-query timestamp-query depth32float-stencil8 chromium-experimental-dp4a indirect-first-instance shader-f16 dawn-internal-usages multiplanar-formats dawn-native D3D12 backend - NVIDIA Quadro T1000 [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_d3d12_resource_heap_tier2: https://crbug.com/dawn/27: Enable support for resource heap tier 2. Resource heap tier 2 allows mixing of texture and buffers in the same heap. This allows better heap re-use and reduces fragmentation. use_d3d12_render_pass: https://crbug.com/dawn/36: Use the D3D12 render pass API introduced in Windows build 1809 by default. On versions of Windows prior to build 1809, or when this toggle is turned off, Dawn will emulate a render pass. use_d3d12_residency_management: https://crbug.com/dawn/193: Enable residency management. This allows page-in and page-out of resource heaps in GPU memory. This component improves overcommitted performance by keeping the most recently used resources local to the GPU. Turning this component off can cause allocation failures when application memory exceeds physical device memory. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. d3d12_split_buffer_texture_copy_for_rows_per_image_paddings: https://crbug.com/dawn/1289: D3D12 requires more buffer storage than it should when rowsPerImage is greater than copyHeight, which means there are pure padding row(s) on each image. In this situation, the buffer used for B2T/T2B copy might be big enough according to WebGPU's spec but it doesn't meet D3D12's requirement, then we need to workaround it via split the copy operation into two copies, in order to make B2T/T2B copy being done correctly on D3D12. apply_clear_big_integer_color_value_with_draw: https://crbug.com/dawn/537: Apply the clear value of the color attachment with a draw call when load op is 'clear'. This toggle is enabled by default on D3D12 backends when we set large integer values (> 2^24 or < -2^24 for signed integer formats) as the clear value of a color attachment with 32-bit integer or unsigned integer formats because D3D12 APIs only support using float numbers as clear values, while a float number cannot always precisely represent an integer that is greater than 2^24 or smaller than -2^24). This toggle is also enabled on Intel GPUs on Metal backend due to a driver issue on Intel Metal driver. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc pipeline-statistics-query timestamp-query depth32float-stencil8 chromium-experimental-dp4a indirect-first-instance shader-f16 dawn-internal-usages multiplanar-formats dawn-native D3D12 backend - Intel(R) UHD Graphics 630 [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_d3d12_resource_heap_tier2: https://crbug.com/dawn/27: Enable support for resource heap tier 2. Resource heap tier 2 allows mixing of texture and buffers in the same heap. This allows better heap re-use and reduces fragmentation. use_d3d12_render_pass: https://crbug.com/dawn/36: Use the D3D12 render pass API introduced in Windows build 1809 by default. On versions of Windows prior to build 1809, or when this toggle is turned off, Dawn will emulate a render pass. use_d3d12_residency_management: https://crbug.com/dawn/193: Enable residency management. This allows page-in and page-out of resource heaps in GPU memory. This component improves overcommitted performance by keeping the most recently used resources local to the GPU. Turning this component off can cause allocation failures when application memory exceeds physical device memory. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. use_temp_buffer_in_small_format_texture_to_texture_copy_from_greater_to_less_mip_level: https://crbug.com/1161355: Split texture-to-texture copy into two copies: copy from source texture into a temporary buffer, and copy from the temporary buffer into the destination texture under specific situations. This workaround is by default enabled on some Intel GPUs which have a driver bug in the execution of CopyTextureRegion() when we copy with the formats whose texel block sizes are less than 4 bytes from a greater mip level to a smaller mip level on D3D12 backends. d3d12_split_buffer_texture_copy_for_rows_per_image_paddings: https://crbug.com/dawn/1289: D3D12 requires more buffer storage than it should when rowsPerImage is greater than copyHeight, which means there are pure padding row(s) on each image. In this situation, the buffer used for B2T/T2B copy might be big enough according to WebGPU's spec but it doesn't meet D3D12's requirement, then we need to workaround it via split the copy operation into two copies, in order to make B2T/T2B copy being done correctly on D3D12. d3d12_force_clear_copyable_depth_stencil_texture_on_creation: https://crbug.com/dawn/1487: Always clearing copyable depth stencil textures when creating them instead of skipping the initialization when the entire subresource is the copy destination as a workaround on Intel D3D12 drivers. apply_clear_big_integer_color_value_with_draw: https://crbug.com/dawn/537: Apply the clear value of the color attachment with a draw call when load op is 'clear'. This toggle is enabled by default on D3D12 backends when we set large integer values (> 2^24 or < -2^24 for signed integer formats) as the clear value of a color attachment with 32-bit integer or unsigned integer formats because D3D12 APIs only support using float numbers as clear values, while a float number cannot always precisely represent an integer that is greater than 2^24 or smaller than -2^24). This toggle is also enabled on Intel GPUs on Metal backend due to a driver issue on Intel Metal driver. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc pipeline-statistics-query timestamp-query depth32float-stencil8 chromium-experimental-dp4a indirect-first-instance shader-f16 dawn-internal-usages multiplanar-formats dawn-native D3D12 backend - Microsoft Basic Render Driver [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_d3d12_resource_heap_tier2: https://crbug.com/dawn/27: Enable support for resource heap tier 2. Resource heap tier 2 allows mixing of texture and buffers in the same heap. This allows better heap re-use and reduces fragmentation. use_d3d12_render_pass: https://crbug.com/dawn/36: Use the D3D12 render pass API introduced in Windows build 1809 by default. On versions of Windows prior to build 1809, or when this toggle is turned off, Dawn will emulate a render pass. use_d3d12_residency_management: https://crbug.com/dawn/193: Enable residency management. This allows page-in and page-out of resource heaps in GPU memory. This component improves overcommitted performance by keeping the most recently used resources local to the GPU. Turning this component off can cause allocation failures when application memory exceeds physical device memory. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. d3d12_split_buffer_texture_copy_for_rows_per_image_paddings: https://crbug.com/dawn/1289: D3D12 requires more buffer storage than it should when rowsPerImage is greater than copyHeight, which means there are pure padding row(s) on each image. In this situation, the buffer used for B2T/T2B copy might be big enough according to WebGPU's spec but it doesn't meet D3D12's requirement, then we need to workaround it via split the copy operation into two copies, in order to make B2T/T2B copy being done correctly on D3D12. apply_clear_big_integer_color_value_with_draw: https://crbug.com/dawn/537: Apply the clear value of the color attachment with a draw call when load op is 'clear'. This toggle is enabled by default on D3D12 backends when we set large integer values (> 2^24 or < -2^24 for signed integer formats) as the clear value of a color attachment with 32-bit integer or unsigned integer formats because D3D12 APIs only support using float numbers as clear values, while a float number cannot always precisely represent an integer that is greater than 2^24 or smaller than -2^24). This toggle is also enabled on Intel GPUs on Metal backend due to a driver issue on Intel Metal driver. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc pipeline-statistics-query timestamp-query depth32float-stencil8 indirect-first-instance shader-f16 dawn-internal-usages multiplanar-formats dawn-native Vulkan backend - Intel(R) UHD Graphics 630 [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_temporary_buffer_in_texture_to_texture_copy: https://crbug.com/dawn/42: Split texture-to-texture copy into two copies: copy from source texture into a temporary buffer, and copy from the temporary buffer into the destination texture when copying between compressed textures that don't have block-aligned sizes. This workaround is enabled by default on all Vulkan drivers to solve an issue in the Vulkan SPEC about the texture-to-texture copies with compressed formats. See #1005 (https://github.com/KhronosGroup/Vulkan-Docs/issues/1005) for more details. vulkan_use_d32s8: https://crbug.com/dawn/286: Vulkan mandates support of either D32_FLOAT_S8 or D24_UNORM_S8. When available the backend will use D32S8 (toggle to on) but setting the toggle to off will make it use the D24S8 format when possible. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc texture-compression-etc2 texture-compression-astc pipeline-statistics-query timestamp-query depth-clip-control depth32float-stencil8 indirect-first-instance shader-f16 dawn-internal-usages dawn-native Vulkan backend - Intel(R) UHD Graphics 630 [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_temporary_buffer_in_texture_to_texture_copy: https://crbug.com/dawn/42: Split texture-to-texture copy into two copies: copy from source texture into a temporary buffer, and copy from the temporary buffer into the destination texture when copying between compressed textures that don't have block-aligned sizes. This workaround is enabled by default on all Vulkan drivers to solve an issue in the Vulkan SPEC about the texture-to-texture copies with compressed formats. See #1005 (https://github.com/KhronosGroup/Vulkan-Docs/issues/1005) for more details. vulkan_use_d32s8: https://crbug.com/dawn/286: Vulkan mandates support of either D32_FLOAT_S8 or D24_UNORM_S8. When available the backend will use D32S8 (toggle to on) but setting the toggle to off will make it use the D24S8 format when possible. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc texture-compression-etc2 texture-compression-astc pipeline-statistics-query timestamp-query depth-clip-control depth32float-stencil8 indirect-first-instance shader-f16 dawn-internal-usages dawn-native Vulkan backend - SwiftShader Device (Subzero) [Default Toggle Names] lazy_clear_resource_on_first_use: https://crbug.com/dawn/145: Clears resource to zero on first usage. This initializes the resource so that no dirty bits from recycled memory is present in the new resource. use_temporary_buffer_in_texture_to_texture_copy: https://crbug.com/dawn/42: Split texture-to-texture copy into two copies: copy from source texture into a temporary buffer, and copy from the temporary buffer into the destination texture when copying between compressed textures that don't have block-aligned sizes. This workaround is enabled by default on all Vulkan drivers to solve an issue in the Vulkan SPEC about the texture-to-texture copies with compressed formats. See #1005 (https://github.com/KhronosGroup/Vulkan-Docs/issues/1005) for more details. vulkan_use_d32s8: https://crbug.com/dawn/286: Vulkan mandates support of either D32_FLOAT_S8 or D24_UNORM_S8. When available the backend will use D32S8 (toggle to on) but setting the toggle to off will make it use the D24S8 format when possible. vulkan_use_s8: https://crbug.com/dawn/666: Vulkan has a pure stencil8 format but it is not universally available. When this toggle is on, the backend will use S8 for the stencil8 format, otherwise it will fallback to D32S8 or D24S8. disallow_unsafe_apis: http://crbug.com/1138528: Produces validation errors on API entry points or parameter combinations that aren't considered secure yet. use_vulkan_zero_initialize_workgroup_memory_extension: https://crbug.com/dawn/1302: Initialize workgroup memory with OpConstantNull on Vulkan when the Vulkan extension VK_KHR_zero_initialize_workgroup_memory is supported. [WebGPU Forced Toggles - enabled] disallow_spirv: https://crbug.com/1214923: Disallow usage of SPIR-V completely so that only WGSL is used for shader modules. This is useful to prevent a Chromium renderer process from successfully sending SPIR-V code to be compiled in the GPU process. [Supported Features] texture-compression-bc texture-compression-etc2 texture-compression-astc timestamp-query depth-clip-control depth32float-stencil8 indirect-first-instance dawn-internal-usages dawn-native
urdeveloper commented 1 year ago

Did more debugging today. The bottleneck is in luma.gl here: https://github.com/visgl/luma.gl/blob/337c12325d3aa1699245fbdc0fba7f9252a29996/modules/webgl/src/classes/program.js#L360

Above code tries to get the number of uniforms from the program.

Added some timing to the code in luma and here's the result:

image

First number is the time took by that line of code in luma.gl and second number is the total spent time to draw a simple PathLayer for the first time.