Fixes and updates to graphics api

This commit is contained in:
Wojtek Figat
2026-02-20 23:49:49 +01:00
parent 08d9ae0ae6
commit 6fd58c418e
9 changed files with 67 additions and 29 deletions

View File

@@ -101,6 +101,19 @@ void GPUContext::Draw(GPUTexture* dst, GPUTexture* src)
DrawFullscreenTriangle();
}
void GPUContext::Draw(GPUTexture* dst, GPUTextureView* src)
{
ASSERT_LOW_LAYER(dst && src);
ResetRenderTarget();
const float width = (float)dst->Width();
const float height = (float)dst->Height();
SetViewport(width, height);
SetRenderTarget(dst->View());
BindSR(0, src);
SetState(_device->GetCopyLinearPS());
DrawFullscreenTriangle();
}
void GPUContext::Draw(GPUTexture* rt)
{
ASSERT_LOW_LAYER(rt);