tests: Add -use-BIL option

This commit is contained in:
Courtney Goeltzenleuchter 2014-10-09 09:13:56 -06:00
parent 2918b7a1fd
commit 6452018c97
3 changed files with 9 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -69,6 +69,7 @@ public:
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 @@ private:
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;