app/internal/d3d11: move features from Device to Backend

Continuing the previous change to minimize Device, in preparation
for supporting foreign Direct3D contexts.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-04 19:36:53 +01:00
parent 840b9ffa9b
commit 932465d891
2 changed files with 37 additions and 27 deletions
+10
View File
@@ -914,6 +914,16 @@ func (d *_ID3D11Device) CreateDepthStencilState(desc *_D3D11_DEPTH_STENCIL_DESC)
return state, nil
}
func (d *_ID3D11Device) GetFeatureLevel() int {
lvl, _, _ := syscall.Syscall(
d.vtbl.GetFeatureLevel,
1,
uintptr(unsafe.Pointer(d)),
0, 0,
)
return int(lvl)
}
func (s *_IDXGISwapChain) GetDesc() (_DXGI_SWAP_CHAIN_DESC, error) {
var desc _DXGI_SWAP_CHAIN_DESC
r, _, _ := syscall.Syscall(