gpu/backend,gpu,app/internal/d3d11: move device state to backend

We'd like to allow Gio to share a Direct3D context with an embedding
program like the GLFW example does for OpenGL. To do that, d3d11.Device
needs to carry only the minimal information needed (ID3D11Device).

This change moves the caches of ID3D11DepthStencilState and
ID3D11BlendState from from d3d11.Device to d3d11.Backend. It also adds a
Release method for freeing them.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-04 19:13:04 +01:00
parent 44991f355c
commit 840b9ffa9b
4 changed files with 32 additions and 18 deletions
+1
View File
@@ -422,6 +422,7 @@ func (g *gpu) Release() {
if g.timers != nil {
g.timers.release()
}
g.ctx.Release()
}
func (g *gpu) Collect(viewport image.Point, frameOps *op.Ops) {