mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-21 13:29:26 +01:00
[d3d9] Don't create views if we are a null resource
This commit is contained in:
parent
bafcaa0c07
commit
9fce945b62
@ -68,7 +68,7 @@ namespace dxvk {
|
|||||||
Rc<DxvkImageView> GetImageView(bool Srgb) {
|
Rc<DxvkImageView> GetImageView(bool Srgb) {
|
||||||
Rc<DxvkImageView>& view = m_sampleView.Pick(Srgb);
|
Rc<DxvkImageView>& view = m_sampleView.Pick(Srgb);
|
||||||
|
|
||||||
if (unlikely(view == nullptr))
|
if (unlikely(view == nullptr && !IsNull()))
|
||||||
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_SAMPLED_BIT, Srgb);
|
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_SAMPLED_BIT, Srgb);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
@ -77,7 +77,7 @@ namespace dxvk {
|
|||||||
Rc<DxvkImageView> GetRenderTargetView(bool Srgb) {
|
Rc<DxvkImageView> GetRenderTargetView(bool Srgb) {
|
||||||
Rc<DxvkImageView>& view = m_renderTargetView.Pick(Srgb);
|
Rc<DxvkImageView>& view = m_renderTargetView.Pick(Srgb);
|
||||||
|
|
||||||
if (unlikely(view == nullptr))
|
if (unlikely(view == nullptr && !IsNull()))
|
||||||
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, Srgb);
|
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, Srgb);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
@ -90,7 +90,7 @@ namespace dxvk {
|
|||||||
Rc<DxvkImageView> GetDepthStencilView() {
|
Rc<DxvkImageView> GetDepthStencilView() {
|
||||||
Rc<DxvkImageView>& view = m_depthStencilView;
|
Rc<DxvkImageView>& view = m_depthStencilView;
|
||||||
|
|
||||||
if (unlikely(view == nullptr))
|
if (unlikely(view == nullptr && !IsNull()))
|
||||||
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, false);
|
view = m_texture->CreateView(m_face, m_mipLevel, VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, false);
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user