Skip to content

Commit 3cfdfe3

Browse files
SWDEV-544502 - Skip opengl tests on devices with no image support (#542)
Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
1 parent e79eaaa commit 3cfdfe3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

projects/hip-tests/catch/unit/gl_interop/gl_interop_common.hh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,6 @@ class EGLContextScopeGuard {
126126
public:
127127
EGLContextScopeGuard() {
128128

129-
if(!HipTest::isImageSupported()) {
130-
HipTest::HIP_SKIP_TEST("Image is not supported on the device. Skipped.");
131-
exit(1);
132-
}
133-
134129
// 1. Initialize EGL
135130
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
136131
(PFNEGLQUERYDEVICESEXTPROC)eglGetProcAddress("eglQueryDevicesEXT");
@@ -214,6 +209,12 @@ class GLContextScopeGuard {
214209
static constexpr char kEnvarName[] = "GL_CONTEXT_TYPE";
215210

216211
GLContextScopeGuard() {
212+
213+
if(!HipTest::isImageSupported()) {
214+
HipTest::HIP_SKIP_TEST("Image is not supported on the device. Skipped.");
215+
exit(0);
216+
}
217+
217218
char* val = std::getenv(kEnvarName);
218219
std::string val_str = val == NULL ? "" : val;
219220

0 commit comments

Comments
 (0)