diff options
author | Ilia Mirkin <[email protected]> | 2016-08-20 22:42:45 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-08-23 18:30:53 -0400 |
commit | 361678edd776ca3012cbe231167e740f7af9c0b0 (patch) | |
tree | 66374f98c716b6256a4cf066445d050b61868450 /src/gallium | |
parent | 9515d651f95d58feea64d1c4c989a216ff83f8b4 (diff) |
st/dri: respect driver's request to avoid mixed color/depth bit configs
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/dri/dri_screen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c index 5f4fb8a5c69..79bcb5abce7 100644 --- a/src/gallium/state_trackers/dri/dri_screen.c +++ b/src/gallium/state_trackers/dri/dri_screen.c @@ -128,6 +128,7 @@ dri_fill_in_modes(struct dri_screen *screen) unsigned i; struct pipe_screen *p_screen = screen->base.screen; boolean pf_z16, pf_x8z24, pf_z24x8, pf_s8z24, pf_z24s8, pf_z32; + boolean mixed_color_depth; static const GLenum back_buffer_modes[] = { GLX_NONE, GLX_SWAP_UNDEFINED_OML, GLX_SWAP_COPY_OML @@ -184,6 +185,9 @@ dri_fill_in_modes(struct dri_screen *screen) stencil_bits_array[depth_buffer_factor++] = 0; } + mixed_color_depth = + p_screen->get_param(p_screen, PIPE_CAP_MIXED_COLOR_DEPTH_BITS); + assert(ARRAY_SIZE(mesa_formats) == ARRAY_SIZE(pipe_formats)); /* Add configs. */ @@ -214,7 +218,7 @@ dri_fill_in_modes(struct dri_screen *screen) depth_buffer_factor, back_buffer_modes, ARRAY_SIZE(back_buffer_modes), msaa_modes, 1, - GL_TRUE, GL_FALSE); + GL_TRUE, !mixed_color_depth); configs = driConcatConfigs(configs, new_configs); /* Multi-sample configs without an accumulation buffer. */ @@ -224,7 +228,7 @@ dri_fill_in_modes(struct dri_screen *screen) depth_buffer_factor, back_buffer_modes, ARRAY_SIZE(back_buffer_modes), msaa_modes+1, num_msaa_modes-1, - GL_FALSE, GL_FALSE); + GL_FALSE, !mixed_color_depth); configs = driConcatConfigs(configs, new_configs); } } |