<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>284027</bug_id>
          
          <creation_ts>2024-12-04 00:29:28 -0800</creation_ts>
          <short_desc>[TextureMapper] Polygon clipping performance is extremely slow</short_desc>
          <delta_ts>2024-12-08 13:07:26 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WPE WebKit</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=282682</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>283820</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jani Hautakangas">jani</reporter>
          <assigned_to name="Jani Hautakangas">jani</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>fujii</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2079057</commentid>
    <comment_count>0</comment_count>
    <who name="Jani Hautakangas">jani</who>
    <bug_when>2024-12-04 00:29:28 -0800</bug_when>
    <thetext>Rendering complex preserve-3D scenes might involve a lot of layer splitting. Layer split rendering is achieved with polygon clipping. These splits are handled using polygon clipping, but the current implementation is inefficient. Each clip operation clears the full stencil buffer and masks the clipped part using separate vertex buffer objects that are allocated on demand. This places significant stress on the GPU and on hardware like rpi3 it completely chokes the rendering pipeline.

To address this issue, polygon clip vertices for preserve-3d scenes should be loaded to the GPU only once, leveraging cached VBOs. Additionally, stencil buffer clearing should be optimized using scissors to restrict stencil clears to relevant areas, avoiding full-buffer operations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2079908</commentid>
    <comment_count>1</comment_count>
    <who name="Jani Hautakangas">jani</who>
    <bug_when>2024-12-07 08:36:29 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/37596</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2080011</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-12-08 13:07:23 -0800</bug_when>
    <thetext>Committed 287519@main (3440db247780): &lt;https://commits.webkit.org/287519@main&gt;

Reviewed commits have been landed. Closing PR #37596 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>