Permalink
Browse files

gsdx: remove dds parameter from texture save method

  • Loading branch information...
tadanokojin authored and lightningterror committed Dec 25, 2018
1 parent e847d94 commit eddaf71d47f41dbdafd3590dded0e729498f4b27
@@ -47,7 +47,7 @@ class GSTexture
virtual bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) = 0;
virtual void Unmap() = 0;
virtual void GenerateMipmap() {}
virtual bool Save(const std::string& fn, bool dds = false) = 0;
virtual bool Save(const std::string& fn) = 0;
virtual uint32 GetID() { return 0; }

GSVector2 GetScale() const {return m_scale;}
@@ -105,7 +105,7 @@ void GSTexture11::Unmap()
}
}

bool GSTexture11::Save(const std::string& fn, bool dds)
bool GSTexture11::Save(const std::string& fn)
{
CComPtr<ID3D11Texture2D> res;
D3D11_TEXTURE2D_DESC desc;
@@ -43,7 +43,7 @@ class GSTexture11 : public GSTexture
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0);
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0);
void Unmap();
bool Save(const std::string& fn, bool dds = false);
bool Save(const std::string& fn);
bool Equal(GSTexture11* tex);

operator ID3D11Texture2D*();
@@ -947,13 +947,13 @@ void GSRendererHW::Draw()
(int)context->CLAMP.MINU, (int)context->CLAMP.MAXU,
(int)context->CLAMP.MINV, (int)context->CLAMP.MAXV);

tex->m_texture->Save(m_dump_root+s, true);
tex->m_texture->Save(m_dump_root+s);

if(tex->m_palette)
{
s = format("%05d_f%lld_itpx_%05x_%s.dds", s_n, frame, context->TEX0.CBP, psm_str(context->TEX0.CPSM));

tex->m_palette->Save(m_dump_root+s, true);
tex->m_palette->Save(m_dump_root+s);
}
}

@@ -37,5 +37,5 @@ class GSTextureNull : public GSTexture
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) {return true;}
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) {return false;}
void Unmap() {}
bool Save(const std::string& fn, bool dds = false) {return false;}
bool Save(const std::string& fn) {return false;}
};
@@ -464,7 +464,7 @@ void GSTextureOGL::GenerateMipmap()
}
}

bool GSTextureOGL::Save(const std::string& fn, bool dds)
bool GSTextureOGL::Save(const std::string& fn)
{
// Collect the texture data
uint32 pitch = 4 * m_size.x;
@@ -71,7 +71,7 @@ class GSTextureOGL final : public GSTexture
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) final;
void Unmap() final;
void GenerateMipmap() final;
bool Save(const std::string& fn, bool dds = false) final;
bool Save(const std::string& fn) final;

bool IsBackbuffer() { return (m_type == GSTexture::Backbuffer); }
bool IsDss() { return (m_type == GSTexture::DepthStencil); }
@@ -85,10 +85,8 @@ void GSTextureSW::Unmap()
m_mapped.clear(std::memory_order_release);
}

bool GSTextureSW::Save(const std::string& fn, bool dds)
bool GSTextureSW::Save(const std::string& fn)
{
if(dds) return false; // not implemented

#ifdef ENABLE_OGL_DEBUG
GSPng::Format fmt = GSPng::RGB_A_PNG;
#else
@@ -38,5 +38,5 @@ class GSTextureSW final : public GSTexture
bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0);
bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0);
void Unmap();
bool Save(const std::string& fn, bool dds = false);
bool Save(const std::string& fn);
};

0 comments on commit eddaf71

Please sign in to comment.