OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrVkUtil.h" | 8 #include "GrVkUtil.h" |
9 | 9 |
10 bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) { | 10 bool GrPixelConfigToVkFormat(GrPixelConfig config, VkFormat* format) { |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam
ples) { | 224 bool GrSampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits* vkSam
ples) { |
225 switch (samples) { | 225 switch (samples) { |
226 case 0: // fall through | 226 case 0: // fall through |
227 case 1: | 227 case 1: |
228 *vkSamples = VK_SAMPLE_COUNT_1_BIT; | 228 *vkSamples = VK_SAMPLE_COUNT_1_BIT; |
229 return true; | 229 return true; |
230 case 2: | 230 case 2: |
231 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 231 *vkSamples = VK_SAMPLE_COUNT_2_BIT; |
232 return true; | 232 return true; |
233 case 4: | 233 case 4: |
234 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 234 *vkSamples = VK_SAMPLE_COUNT_4_BIT; |
235 return true; | 235 return true; |
236 case 8: | 236 case 8: |
237 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 237 *vkSamples = VK_SAMPLE_COUNT_8_BIT; |
238 return true; | 238 return true; |
239 case 16: | 239 case 16: |
240 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 240 *vkSamples = VK_SAMPLE_COUNT_16_BIT; |
241 return true; | 241 return true; |
242 case 32: | 242 case 32: |
243 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 243 *vkSamples = VK_SAMPLE_COUNT_32_BIT; |
244 return true; | 244 return true; |
245 case 64: | 245 case 64: |
246 *vkSamples = VK_SAMPLE_COUNT_2_BIT; | 246 *vkSamples = VK_SAMPLE_COUNT_64_BIT; |
247 return true; | 247 return true; |
248 default: | 248 default: |
249 return false; | 249 return false; |
250 } | 250 } |
251 } | 251 } |
OLD | NEW |