tests: Add -use-BIL option
diff --git a/tests/xglrenderframework.cpp b/tests/xglrenderframework.cpp
index ce647fd..42a2105 100644
--- a/tests/xglrenderframework.cpp
+++ b/tests/xglrenderframework.cpp
@@ -242,7 +242,7 @@
createInfo.sType = XGL_STRUCTURE_TYPE_SHADER_CREATE_INFO;
createInfo.pNext = NULL;
- if (this->m_device->extension_exist("XGL_COMPILE_GLSL")) {
+ if (!this->m_use_bil && this->m_device->extension_exist("XGL_COMPILE_GLSL")) {
XGL_INTEL_COMPILE_GLSL glsl_header;
glsl_header.stage = stage;
diff --git a/tests/xgltestframework.cpp b/tests/xgltestframework.cpp
index a324d0a..9b79396 100644
--- a/tests/xgltestframework.cpp
+++ b/tests/xgltestframework.cpp
@@ -101,6 +101,7 @@
// Define all the static elements
bool XglTestFramework::m_show_images = false;
bool XglTestFramework::m_save_images = false;
+bool XglTestFramework::m_use_bil = false;
int XglTestFramework::m_width = 0;
int XglTestFramework::m_height = 0;
int XglTestFramework::m_window = 0;
@@ -123,6 +124,11 @@
continue;
}
+ if (strncmp("--use-BIL", argv[i], 13) == 0) {
+ m_use_bil = true;
+ continue;
+ }
+
/*
* Since the above "consume" inputs, update argv
* so that it contains the trimmed list of args for glutInit
diff --git a/tests/xgltestframework.h b/tests/xgltestframework.h
index e48e4c6..fe9cfd2 100644
--- a/tests/xgltestframework.h
+++ b/tests/xgltestframework.h
@@ -69,6 +69,7 @@
bool GLSLtoBIL(const XGL_PIPELINE_SHADER_STAGE shader_type,
const char *pshader,
std::vector<unsigned int> &bil);
+ static bool m_use_bil;
private:
int m_compile_options;
@@ -91,6 +92,7 @@
static bool m_show_images;
static bool m_save_images;
+
static std::list<XglTestImageRecord> m_images;
static std::list<XglTestImageRecord>::iterator m_display_image;
static int m_display_image_idx;