Skip to content

Commit

Permalink
gsdx-d3d11: Set maximum allowed texture size to d3d10 limits which is…
Browse files Browse the repository at this point in the history
… 8192.

Should prevent any issues if we ever go over the limit.
  • Loading branch information
lightningterror committed Jul 15, 2019
1 parent 557f50f commit 56b8612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/GSdx/Renderers/DX11/GSDevice11.cpp
Expand Up @@ -638,8 +638,8 @@ GSTexture* GSDevice11::CreateSurface(int type, int w, int h, int format)

memset(&desc, 0, sizeof(desc));

desc.Width = std::max(1, w); // texture min is 1 for dx
desc.Height = std::max(1, h);
desc.Width = std::max(1, std::min(w, 8192)); // Texture limit for D3D10 min 1, max 8192
desc.Height = std::max(1, std::min(h, 8192));
desc.Format = (DXGI_FORMAT)format;
desc.MipLevels = 1;
desc.ArraySize = 1;
Expand Down

1 comment on commit 56b8612

@tadanokojin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be wise to add a debug assert too.

Please sign in to comment.