1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-30 02:52:10 +01:00

[d3d9] Return const view references in D3D9Subresource

This commit is contained in:
Joshua Ashton 2021-07-24 18:32:27 +01:00 committed by Joshie
parent 3cbac8923f
commit 750639d3b6

View File

@ -72,7 +72,7 @@ namespace dxvk {
return m_texture->CalcSubresource(m_face, m_mipLevel);
}
Rc<DxvkImageView> GetImageView(bool Srgb) {
const Rc<DxvkImageView>& GetImageView(bool Srgb) {
Srgb &= m_isSrgbCompatible;
Rc<DxvkImageView>& view = m_sampleView.Pick(Srgb);
@ -82,7 +82,7 @@ namespace dxvk {
return view;
}
Rc<DxvkImageView> GetRenderTargetView(bool Srgb) {
const Rc<DxvkImageView>& GetRenderTargetView(bool Srgb) {
Srgb &= m_isSrgbCompatible;
Rc<DxvkImageView>& view = m_renderTargetView.Pick(Srgb);
@ -96,7 +96,7 @@ namespace dxvk {
return m_texture->DetermineRenderTargetLayout();
}
Rc<DxvkImageView> GetDepthStencilView() {
const Rc<DxvkImageView>& GetDepthStencilView() {
Rc<DxvkImageView>& view = m_depthStencilView;
if (unlikely(view == nullptr))