| 126 | } |
| 127 | |
| 128 | void Configuration::gatherGPUInfo() |
| 129 | { |
| 130 | auto driver = backend::DriverBase::getInstance(); |
| 131 | |
| 132 | _valueDict["vendor"] = Value(driver->getVendor()); |
| 133 | _valueDict["renderer"] = Value(driver->getRenderer()); |
| 134 | _valueDict["version"] = Value(driver->getVersion()); |
| 135 | _valueDict["glsl"] = Value(driver->getShaderVersion()); |
| 136 | |
| 137 | _valueDict["max_texture_size"] = Value(driver->getMaxTextureSize()); |
| 138 | _valueDict["max_vertex_attributes"] = Value(driver->getMaxAttributes()); |
| 139 | _valueDict["max_texture_units"] = Value(driver->getMaxTextureUnits()); |
| 140 | _valueDict["max_samples_allowed"] = Value(driver->getMaxSamplesAllowed()); |
| 141 | |
| 142 | _supportsNPOT = true; |
| 143 | _valueDict["supports_NPOT"] = Value(_supportsNPOT); |
| 144 | |
| 145 | _supportsETC1 = driver->checkForFeatureSupported(backend::FeatureType::ETC1); |
| 146 | _valueDict["supports_ETC1"] = Value(_supportsETC1); |
| 147 | |
| 148 | _supportsETC2 = driver->checkForFeatureSupported(backend::FeatureType::ETC2); |
| 149 | _valueDict["supports_ETC2"] = Value(_supportsETC2); |
| 150 | |
| 151 | _supportsS3TC = driver->checkForFeatureSupported(backend::FeatureType::S3TC); |
| 152 | _valueDict["supports_S3TC"] = Value(_supportsS3TC); |
| 153 | |
| 154 | _supportsATITC = driver->checkForFeatureSupported(backend::FeatureType::AMD_COMPRESSED_ATC); |
| 155 | _valueDict["supports_ATITC"] = Value(_supportsATITC); |
| 156 | |
| 157 | _supportsASTC = driver->checkForFeatureSupported(backend::FeatureType::ASTC); |
| 158 | _valueDict["supports_ASTC"] = Value(_supportsASTC); |
| 159 | |
| 160 | _supportsPVRTC = driver->checkForFeatureSupported(backend::FeatureType::PVRTC); |
| 161 | _valueDict["supports_PVRTC"] = Value(_supportsPVRTC); |
| 162 | |
| 163 | _supportsBGRA8888 = driver->checkForFeatureSupported(backend::FeatureType::IMG_FORMAT_BGRA8888); |
| 164 | _valueDict["supports_BGRA8888"] = Value(_supportsBGRA8888); |
| 165 | |
| 166 | _supportsDiscardFramebuffer = driver->checkForFeatureSupported(backend::FeatureType::DISCARD_FRAMEBUFFER); |
| 167 | _valueDict["supports_discard_framebuffer"] = Value(_supportsDiscardFramebuffer); |
| 168 | |
| 169 | _supportsOESPackedDepthStencil = driver->checkForFeatureSupported(backend::FeatureType::PACKED_DEPTH_STENCIL); |
| 170 | _valueDict["supports_OES_packed_depth_stencil"] = Value(_supportsOESPackedDepthStencil); |
| 171 | |
| 172 | _supportsShareableVAO = driver->checkForFeatureSupported(backend::FeatureType::VAO); |
| 173 | _valueDict["supports_vertex_array_object"] = Value(_supportsShareableVAO); |
| 174 | |
| 175 | _supportsOESMapBuffer = driver->checkForFeatureSupported(backend::FeatureType::MAPBUFFER); |
| 176 | _valueDict["supports_OES_map_buffer"] = Value(_supportsOESMapBuffer); |
| 177 | |
| 178 | _supportsOESDepth24 = driver->checkForFeatureSupported(backend::FeatureType::DEPTH24); |
| 179 | _valueDict["supports_OES_depth24"] = Value(_supportsOESDepth24); |
| 180 | } |
| 181 | |
| 182 | Configuration* Configuration::getInstance() |
| 183 | { |
no test coverage detected