Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upUse texture layers for render target allocations, remove render phases. #478
Conversation
|
r? @pcwalton |
|
@pcwalton btw I tested this on mac mini hardware, since I know we've had troubles with driver stalls around texture / fbo allocs before. It seemed to be working nicely on my mac mini (and also on linux + osmesa). |
| vec2 st1 = vec2(src.screen_origin_task_origin.zw + src.size.xy) / 2048.0; | ||
| vUv = mix(st0, st1, aPosition.xy); | ||
| vec2 texture_size = vec2(textureSize(sCache, 0)); | ||
| vec2 st0 = vec2(src.screen_origin_task_origin.zw) / texture_size; |
This comment has been minimized.
This comment has been minimized.
| vUv0 = mix(st0, st1, aPosition.xy); | ||
| vec2 texture_size = vec2(textureSize(sCache, 0)); | ||
| vec2 st0 = vec2(src0.screen_origin_task_origin.zw) / texture_size; | ||
| vec2 st1 = vec2(src0.screen_origin_task_origin.zw + src0.size_target_index.xy) / texture_size; |
This comment has been minimized.
This comment has been minimized.
|
r=me with a couple of nits |
|
|
Instead of splitting the scene into multiple phases, use texture layers to allocate slices as needed for each pass of the render frame. These are pooled and only allocated when the frame render target configuration changes. Previously, the code asserted if it was unable to fit the render tasks into a single render target for a single tile. Now, this (pathological) case is handled correctly. This makes the upcoming dynamic primitive cache support a lot simpler to add. It also means that we don't use a ping-pong allocation style, which typically performs badly on mobile / tiled rendering architectures.
|
@bors-servo: r+ |
|
|
Use texture layers for render target allocations, remove render phases. Instead of splitting the scene into multiple phases, use texture layers to allocate slices as needed for each pass of the render frame. These are pooled and only allocated when the frame render target configuration changes. Previously, the code asserted if it was unable to fit the render tasks into a single render target for a single tile. Now, this (pathological) case is handled correctly. This makes the upcoming dynamic primitive cache support a lot simpler to add. It also means that we don't use a ping-pong allocation style, which typically performs badly on mobile / tiled rendering architectures. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/478) <!-- Reviewable:end -->
|
|
| let (internal_format, gl_format) = gl_texture_formats_for_image_format(texture.format); | ||
| let type_ = gl_type_for_texture_format(texture.format); | ||
|
|
||
| gl::tex_image_3d(texture_id.target, |
This comment has been minimized.
This comment has been minimized.
kvark
Oct 26, 2016
Member
This is concerning. I don't see the previous implementation actually reallocating the texture, like this one. Neither does the method name imply that the texture is going to be changed (create_fbo_for_texture_if_necessary).
glennw commentedOct 25, 2016
•
edited by larsbergstrom
Instead of splitting the scene into multiple phases, use texture
layers to allocate slices as needed for each pass of the render
frame. These are pooled and only allocated when the frame render
target configuration changes.
Previously, the code asserted if it was unable to fit the render
tasks into a single render target for a single tile. Now, this
(pathological) case is handled correctly.
This makes the upcoming dynamic primitive cache support a lot
simpler to add. It also means that we don't use a ping-pong
allocation style, which typically performs badly on mobile / tiled
rendering architectures.
This change is