internal/graphicsdriver/directx: add an assertion

This commit is contained in:
Hajime Hoshi 2022-06-18 22:33:03 +09:00
parent f7a108e693
commit 81b3d7bfac

View File

@ -1492,6 +1492,9 @@ func (i *Image) setAsRenderTarget(device *_ID3D12Device, useStencil bool) error
}
if i.screen {
if useStencil {
return fmt.Errorf("directx: stencils are not available on the screen framebuffer")
}
rtv, err := i.graphics.rtvDescriptorHeap.GetCPUDescriptorHandleForHeapStart()
if err != nil {
return err