| 131 | } |
| 132 | |
| 133 | void checkMesaBug() |
| 134 | { |
| 135 | if (is_mesa_checked) |
| 136 | return; |
| 137 | is_mesa_checked = true; |
| 138 | std::string ren((const char*)glGetString(GL_RENDERER)); |
| 139 | std::string ver((const char*)glGetString(GL_VERSION)); |
| 140 | if (ren.find("Mesa DRI Intel") == 0) |
| 141 | { |
| 142 | size_t mesa_pos = ver.rfind("Mesa "); |
| 143 | if (mesa_pos != std::string::npos) |
| 144 | { |
| 145 | double mesa_ver = atof(ver.substr(mesa_pos + 5).c_str()); |
| 146 | if (mesa_ver < 10.3) |
| 147 | { |
| 148 | defines += "#define MESA_BUGGY_BOOL_CMP\n"; |
| 149 | LOG_WARNING << "Working around buggy boolean instructions in your Mesa driver. Mesa DRI 10.3+ is recommended."; |
| 150 | } |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | void setVertexShader(const std::string& src) |
| 156 | { |
nothing calls this directly
no outgoing calls
no test coverage detected