The reference config filter function is changed to correctly implement
the EGL spec for eglChooseConfig() by ignoring all other attributes
when EGL_CONFIG_ID is specified.
Affects:
dEQP-EGL.functional.choose_config.simple.selection_only.config_id
dEQP-EGL.functional.choose_config.simple.selection_and_sort.config_id
Change-Id: Id29758954ce476e6d187fba228d5156295165b02
Components: AOSP
bool isMatch (const SurfaceConfig& config) const
{
+ bool match = true;
for (std::map<EGLenum, AttribRule>::const_iterator iter = m_rules.begin(); iter != m_rules.end(); iter++)
{
const AttribRule rule = iter->second;
{
const EGLint cfgValue = config.getAttribute(rule.name);
+ if (rule.name == EGL_CONFIG_ID)
+ return (rule.value == cfgValue);
+
switch (rule.criteria)
{
case CRITERIA_EXACT:
if (rule.value != cfgValue)
- return false;
+ match = false;
break;
case CRITERIA_AT_LEAST:
if (rule.value > cfgValue)
- return false;
+ match = false;
break;
case CRITERIA_MASK:
if ((rule.value & cfgValue) != rule.value)
- return false;
+ match = false;
break;
default:
}
}
- return true;
+ return match;
}
tcu::BVec4 getSpecifiedRGBColors (void) const