Improve logging of texture border color.
authorJarkko Pöyry <jpoyry@google.com>
Mon, 13 Apr 2015 22:08:05 +0000 (15:08 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Fri, 17 Apr 2015 02:20:36 +0000 (19:20 -0700)
Change-Id: I143e4e650eac20304320631eb0a00aa55b79dc87

framework/opengl/gluCallLogWrapper.inl
scripts/opengl/gen_call_log_wrapper.py

index c056cab..d95b415 100644 (file)
@@ -1947,7 +1947,7 @@ void CallLogWrapper::glGetSamplerParameterfv (glw::GLuint sampler, glw::GLenum p
                m_log << TestLog::Message << "glGetSamplerParameterfv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << toHex(reinterpret_cast<deUintptr>(static_cast<const void*>(params))) << ");" << TestLog::EndMessage;
        m_gl.getSamplerParameterfv(sampler, pname, params);
        if (m_enableLog)
-               m_log << TestLog::Message << "// params = " << getPointerStr(params, 1) << TestLog::EndMessage;
+               m_log << TestLog::Message << "// params = " << getPointerStr(params, getTextureParamQueryNumArgsOut(pname)) << TestLog::EndMessage;
 }
 
 void CallLogWrapper::glGetSamplerParameteriv (glw::GLuint sampler, glw::GLenum pname, glw::GLint *params)
@@ -1956,7 +1956,7 @@ void CallLogWrapper::glGetSamplerParameteriv (glw::GLuint sampler, glw::GLenum p
                m_log << TestLog::Message << "glGetSamplerParameteriv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << toHex(reinterpret_cast<deUintptr>(static_cast<const void*>(params))) << ");" << TestLog::EndMessage;
        m_gl.getSamplerParameteriv(sampler, pname, params);
        if (m_enableLog)
-               m_log << TestLog::Message << "// params = " << getPointerStr(params, 1) << TestLog::EndMessage;
+               m_log << TestLog::Message << "// params = " << getPointerStr(params, getTextureParamQueryNumArgsOut(pname)) << TestLog::EndMessage;
 }
 
 void CallLogWrapper::glGetShaderInfoLog (glw::GLuint shader, glw::GLsizei bufSize, glw::GLsizei *length, glw::GLchar *infoLog)
@@ -2087,7 +2087,7 @@ void CallLogWrapper::glGetTexParameterfv (glw::GLenum target, glw::GLenum pname,
                m_log << TestLog::Message << "glGetTexParameterfv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << toHex(reinterpret_cast<deUintptr>(static_cast<const void*>(params))) << ");" << TestLog::EndMessage;
        m_gl.getTexParameterfv(target, pname, params);
        if (m_enableLog)
-               m_log << TestLog::Message << "// params = " << getPointerStr(params, 1) << TestLog::EndMessage;
+               m_log << TestLog::Message << "// params = " << getPointerStr(params, getTextureParamQueryNumArgsOut(pname)) << TestLog::EndMessage;
 }
 
 void CallLogWrapper::glGetTexParameteriv (glw::GLenum target, glw::GLenum pname, glw::GLint *params)
@@ -2096,7 +2096,7 @@ void CallLogWrapper::glGetTexParameteriv (glw::GLenum target, glw::GLenum pname,
                m_log << TestLog::Message << "glGetTexParameteriv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << toHex(reinterpret_cast<deUintptr>(static_cast<const void*>(params))) << ");" << TestLog::EndMessage;
        m_gl.getTexParameteriv(target, pname, params);
        if (m_enableLog)
-               m_log << TestLog::Message << "// params = " << getPointerStr(params, 1) << TestLog::EndMessage;
+               m_log << TestLog::Message << "// params = " << getPointerStr(params, getTextureParamQueryNumArgsOut(pname)) << TestLog::EndMessage;
 }
 
 void CallLogWrapper::glGetTextureImage (glw::GLuint texture, glw::GLint level, glw::GLenum format, glw::GLenum type, glw::GLsizei bufSize, void *pixels)
@@ -3362,7 +3362,7 @@ void CallLogWrapper::glSamplerParameterf (glw::GLuint sampler, glw::GLenum pname
 void CallLogWrapper::glSamplerParameterfv (glw::GLuint sampler, glw::GLenum pname, const glw::GLfloat *param)
 {
        if (m_enableLog)
-               m_log << TestLog::Message << "glSamplerParameterfv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(param, 1) << ");" << TestLog::EndMessage;
+               m_log << TestLog::Message << "glSamplerParameterfv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(param, getTextureParamNumArgs(pname)) << ");" << TestLog::EndMessage;
        m_gl.samplerParameterfv(sampler, pname, param);
 }
 
@@ -3376,7 +3376,7 @@ void CallLogWrapper::glSamplerParameteri (glw::GLuint sampler, glw::GLenum pname
 void CallLogWrapper::glSamplerParameteriv (glw::GLuint sampler, glw::GLenum pname, const glw::GLint *param)
 {
        if (m_enableLog)
-               m_log << TestLog::Message << "glSamplerParameteriv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(param, 1) << ");" << TestLog::EndMessage;
+               m_log << TestLog::Message << "glSamplerParameteriv(" << sampler << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(param, getTextureParamNumArgs(pname)) << ");" << TestLog::EndMessage;
        m_gl.samplerParameteriv(sampler, pname, param);
 }
 
