app/internal/d3d11: include depth buffer in current framebuffer query

Fixes rendering on Windows. Thanks to Egon Elbre for noticing.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-03-06 14:17:53 +01:00
parent 9793fcfcd0
commit 44991f355c
2 changed files with 13 additions and 7 deletions
+7 -4
View File
@@ -1197,18 +1197,21 @@ func (c *_ID3D11DeviceContext) IASetPrimitiveTopology(mode uint32) {
)
}
func (c *_ID3D11DeviceContext) OMGetRenderTargets() *_ID3D11RenderTargetView {
var target *_ID3D11RenderTargetView
func (c *_ID3D11DeviceContext) OMGetRenderTargets() (*_ID3D11RenderTargetView, *_ID3D11DepthStencilView) {
var (
target *_ID3D11RenderTargetView
depthStencilView *_ID3D11DepthStencilView
)
syscall.Syscall6(
c.vtbl.OMGetRenderTargets,
4,
uintptr(unsafe.Pointer(c)),
1, // NumViews
uintptr(unsafe.Pointer(&target)),
0, // pDepthStencilView
uintptr(unsafe.Pointer(&depthStencilView)),
0, 0,
)
return target
return target, depthStencilView
}
func (c *_ID3D11DeviceContext) OMSetRenderTargets(target *_ID3D11RenderTargetView, depthStencil *_ID3D11DepthStencilView) {