- /* Add a 565-no-depth-no-stencil pbuffer-only config. If X11 is depth 24,
- * we wouldn't have 565 available, which the CTS demands.
- */
- for (int j = 0; dri2_dpy->driver_configs[j]; j++) {
- const __DRIconfig *config = dri2_dpy->driver_configs[j];
- const EGLint config_attrs[] = {
- EGL_NATIVE_VISUAL_ID, 0,
- EGL_NATIVE_VISUAL_TYPE, EGL_NONE,
- EGL_NONE
- };
- EGLint surface_type = EGL_PBUFFER_BIT;
- unsigned int rgba_masks[4] = {
- 0x1f << 11,
- 0x3f << 5,
- 0x1f << 0,
- 0,
- };
-
- /* Check that we've found single-sample, no depth, no stencil. */
- if (!dri2_x11_config_match_attrib(dri2_dpy, config,
- __DRI_ATTRIB_DEPTH_SIZE, 0) ||
- !dri2_x11_config_match_attrib(dri2_dpy, config,
- __DRI_ATTRIB_STENCIL_SIZE, 0) ||
- !dri2_x11_config_match_attrib(dri2_dpy, config,
- __DRI_ATTRIB_SAMPLES, 0)) {
- continue;
- }
-
- if (dri2_add_config(disp, config, config_count + 1, surface_type,
- config_attrs, rgba_masks)) {
- config_count++;
- break;
- }
- }
-