From 6452018c97f0acadbf1dd3b481eece754d8de06f Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Thu, 9 Oct 2014 09:13:56 -0600 Subject: [PATCH] tests: Add -use-BIL option --- tests/xglrenderframework.cpp | 2 +- tests/xgltestframework.cpp | 6 ++++++ tests/xgltestframework.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/xglrenderframework.cpp b/tests/xglrenderframework.cpp index ce647fdf..42a21055 100644 --- a/tests/xglrenderframework.cpp +++ b/tests/xglrenderframework.cpp @@ -242,7 +242,7 @@ void XglRenderFramework::CreateShader(XGL_PIPELINE_SHADER_STAGE stage, 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 a324d0ac..9b79396c 100644 --- a/tests/xgltestframework.cpp +++ b/tests/xgltestframework.cpp @@ -101,6 +101,7 @@ XglTestFramework::~XglTestFramework() // 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 @@ void XglTestFramework::InitArgs(int *argc, char *argv[]) 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 e48e4c66..fe9cfd2e 100644 --- a/tests/xgltestframework.h +++ b/tests/xgltestframework.h @@ -69,6 +69,7 @@ public: bool GLSLtoBIL(const XGL_PIPELINE_SHADER_STAGE shader_type, const char *pshader, std::vector &bil); + static bool m_use_bil; private: int m_compile_options; @@ -91,6 +92,7 @@ private: static bool m_show_images; static bool m_save_images; + static std::list m_images; static std::list::iterator m_display_image; static int m_display_image_idx;