mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 22:55:41 +00:00
Refactor viewport to have X/Y separate members instead of TopLeft[2]
This commit is contained in:
@@ -119,15 +119,15 @@ Viewport CommonPipelineState::GetViewport(int index)
|
||||
{
|
||||
if(IsLogD3D11() && index < m_D3D11->m_RS.Viewports.count)
|
||||
{
|
||||
ret.x = m_D3D11->m_RS.Viewports[index].TopLeft[0];
|
||||
ret.y = m_D3D11->m_RS.Viewports[index].TopLeft[1];
|
||||
ret.x = m_D3D11->m_RS.Viewports[index].X;
|
||||
ret.y = m_D3D11->m_RS.Viewports[index].Y;
|
||||
ret.width = m_D3D11->m_RS.Viewports[index].Width;
|
||||
ret.height = m_D3D11->m_RS.Viewports[index].Height;
|
||||
}
|
||||
else if(IsLogD3D12() && index < m_D3D12->m_RS.Viewports.count)
|
||||
{
|
||||
ret.x = m_D3D12->m_RS.Viewports[index].TopLeft[0];
|
||||
ret.y = m_D3D12->m_RS.Viewports[index].TopLeft[1];
|
||||
ret.x = m_D3D12->m_RS.Viewports[index].X;
|
||||
ret.y = m_D3D12->m_RS.Viewports[index].Y;
|
||||
ret.width = m_D3D12->m_RS.Viewports[index].Width;
|
||||
ret.height = m_D3D12->m_RS.Viewports[index].Height;
|
||||
}
|
||||
|
||||
@@ -1456,8 +1456,7 @@ void D3D11PipelineStateViewer::setState()
|
||||
|
||||
if(v.Enabled || ui->showEmpty->isChecked())
|
||||
{
|
||||
QTreeWidgetItem *node =
|
||||
makeTreeNode({i, v.TopLeft[0], v.TopLeft[1], v.Width, v.Height, v.MinDepth, v.MaxDepth});
|
||||
QTreeWidgetItem *node = makeTreeNode({i, v.X, v.Y, v.Width, v.Height, v.MinDepth, v.MaxDepth});
|
||||
|
||||
if(v.Width == 0 || v.Height == 0 || v.MinDepth == v.MaxDepth)
|
||||
setEmptyRow(node);
|
||||
|
||||
@@ -1473,8 +1473,7 @@ void D3D12PipelineStateViewer::setState()
|
||||
{
|
||||
const D3D12Pipe::Viewport &v = state.m_RS.Viewports[i];
|
||||
|
||||
QTreeWidgetItem *node =
|
||||
makeTreeNode({i, v.TopLeft[0], v.TopLeft[1], v.Width, v.Height, v.MinDepth, v.MaxDepth});
|
||||
QTreeWidgetItem *node = makeTreeNode({i, v.X, v.Y, v.Width, v.Height, v.MinDepth, v.MaxDepth});
|
||||
|
||||
if(v.Width == 0 || v.Height == 0 || v.MinDepth == v.MaxDepth)
|
||||
setEmptyRow(node);
|
||||
|
||||
Reference in New Issue
Block a user