mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
gl: Remove older debug code
KHR_DEBUG path makes this obsolete, usage of this older path has been removed a long time ago
This commit is contained in:
parent
3ad12cf5f8
commit
eecb22e749
1 changed files with 0 additions and 38 deletions
|
@ -40,44 +40,6 @@ inline static void _SelectTexture(int unit) { glActiveTexture(GL_TEXTURE0 + unit
|
|||
|
||||
namespace gl
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
struct __glcheck_impl_t
|
||||
{
|
||||
const char* file;
|
||||
const char* function;
|
||||
int line;
|
||||
|
||||
constexpr __glcheck_impl_t(const char* file, const char* function, int line)
|
||||
: file(file)
|
||||
, function(function)
|
||||
, line(line)
|
||||
{
|
||||
}
|
||||
|
||||
~__glcheck_impl_t() noexcept(false)
|
||||
{
|
||||
if (GLenum err = glGetError())
|
||||
{
|
||||
std::string error;
|
||||
switch (err)
|
||||
{
|
||||
case GL_INVALID_OPERATION: error = "invalid operation"; break;
|
||||
case GL_INVALID_ENUM: error = "invalid enum"; break;
|
||||
case GL_INVALID_VALUE: error = "invalid value"; break;
|
||||
case GL_OUT_OF_MEMORY: error = "out of memory"; break;
|
||||
case GL_INVALID_FRAMEBUFFER_OPERATION: error = "invalid framebuffer operation"; break;
|
||||
default: error = "unknown error"; break;
|
||||
}
|
||||
|
||||
fmt::throw_exception("OpenGL error: %s\n(in file %s:%d, function %s)", error, file, line, function);
|
||||
}
|
||||
}
|
||||
};
|
||||
#define __glcheck ::gl::__glcheck_impl_t{ __FILE__, __FUNCTION__, __LINE__ },
|
||||
#else
|
||||
#define __glcheck
|
||||
#endif
|
||||
|
||||
//Function call wrapped in ARB_DSA vs EXT_DSA compat check
|
||||
#define DSA_CALL(func, texture_name, target, ...)\
|
||||
if (::gl::get_driver_caps().ARB_dsa_supported)\
|
||||
|
|
Loading…
Add table
Reference in a new issue