Commit 2b2b4d9f by Jamie Madill

Add diagram illustrating dirty bit flow.

The diagram source is available as a Google Driver document. It can be opened with the draw.io web app. Bug: angleproject:3002 Change-Id: Ic7885c8da1aacac5082eea05d0562d3d62f801ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1592252Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent fc0be049
......@@ -85,6 +85,10 @@ call to [`gl::Context::onSubjectStateChange`][ContextStateChange] which in turn
[`gl::StateCache::updateBasicDrawStatesError`][StateCacheUpdate] to re-validate the draw
framebuffer's completeness. On subsequent draw calls we skip re-validation at minimal cost.
See the below diagram for the dependency relations between Subjects and Observers.
![State Change Notification Flow](https://raw.githubusercontent.com/google/angle/master/doc/img/StateNotificationFlow.svg?sanitize=true)
## Back-end specific Optimizations
See the [Vulkan README][VulkanREADME] for additional information for how we implement state change
......
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="642px" height="682px" viewBox="-0.5 -0.5 642 682" content="&lt;mxfile modified=&quot;2019-05-01T17:04:01.353Z&quot; host=&quot;www.draw.io&quot; agent=&quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36&quot; etag=&quot;1A0vJHCXmfK4zyAJbq2v&quot; version=&quot;10.6.5&quot; type=&quot;google&quot;&gt;&lt;diagram id=&quot;6a731a19-8d31-9384-78a2-239565b7b9f0&quot; name=&quot;Page-1&quot;&gt;7Vtbc9o4FP41PIbRxdfHQEK7M93LNLtt8yhAGLfGYoVISH/9yrZ8Q7YxFLwwMdNprCNZls/3HZ2jI3mAx6vdB07Wy9/ZnAYDBOa7AX4YIIQANuSfSPKmJK6dCDzuzxMR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fYOmvbh4PCYCAbUuf+KMKEA1cnRR9nR10KWeCrFXFzh4K1zO/jWdqRH56kdTThZ0WlvTAVjMupnP9Sx0zJqndbfMsjYctp7rVZeC3eMm1lrb09EItbbWgvHZXSMmb6bk2KmbK3H7CBmHdsZBPoESTNL2/IFmfWoqdnRNh0TYANAbAGzjBrsGDXYIjFbjAdpMGWvxVAwFsiKJeP+T6kuElRmeOqzQW1gOxQHtgwn24WL4BfCRQXyHXTx0DQhQMAADrQwKsPsIFCFMoZD15Zm7UJoWoaFDB30xqxldTbm0GDcfDDHJnruLDjMcgomtFy37jUPJH5+NTMGoYPVoypzXSckliBskUfvTSONr3rTuFbTAC46u2novv69mwaqMA3Ym8ZFTeMk6urrwaukbrq5l+/1PRfrjt3dOsTVmmwh6Bl8fQzWV8dXyOB2TLQqZk3cc+76OHfktsE7cPhV1DV66l4ddZF+QOAdUvcmKWkAs3EHyD6ZkYeycHrP52Nkdahl3MgMW3/orCkuPRO9G07DyVL+7KhwXEh8dKDrwEYzwR2aCQLlM5Cnn9ty9g5TZmekL56+K3/f88sZiublTMW+0pc4ga/ewwokGKMpL1mf9e82+popNpO7TbwpcC8bQHO9i1mW1ssrT2S8e9+bHc1bVB0fO6vhRP3+8Gc5R1HeH8houeHY8dZVNZxWi486rsGNXk20Zza5MbvLaA9rn6jkhDrWk2l9xS96pohOFvMvW5Pm+efD+PE/&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><rect x="1" y="1" width="640" height="80" fill="#23445d" stroke="#bac8d3" stroke-width="2" pointer-events="none"/><g transform="translate(155.5,23.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="330" height="26" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 24px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">State Change Notification Flow</div></div></foreignObject><text x="165" y="25" fill="#FFFFFF" text-anchor="middle" font-size="24px" font-family="Helvetica">State Change Notification Flow</text></switch></g><rect x="1" y="81" width="640" height="100" fill-opacity="0.6" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.6" stroke-width="2" pointer-events="none"/><rect x="1" y="181" width="640" height="100" fill-opacity="0.9" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.9" stroke-width="2" pointer-events="none"/><rect x="1" y="281" width="640" height="100" fill-opacity="0.6" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.6" stroke-width="2" pointer-events="none"/><rect x="1" y="381" width="640" height="100" fill-opacity="0.9" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.9" stroke-width="2" pointer-events="none"/><rect x="1" y="481" width="640" height="100" fill-opacity="0.6" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.6" stroke-width="2" pointer-events="none"/><rect x="1" y="581" width="640" height="100" fill-opacity="0.9" fill="#bac8d3" stroke="#ffffff" stroke-opacity="0.9" stroke-width="2" pointer-events="none"/><path d="M 168.1 130 L 175.55 130 Q 183 130 183 140 L 183 226 Q 183 236 193 236 L 239 236" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 161.35 130 L 170.35 125.5 L 168.1 130 L 170.35 134.5 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><rect x="31.39" y="105.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(58.5,122.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="72" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Context</div></div></foreignObject><text x="36" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Context</text></switch></g><rect x="476.9" y="211" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(495.5,227.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="89" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">rx::BufferImpl</div></div></foreignObject><text x="45" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">rx::BufferImpl</text></switch></g><rect x="239.35" y="211" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(272.5,227.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="60" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Buffer</div></div></foreignObject><text x="30" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Buffer</text></switch></g><path d="M 302.9 461.87 L 302.9 505.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 302.9 456.62 L 306.4 463.62 L 302.9 461.87 L 299.4 463.62 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><rect x="239.4" y="405.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(251.5,422.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="101" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Framebuffer</div></div></foreignObject><text x="51" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Framebuffer</text></switch></g><rect x="476.9" y="505.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(490.5,522.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">rx::TextureImpl</div></div></foreignObject><text x="49" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">rx::TextureImpl</text></switch></g><rect x="239.35" y="605.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(264.5,622.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="76" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Sampler</div></div></foreignObject><text x="38" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Sampler</text></switch></g><rect x="239.35" y="505.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(267.5,522.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="69" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Texture</div></div></foreignObject><text x="35" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Texture</text></switch></g><rect x="476.76" y="305.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(499.5,322.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="80" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">egl::Surface</div></div></foreignObject><text x="40" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">egl::Surface</text></switch></g><path d="M 168.5 130.5 L 175.75 130.5 Q 183 130.5 183 140.5 L 183 520.5 Q 183 530.5 193 530.5 L 239.35 530.5" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 161.75 130.5 L 170.75 126 L 168.5 130.5 L 170.75 135 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 168.5 130.5 L 175.75 130.5 Q 183 130.5 183 140.5 L 183 620.5 Q 183 630.5 193 630.5 L 239.35 630.5" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 161.75 130.5 L 170.75 126 L 168.5 130.5 L 170.75 135 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 376.46 236 L 412 236 Q 422 236 432 236 L 476.9 236" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 369.71 236 L 378.71 231.5 L 376.46 236 L 378.71 240.5 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 303 211 L 303 193.5 Q 303 183.5 303 174.8 L 303 166.1" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 303 159.35 L 307.5 168.35 L 303 166.1 L 298.5 168.35 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 303 505.5 L 303 490.5 Q 303 480.5 303 473.05 L 303 465.6" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 303 458.85 L 307.5 467.85 L 303 465.6 L 298.5 467.85 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 376.46 530.5 L 412 530.5 Q 422 530.5 432 530.5 L 476.9 530.5" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 369.71 530.5 L 378.71 526 L 376.46 530.5 L 378.71 535 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 376.51 430.5 L 412 430.5 Q 422 430.5 422 420.5 L 422 340.5 Q 422 330.5 432 330.5 L 476.76 330.5" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 369.76 430.5 L 378.76 426 L 376.51 430.5 L 378.76 435 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 168.1 131 L 175.55 131 Q 183 131 183 141 L 183 421 Q 183 431 193 431 L 241 431" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 161.35 131 L 170.35 126.5 L 168.1 131 L 170.35 135.5 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><rect x="239.35" y="105.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(253.5,122.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="98" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::VertexArray<br style="font-size: 15px" /></div></div></foreignObject><text x="49" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">[Not supported by viewer]</text></switch></g><rect x="239.35" y="305.5" width="127" height="50" rx="7.5" ry="7.5" fill="#23445d" stroke="none" pointer-events="none"/><g transform="translate(248.5,322.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="107" height="16" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 15px; font-family: Helvetica; color: rgb(255, 255, 255); line-height: 1.2; vertical-align: top; white-space: nowrap; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">gl::Renderbuffer</div></div></foreignObject><text x="54" y="16" fill="#FFFFFF" text-anchor="middle" font-size="15px" font-family="Helvetica">gl::Renderbuffer</text></switch></g><path d="M 301 395.4 L 301 387.95 Q 301 380.5 301 370.5 L 301 355.5" fill="none" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/><path d="M 301 402.15 L 296.5 393.15 L 301 395.4 L 305.5 393.15 Z" fill="#0c343d" stroke="#0c343d" stroke-width="3" stroke-miterlimit="10" pointer-events="none"/></g></svg>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment