diff options
author | Marek Olšák <[email protected]> | 2012-12-03 03:40:43 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-12-07 14:19:28 +0100 |
commit | 888714feb6fe9ff22221f4f8a6ed6abd904a2761 (patch) | |
tree | dd05a40ee639eac56a8b6d505892611da6e68131 /src/gallium/state_trackers | |
parent | 985649b5963f2ad4bfe00abf573b1a53b28ed453 (diff) |
st/dri: don't expose MSAA configs with accumulation buffer
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/dri/common/dri_screen.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_screen.c b/src/gallium/state_trackers/dri/common/dri_screen.c index 96efa1f63ea..df2cd3f6b37 100644 --- a/src/gallium/state_trackers/dri/common/dri_screen.c +++ b/src/gallium/state_trackers/dri/common/dri_screen.c @@ -164,13 +164,25 @@ dri_fill_in_modes(struct dri_screen *screen) } if (num_msaa_modes) { + /* Single-sample configs with an accumulation buffer. */ new_configs = driCreateConfigs(mesa_formats[format], depth_bits_array, stencil_bits_array, depth_buffer_factor, back_buffer_modes, Elements(back_buffer_modes), - msaa_modes, num_msaa_modes, + msaa_modes, 1, GL_TRUE); configs = driConcatConfigs(configs, new_configs); + + /* Multi-sample configs without an accumulation buffer. */ + if (num_msaa_modes > 1) { + new_configs = driCreateConfigs(mesa_formats[format], + depth_bits_array, stencil_bits_array, + depth_buffer_factor, back_buffer_modes, + Elements(back_buffer_modes), + msaa_modes+1, num_msaa_modes-1, + GL_FALSE); + configs = driConcatConfigs(configs, new_configs); + } } } |