mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu: fold buffer clearing into framebuffer bind
In Metal, clearing a framebuffer is most efficiently done during bind. Modify our driver accordingly. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
-11
@@ -284,12 +284,6 @@ func (s *fboSet) resize(ctx driver.Device, sizes []image.Point) {
|
||||
s.delete(ctx, len(sizes))
|
||||
}
|
||||
|
||||
func (s *fboSet) invalidate(ctx driver.Device) {
|
||||
for _, f := range s.fbos {
|
||||
f.fbo.Invalidate()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *fboSet) delete(ctx driver.Device, idx int) {
|
||||
for i := idx; i < len(s.fbos); i++ {
|
||||
f := s.fbos[i]
|
||||
@@ -348,11 +342,6 @@ func (s *stenciler) beginIntersect(sizes []image.Point) {
|
||||
s.ctx.BindPipeline(s.ipipeline.pipeline.pipeline)
|
||||
}
|
||||
|
||||
func (s *stenciler) invalidateFBO() {
|
||||
s.intersections.invalidate(s.ctx)
|
||||
s.fbos.invalidate(s.ctx)
|
||||
}
|
||||
|
||||
func (s *stenciler) cover(idx int) stencilFBO {
|
||||
return s.fbos.fbos[idx]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user