mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
gpu: fold driver.Framebuffer functionality into driver.Texture
driver.Device.NewFramebuffer doesn't provide additional information over driver.Device.NewTexture, so Texture can hold its (optional) framebuffer on behalf of the renderers. Metal don't even need a separate framebuffer object. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -657,7 +657,7 @@ func (r *renderer) stencilClips(pathCache *opCache, ops []*pathOp) {
|
||||
}
|
||||
fbo = p.place.Idx
|
||||
f := r.pather.stenciler.cover(fbo)
|
||||
r.ctx.BeginRenderPass(f.fbo, driver.LoadDesc{Action: driver.LoadActionClear})
|
||||
r.ctx.BeginRenderPass(f.tex, driver.LoadDesc{Action: driver.LoadActionClear})
|
||||
r.ctx.BindPipeline(r.pather.stenciler.pipeline.pipeline.pipeline)
|
||||
r.ctx.BindIndexBuffer(r.pather.stenciler.indexBuf)
|
||||
}
|
||||
@@ -697,7 +697,7 @@ func (r *renderer) intersect(ops []imageOp) {
|
||||
f := r.pather.stenciler.intersections.fbos[fbo]
|
||||
d := driver.LoadDesc{Action: driver.LoadActionClear}
|
||||
d.ClearColor.R = 1.0
|
||||
r.ctx.BeginRenderPass(f.fbo, d)
|
||||
r.ctx.BeginRenderPass(f.tex, d)
|
||||
r.ctx.BindPipeline(r.pather.stenciler.ipipeline.pipeline.pipeline)
|
||||
r.ctx.BindVertexBuffer(r.blitter.quadVerts, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user