When texture validation fails, log reason why using INFO_MSG

This commit is contained in:
UnknownShadow200 2025-02-22 10:08:55 +11:00
parent e3f61f3c78
commit 2669a9266f

View File

@ -1419,14 +1419,14 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
if(format != GL_COLOR_INDEX4_EXT && format != GL_COLOR_INDEX4_TWID_KOS) {
/* Abuse determineStride to see if type is valid */
if(_determineStride(GL_RGBA, type) == -1) {
INFO_MSG("");
INFO_MSG("Unsupported type");
_glKosThrowError(GL_INVALID_ENUM, __func__);
return false;
}
}
if(_cleanInternalFormat(internalFormat) == -1) {
INFO_MSG("");
INFO_MSG("Unsupported internal format");
_glKosThrowError(GL_INVALID_VALUE, __func__);
return false;
}
@ -1436,7 +1436,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
if(level == 0){
if((w < 8 || (w & -w) != w)) {
/* Width is not a power of two. Must be!*/
INFO_MSG("");
INFO_MSG("Unsupported width");
_glKosThrowError(GL_INVALID_VALUE, __func__);
return false;
}
@ -1444,7 +1444,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
if((h < 8 || (h & -h) != h)) {
/* height is not a power of two. Must be!*/
INFO_MSG("");
INFO_MSG("Unsupported height");
_glKosThrowError(GL_INVALID_VALUE, __func__);
return false;
}
@ -1459,7 +1459,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
}
if(level < 0) {
INFO_MSG("");
INFO_MSG("Level must be >= 0");
_glKosThrowError(GL_INVALID_VALUE, __func__);
return false;
}
@ -1472,7 +1472,7 @@ static bool _glTexImage2DValidate(GLenum target, GLint level, GLint internalForm
}
if(border) {
INFO_MSG("");
INFO_MSG("Border not allowed");
_glKosThrowError(GL_INVALID_VALUE, __func__);
return false;
}