if (DE_COMPILER_IS_GCC OR DE_COMPILER_IS_CLANG)
# -Wconversion generates a LOT of warnings in this code base
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion")
+
+ # Same for -Wunused-function
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function")
endif ()
if (EXISTS "${GTF_HOME}/CMakeLists.txt")
#include <iomanip>
-#include <deMath.h>
-#include <tcuMatrixUtil.hpp>
-#include <tcuVectorUtil.hpp>
+#include "deMath.h"
+#include "deUniquePtr.hpp"
+#include "tcuMatrixUtil.hpp"
+#include "tcuVectorUtil.hpp"
#include <cstdlib>
#include <cstring>
}
Utils::programInfo program(m_context);
- std::auto_ptr<functionObject> function_object(getFunctionObject(function, type));
+ de::UniquePtr<functionObject> function_object(getFunctionObject(function, type));
prepareProgram(*function_object, program);
prepareTestData(*function_object);
EGLint eglwClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLint)0;
- return egl->clientWaitSyncKHR(dpy, sync, flags, timeout);
+ return egl->clientWaitSyncKHR(dpy, sync, flags, timeout);
}
EGLImageKHR eglwCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)
EGLSyncKHR eglwCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLSyncKHR)0;
return egl->createSyncKHR(dpy, type, attrib_list);
EGLBoolean eglwDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->destroyImageKHR(dpy, image);
EGLBoolean eglwDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->destroySyncKHR(dpy, sync);
EGLDisplay eglwGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLDisplay)0;
return egl->getPlatformDisplayEXT(platform, native_display, attrib_list);
EGLBoolean eglwGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->getSyncAttribKHR(dpy, sync, attribute, value);
EGLBoolean eglwLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->lockSurfaceKHR(dpy, surface, attrib_list);
EGLBoolean eglwSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->setDamageRegionKHR(dpy, surface, rects, n_rects);
EGLBoolean eglwSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->signalSyncKHR(dpy, sync, mode);
EGLBoolean eglwSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->swapBuffersWithDamageKHR(dpy, surface, rects, n_rects);
EGLBoolean eglwUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLBoolean)0;
return egl->unlockSurfaceKHR(dpy, surface);
EGLint eglwWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)
{
- const eglw::Library* egl = eglw::getCurrentThreadLibrary();
+ const eglw::Library* egl = eglw::getCurrentThreadLibrary();
if (!egl)
return (EGLint)0;
- return egl->waitSyncKHR(dpy, sync, flags);
+ return egl->waitSyncKHR(dpy, sync, flags);
}
void setSingleValue (const SsboArgData argData);
bool setAllValues (const std::vector<SsboArgData> argDataList);
- const std::string& getContextVersion (void) const;
- const std::string& getStdFormat (void) const;
- const std::string& getBindingPoint (void) const;
- const std::string& getMatrixOrder (void) const;
- const std::string& getMemberType (void) const;
- const std::string& getMemberName (void) const;
- const std::string& getMemberFixedArrayName (void) const;
- const std::string& getMemberVariableArray (void) const;
bool getMemberReorder (void) const;
- int getNumberMembers (void) const;
void resetValues (void);
return true;
}
-const std::string& SsboArgs::getContextVersion (void) const
-{
- return m_negativeContextVersion;
-}
-
-const std::string& SsboArgs::getStdFormat (void) const
-{
- return m_stdFormat;
-}
-
-const std::string& SsboArgs::getBindingPoint (void) const
-{
- return m_bindingPoint;
-}
-
-const std::string& SsboArgs::getMatrixOrder (void) const
-{
- return m_matrixOrder;
-}
-
-const std::string& SsboArgs::getMemberType (void) const
-{
- return m_memberType;
-}
-
-const std::string& SsboArgs::getMemberName (void) const
-{
- return m_memberName;
-}
-
-const std::string& SsboArgs::getMemberFixedArrayName (void) const
-{
- return m_memberFixedArrayerName;
-}
-
-const std::string& SsboArgs::getMemberVariableArray (void) const
-{
- return m_memberVariableArray;
-}
-
bool SsboArgs::getMemberReorder (void) const
{
return m_memberReorder;
}
-int SsboArgs::getNumberMembers (void) const
-{
- return m_numberMembers;
-}
-
void SsboArgs::resetValues (void)
{
setDefaultValues();
void setTextureUnit (const deUint32 textureUnit);
void setIsActive (const bool isActive);
- deUint32 getHandle (void) const;
bool getIsActive (void) const;
void bindToTexture (void);
- void unbindFromTexture (void);
private:
const glw::Functions* m_gl;
m_isActive = isActive;
}
-deUint32 SRGBTestSampler::getHandle (void) const
-{
- return m_samplerHandle;
-}
-
bool SRGBTestSampler::getIsActive (void) const
{
return m_isActive;
m_gl->bindSampler(m_textureUnit, m_samplerHandle);
}
-void SRGBTestSampler::unbindFromTexture (void)
-{
- m_gl->bindSampler(m_textureUnit, 0);
-}
-
class SRGBTestTexture
{
public:
deUint32 getHandle (void) const;
deUint32 getGLTargetType (void) const;
SRGBDecode getDecode (void) const;
- bool getHasSampler (void) const;
void upload (void);
return m_decoding;
}
-bool SRGBTestTexture::getHasSampler (void) const
-{
- return m_hasSampler;
-}
-
void SRGBTestTexture::upload (void)
{
m_source.upload();
void setToggleRequired (bool toggleRequired);
void setUniformToggle (int location, bool toggleDecodeValue);
- int getUniformTotal (void) const;
const std::vector<UniformData>& getUniformDataList (void) const;
const UniformData& getUniformAtLocation (int location) const;
int getUniformLocation (const std::string& name);
deUint32 getHandle (void) const;
bool getBlendRequired (void) const;
- bool getToggleRequired (void) const;
- const std::string& getFragmentShader (void) const;
private:
std::string genFunctionCall (ShaderSamplingType samplingType, const int uniformIdx);
}
}
-int SRGBTestProgram::getUniformTotal (void) const
-{
- return (int)m_uniformDataList.size();
-}
-
const std::vector<UniformData>& SRGBTestProgram::getUniformDataList (void) const
{
return m_uniformDataList;
return m_blendRequired;
}
-bool SRGBTestProgram::getToggleRequired (void) const
-{
- return m_toggleRequired;
-}
-
-const std::string& SRGBTestProgram::getFragmentShader (void) const
-{
- return m_shaderFragment;
-}
-
std::string SRGBTestProgram::genFunctionCall (ShaderSamplingType samplingType, const int uniformIdx)
{
std::ostringstream functionCall;
void setSamplingGroup (const ShaderSamplingGroup samplingGroup);
void setSamplingLocations (const int px, const int py);
- void setShaderProgramBlendRequired (const int programIdx, const bool blend);
- void setShaderProgramToggleRequired (const int programIdx, const bool toggle);
void setUniformToggle (const int programIdx, const std::string& uniformName, bool toggleDecode);
- deUint32 getShaderProgramHandle (const int programIdx) const;
- deUint32 getTextureHandle (const int textureIdx) const;
-
void addTexture (const glu::TextureTestUtil::TextureType targetType,
const int width,
const int height,
m_py = py;
}
-void SRGBTestCase::setShaderProgramBlendRequired (const int programIdx, const bool blend)
-{
- m_shaderProgramList[programIdx]->setBlendRequired(blend);
-}
-
-void SRGBTestCase::setShaderProgramToggleRequired (const int programIdx, const bool toggle)
-{
- m_shaderProgramList[programIdx]->setToggleRequired(toggle);
-}
-
-void SRGBTestCase::setUniformToggle (const int programIdx, const std::string& uniformName, bool toggleDecodeValue)
-{
- int uniformLocation = m_shaderProgramList[programIdx]->getUniformLocation(uniformName);
- m_shaderProgramList[programIdx]->setUniformToggle(uniformLocation, toggleDecodeValue);
-}
-
-deUint32 SRGBTestCase::getShaderProgramHandle (const int programIdx) const
-{
- return m_shaderProgramList[programIdx]->getHandle();
-}
-
-deUint32 SRGBTestCase::getTextureHandle (const int textureIdx) const
-{
- return m_textureSourceList[textureIdx]->getHandle();
-}
-
void SRGBTestCase::addTexture ( const glu::TextureTestUtil::TextureType targetType,
const int width,
const int height,
writeInlFile(os.path.join(EGL_WRAPPER_DIR, "eglwApi.inl"), src)
writeInlFile(os.path.join(EGL_WRAPPER_DIR, "eglwEnumsC.inl"), indentLines(map(enumDefinitionC, defaultIface.enums)))
genCommandList(noExtIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImpl.inl")
- genCommandList(extOnlyIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImplExt.inl", True)
+ genCommandList(extOnlyIface, commandWrapperDefinition, EGL_WRAPPER_DIR, "eglwImplExt.inl")