| 101 | } |
| 102 | |
| 103 | VltFramebufferSize VltFramebufferInfo::computeRenderSize( |
| 104 | const VltFramebufferSize& defaultSize) const |
| 105 | { |
| 106 | // Some games bind render targets of a different size and |
| 107 | // expect it to work, so we'll compute the minimum size |
| 108 | VltFramebufferSize minSize = defaultSize; |
| 109 | |
| 110 | if (m_renderTargets.depth.view != nullptr) |
| 111 | { |
| 112 | VltFramebufferSize depthSize = this->computeRenderTargetSize(m_renderTargets.depth.view); |
| 113 | minSize.width = std::min(minSize.width, depthSize.width); |
| 114 | minSize.height = std::min(minSize.height, depthSize.height); |
| 115 | minSize.layers = std::min(minSize.layers, depthSize.layers); |
| 116 | } |
| 117 | |
| 118 | for (uint32_t i = 0; i < MaxNumRenderTargets; i++) |
| 119 | { |
| 120 | if (m_renderTargets.color[i].view != nullptr) |
| 121 | { |
| 122 | VltFramebufferSize colorSize = this->computeRenderTargetSize(m_renderTargets.color[i].view); |
| 123 | minSize.width = std::min(minSize.width, colorSize.width); |
| 124 | minSize.height = std::min(minSize.height, colorSize.height); |
| 125 | minSize.layers = std::min(minSize.layers, colorSize.layers); |
| 126 | } |
| 127 | } |
| 128 | |
| 129 | return minSize; |
| 130 | } |
| 131 | |
| 132 | VltFramebufferSize VltFramebufferInfo::computeRenderTargetSize( |
| 133 | const Rc<VltImageView>& renderTarget) const |
nothing calls this directly
no test coverage detected