inline SetViewport into VertexShaderManager
This commit is contained in:
parent
d5f1f0d4a9
commit
647aad0a19
|
@ -486,6 +486,10 @@ void Renderer::SetViewport()
|
|||
// [4] = yorig + height/2 + 342
|
||||
// [5] = 16777215 * farz
|
||||
|
||||
// D3D crashes for zero viewports
|
||||
if (xfregs.viewport.wd == 0 || xfregs.viewport.ht == 0)
|
||||
return;
|
||||
|
||||
int scissorXOff = bpmem.scissorOffset.x * 2;
|
||||
int scissorYOff = bpmem.scissorOffset.y * 2;
|
||||
|
||||
|
|
|
@ -512,12 +512,6 @@ void Renderer::RecordVideoMemory()
|
|||
FifoRecorder::GetInstance().SetVideoMemory(bpMem, cpMem, xfMem, xfRegs, sizeof(XFRegisters) / 4);
|
||||
}
|
||||
|
||||
void SetViewport()
|
||||
{
|
||||
if (xfregs.viewport.wd != 0 && xfregs.viewport.ht != 0)
|
||||
g_renderer->SetViewport();
|
||||
}
|
||||
|
||||
void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& rc, float Gamma)
|
||||
{
|
||||
// TODO: merge more generic parts into VideoCommon
|
||||
|
|
|
@ -160,5 +160,3 @@ private:
|
|||
|
||||
extern Renderer *g_renderer;
|
||||
|
||||
extern void SetViewport();
|
||||
|
||||
|
|
|
@ -372,7 +372,7 @@ void VertexShaderManager::SetConstants()
|
|||
constants.depthparams[1] = xfregs.viewport.zRange / 16777216.0f;
|
||||
dirty = true;
|
||||
// This is so implementation-dependent that we can't have it here.
|
||||
SetViewport();
|
||||
g_renderer->SetViewport();
|
||||
|
||||
// Update projection if the viewport isn't 1:1 useable
|
||||
if(!g_ActiveConfig.backend_info.bSupportsOversizedViewports)
|
||||
|
|
Loading…
Reference in New Issue