mirror of https://github.com/PCSX2/pcsx2.git
gsdx-ogl/d3d11: Add a assert when texture is too small or too big.
Add an assert for when texture is below 1 on direct3d/ogl. Add an assert for when texture is above direct3d limit.
This commit is contained in:
parent
de7a3b70c9
commit
99f814d376
|
@ -638,6 +638,9 @@ void GSDevice11::ClearStencil(GSTexture* t, uint8 c)
|
|||
|
||||
GSTexture* GSDevice11::CreateSurface(int type, int w, int h, int format)
|
||||
{
|
||||
ASSERT(w > 0 && w <= m_d3d_texsize);
|
||||
ASSERT(h > 0 && h <= m_d3d_texsize);
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
D3D11_TEXTURE2D_DESC desc;
|
||||
|
|
|
@ -155,6 +155,9 @@ namespace PboPool {
|
|||
GSTextureOGL::GSTextureOGL(int type, int w, int h, int format, GLuint fbo_read, bool mipmap)
|
||||
: m_clean(false), m_generate_mipmap(true), m_local_buffer(nullptr), m_r_x(0), m_r_y(0), m_r_w(0), m_r_h(0), m_layer(0)
|
||||
{
|
||||
ASSERT(w > 0);
|
||||
ASSERT(h > 0);
|
||||
|
||||
// OpenGL didn't like dimensions of size 0
|
||||
m_size.x = std::max(1,w);
|
||||
m_size.y = std::max(1,h);
|
||||
|
|
Loading…
Reference in New Issue