Merge "opengles Translator: sort conformant configs first"
This commit is contained in:
@@ -217,6 +217,10 @@ bool EglConfig::compitableWith(const EglConfig& conf) const {
|
|||||||
|
|
||||||
//following the sorting EGLconfig as in spec
|
//following the sorting EGLconfig as in spec
|
||||||
bool EglConfig::operator<(const EglConfig& conf) const {
|
bool EglConfig::operator<(const EglConfig& conf) const {
|
||||||
|
//0
|
||||||
|
if(m_conformant != conf.m_conformant) {
|
||||||
|
return m_conformant != 0; //We want the conformant ones first
|
||||||
|
}
|
||||||
//1
|
//1
|
||||||
if(m_caveat != conf.m_caveat) {
|
if(m_caveat != conf.m_caveat) {
|
||||||
return m_caveat < conf.m_caveat; // EGL_NONE < EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG
|
return m_caveat < conf.m_caveat; // EGL_NONE < EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG
|
||||||
@@ -292,7 +296,7 @@ bool EglConfig::choosen(const EglConfig& dummy) {
|
|||||||
if(dummy.m_surface_type != EGL_DONT_CARE &&
|
if(dummy.m_surface_type != EGL_DONT_CARE &&
|
||||||
((dummy.m_surface_type & m_surface_type) != dummy.m_surface_type)) return false;
|
((dummy.m_surface_type & m_surface_type) != dummy.m_surface_type)) return false;
|
||||||
|
|
||||||
if(dummy.m_conformant != EGL_DONT_CARE &&
|
if(dummy.m_conformant != (EGLenum)EGL_DONT_CARE &&
|
||||||
((dummy.m_conformant & m_conformant) != dummy.m_conformant)) return false;
|
((dummy.m_conformant & m_conformant) != dummy.m_conformant)) return false;
|
||||||
|
|
||||||
if(dummy.m_renderable_type != EGL_DONT_CARE &&
|
if(dummy.m_renderable_type != EGL_DONT_CARE &&
|
||||||
|
|||||||
Reference in New Issue
Block a user