@@ -3544,7 +3544,7 @@ void CallLogWrapper::glTexParameterf (glw::GLenum target, glw::GLenum pname, glw
 void CallLogWrapper::glTexParameterfv (glw::GLenum target, glw::GLenum pname, const glw::GLfloat *params)
 {
        if (m_enableLog)
-               m_log << TestLog::Message << "glTexParameterfv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(params, 1) << ");" << TestLog::EndMessage;
+               m_log << TestLog::Message << "glTexParameterfv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(params, getTextureParamNumArgs(pname)) << ");" << TestLog::EndMessage;
        m_gl.texParameterfv(target, pname, params);
 }
 
@@ -3558,7 +3558,7 @@ void CallLogWrapper::glTexParameteri (glw::GLenum target, glw::GLenum pname, glw
 void CallLogWrapper::glTexParameteriv (glw::GLenum target, glw::GLenum pname, const glw::GLint *params)
 {
        if (m_enableLog)
-               m_log << TestLog::Message << "glTexParameteriv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(params, 1) << ");" << TestLog::EndMessage;
+               m_log << TestLog::Message << "glTexParameteriv(" << getTextureTargetStr(target) << ", " << getTextureParameterStr(pname) << ", " << getPointerStr(params, getTextureParamNumArgs(pname)) << ");" << TestLog::EndMessage;
        m_gl.texParameteriv(target, pname, params);
 }
 
index 731251a..c5f15e2 100644 (file)
@@ -178,8 +178,8 @@ CALL_LOG_SPECS = {
        "glGetQueryObjecti64v":                                 LogSpec({1: enum("QueryObjectParam")}, argOutPrints = {2: pointer(size = "1")}),
        "glGetQueryObjectui64v":                                LogSpec({1: enum("QueryObjectParam")}, argOutPrints = {2: pointer(size = "1")}),
        "glGetRenderbufferParameteriv":                 LogSpec({0: enum("FramebufferTarget"), 1: enum("RenderbufferParameter")}),
-       "glGetSamplerParameterfv":                              LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "1")}),
-       "glGetSamplerParameteriv":                              LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "1")}),
+       "glGetSamplerParameterfv":                              LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
+       "glGetSamplerParameteriv":                              LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetSamplerParameterIiv":                             LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetSamplerParameterIuiv":                    LogSpec({1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetShaderiv":                                                LogSpec({1: enum("ShaderParam")}, argOutPrints = {2: pointer(size = "1")}),
@@ -188,8 +188,8 @@ CALL_LOG_SPECS = {
 #      "glGetShaderSource":
        "glGetString":                                                  LogSpec({0: enum("GettableString")}, returnPrint=stringVal),
        "glGetStringi":                                                 LogSpec({0: enum("GettableString")}, returnPrint=stringVal),
-       "glGetTexParameterfv":                                  LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "1")}),
-       "glGetTexParameteriv":                                  LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "1")}),
+       "glGetTexParameterfv":                                  LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
+       "glGetTexParameteriv":                                  LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetTexParameterIiv":                                 LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetTexParameterIuiv":                                LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}, argOutPrints = {2: pointer(size = "getTextureParamQueryNumArgsOut(pname)")}),
        "glGetTexLevelParameterfv":                             LogSpec({0: enum("TextureTarget"), 2: enum("TextureLevelParameter")}, argOutPrints = {3: pointer(size = "1")}),
@@ -225,15 +225,15 @@ CALL_LOG_SPECS = {
        "glTexStorage3DMultisample":                    LogSpec({0: enum("TextureTarget"), 2: enum("PixelFormat"), 6: enum("Boolean")}),
        # \todo [2012-03-08 pyry] Pointer values..
        "glTexParameterf":                                              LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter")}),
-       "glTexParameterfv":                                             LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "1")}),
        "glTexParameteri":                                              LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: lambda name: "getTextureParameterValueStr(pname, %s)" % name}),
-       "glTexParameteriv":                                             LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "1")}),
+       "glTexParameterfv":                                             LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
+       "glTexParameteriv":                                             LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glTexParameterIiv":                                    LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glTexParameterIuiv":                                   LogSpec({0: enum("TextureTarget"), 1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glSamplerParameterf":                                  LogSpec({1: enum("TextureParameter")}),
-       "glSamplerParameterfv":                                 LogSpec({1: enum("TextureParameter"), 2: pointer(size = "1")}),
        "glSamplerParameteri":                                  LogSpec({1: enum("TextureParameter"), 2: lambda name: "getTextureParameterValueStr(pname, %s)" % name}),
-       "glSamplerParameteriv":                                 LogSpec({1: enum("TextureParameter"), 2: pointer(size = "1")}),
+       "glSamplerParameterfv":                                 LogSpec({1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
+       "glSamplerParameteriv":                                 LogSpec({1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glSamplerParameterIiv":                                LogSpec({1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glSamplerParameterIuiv":                               LogSpec({1: enum("TextureParameter"), 2: pointer(size = "getTextureParamNumArgs(pname)")}),
        "glTexSubImage1D":                                              LogSpec({0: enum("TextureTarget"), 4: enum("PixelFormat"), 5: enum("Type")}),