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 upPrevent segmented primitives from reading outdated clip tasks. #2564
Conversation
Brush segments strore handles to their own clip tasks. If segmentation heuristics change we need to either clear the segment information or update it to ensure the clip tasks they point to are requested (this commit does the latter).
|
r? @glennw This is I think the simplest way to fix #2531, although I suspect that we might want to instead un-segment primitives in some case to allow the most optimized path when segmentiation heuristics change between frames, or maybe it is enough/correct to go through the segments and clear the clip task ids. |
|
@nical Nice work finding the cause of this! I think this patch won't quite do what we want though, because what we'll end up doing is still generating clip tasks for each segment in this case, even though the early outs are saying that we don't need any clip masks at all. I think if we instead have a loop before those checks which runs through the segment descriptor and clears out the clip tasks, that should fix this bug and also deal with the concern mentioned above? |
|
Yeah, I know this isn't optimal since we hang on to a heuristic that was good for a previous frame but not the current one. I was unsure whether clearing the render task ids would be enough, since the new frame might not even create segments (in fact in this case I am pretty sure it wouldn't) and so we'd still be in a half-unexpected configuration, but if you think it will do, sounds good to me. I'll give this a go on Monday. |
|
The segments should always be constant for a given scene, since they rely only on clips in the same reference frame (local space) as the primitive, and therefore shouldn't change with scrolling. So I think it should be fine to just clear the task IDs in this case. Thanks! |
|
Closing in favor of #2568. |
nical commentedMar 23, 2018
•
edited by larsbergstrom
Fixes #2531.
Brush segments store handles to their own clip tasks. If segmentation heuristics change we need to either clear the segment information or update it to ensure the clip tasks they point to are requested (this commit does the latter).
This change is