--- /dev/null
+phaulos@google.com
+tinazh@google.com
+misojarvi@google.com
+kraita@google.com
return platformOk && testExecOk;
}
-void App::onWatchdogTimeout (qpWatchDog* watchDog, void* userPtr)
+void App::onWatchdogTimeout (qpWatchDog* watchDog, void* userPtr, qpTimeoutReason reason)
{
DE_UNREF(watchDog);
- static_cast<App*>(userPtr)->onWatchdogTimeout();
+ static_cast<App*>(userPtr)->onWatchdogTimeout(reason);
}
void App::onCrash (qpCrashHandler* crashHandler, void* userPtr)
static_cast<App*>(userPtr)->onCrash();
}
-void App::onWatchdogTimeout (void)
+void App::onWatchdogTimeout (qpTimeoutReason reason)
{
if (!m_crashLock.tryLock() || m_crashed)
return; // In crash handler already.
m_crashed = true;
m_testCtx->getLog().terminateCase(QP_TEST_RESULT_TIMEOUT);
- die("Watchdog timer timeout");
+ die("Watchdog timer timeout for %s", (reason == QP_TIMEOUT_REASON_INTERVAL_LIMIT ? "touch interval" : "total time"));
}
static void writeCrashToLog (void* userPtr, const char* infoString)
protected:
void cleanup (void);
- void onWatchdogTimeout (void);
+ void onWatchdogTimeout (qpTimeoutReason reason);
void onCrash (void);
- static void onWatchdogTimeout (qpWatchDog* watchDog, void* userPtr);
+ static void onWatchdogTimeout (qpWatchDog* watchDog, void* userPtr, qpTimeoutReason reason);
static void onCrash (qpCrashHandler* crashHandler, void* userPtr);
Platform& m_platform;
deUint64 curTime = deGetMicroseconds();
int totalSecondsPassed = (int)((curTime - dog->resetTime) / 1000000ull);
int secondsSinceLastTouch = (int)((curTime - dog->lastTouchTime) / 1000000ull);
+ deBool overIntervalLimit = secondsSinceLastTouch > dog->intervalTimeLimit;
+ deBool overTotalLimit = totalSecondsPassed > dog->totalTimeLimit;
- if ((secondsSinceLastTouch > dog->intervalTimeLimit) || (totalSecondsPassed > dog->totalTimeLimit))
+ if (overIntervalLimit || overTotalLimit)
{
+ qpTimeoutReason reason = overTotalLimit ? QP_TIMEOUT_REASON_TOTAL_LIMIT : QP_TIMEOUT_REASON_INTERVAL_LIMIT;
DBGPRINT(("watchDogThreadFunc(): call timeout func\n"));
- dog->timeOutFunc(dog, dog->timeOutUserPtr);
+ dog->timeOutFunc(dog, dog->timeOutUserPtr, reason);
break;
}
typedef struct qpWatchDog_s qpWatchDog;
-typedef void (*qpWatchDogFunc) (qpWatchDog* dog, void* userPtr);
+typedef enum qpTimeoutReason_e
+{
+ QP_TIMEOUT_REASON_INTERVAL_LIMIT = 0,
+ QP_TIMEOUT_REASON_TOTAL_LIMIT,
+
+ QP_TIMEOUT_REASON_LAST
+} qpTimeoutReason;
+
+typedef void (*qpWatchDogFunc) (qpWatchDog* dog, void* userPtr, qpTimeoutReason reason);
DE_BEGIN_EXTERN_C
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;
}
-const UniformData& SRGBTestProgram::getUniformAtLocation (int location) const
-{
- return m_uniformDataList[location];
-}
-
int SRGBTestProgram::getUniformLocation (const std::string& name)
{
for (std::size_t idx = 0; idx < m_uniformDataList.size(); idx++)
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,
exclude("gles31-hw-issues.txt"),
exclude("gles31-driver-issues.txt"),
exclude("gles31-test-issues.txt"),
- exclude("gles31-spec-issues.txt")
+ exclude("gles31-spec-issues.txt"),
]
MASTER_GLES31_PKG = Package(module = GLES31_MODULE, configurations = [
# Master
exclude("vk-not-applicable.txt"),
exclude("vk-excluded-tests.txt"),
exclude("vk-test-issues.txt"),
- exclude("vk-waivers.txt")
+ exclude("vk-waivers.txt"),
]
MASTER_VULKAN_PKG = Package(module = VULKAN_MODULE, configurations = [
Configuration(name = "master",
message(FATAL_ERROR "X11 development package not found")
endif ()
+# Support GLES1, we use pkg-config because some distributions do not ship
+# GLES1 libraries and headers, this way user can override search path by
+# using PKG_CONFIG_PATH environment variable
+FIND_PACKAGE(PkgConfig)
+PKG_CHECK_MODULES(GLES1 glesv1_cm)
+if (GLES1_LIBRARIES)
+ set(DEQP_SUPPORT_GLES1 ON)
+ set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARIES})
+ set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS})
+ if ("${PKG_GLES1_INCLUDE_DIRS}" STREQUAL "")
+ # PKG_GLES1_INCLUDE_DIRS empty, see if matching include
+ # path (GLES/gl.h) exists beside library directory
+ set(GLES1_INCLUDE "${GLES1_LIBDIR}/../include")
+ if (EXISTS ${GLES1_INCLUDE}/GLES/gl.h)
+ include_directories(${GLES1_INCLUDE})
+ else()
+ message(FATAL_ERROR "Could not find include path for GLES1 headers")
+ endif (EXISTS ${GLES1_INCLUDE}/GLES/gl.h)
+ endif ("${PKG_GLES1_INCLUDE_DIRS}" STREQUAL "")
+endif (GLES1_LIBRARIES)
+
set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})
include_directories(${X11_INCLUDE_DIR})