Tobin Ehlis | 257d974 | 2015-07-08 17:08:02 -0600 | [diff] [blame] | 1 | /* |
| 2 | * Vulkan |
| 3 | * |
| 4 | * Copyright (C) 2014 LunarG, Inc. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included |
| 14 | * in all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 22 | * DEALINGS IN THE SOFTWARE. |
| 23 | */ |
| 24 | #include "vk_debug_report_lunarg.h" |
| 25 | |
| 26 | typedef enum _DYNAMIC_STATE_BIND_POINT |
| 27 | { |
| 28 | VK_STATE_BIND_POINT_VIEWPORT, |
| 29 | VK_STATE_BIND_POINT_RASTER, |
| 30 | VK_STATE_BIND_POINT_COLOR_BLEND, |
| 31 | VK_STATE_BIND_POINT_DEPTH_STENCIL, |
| 32 | VK_NUM_STATE_BIND_POINT // Used for array sizing |
| 33 | } DYNAMIC_STATE_BIND_POINT; |
| 34 | |
| 35 | static string string_DYNAMIC_STATE_BIND_POINT(DYNAMIC_STATE_BIND_POINT sbp) |
| 36 | { |
| 37 | switch (sbp) |
| 38 | { |
| 39 | case VK_STATE_BIND_POINT_VIEWPORT: |
| 40 | return "VIEWPORT"; |
| 41 | case VK_STATE_BIND_POINT_RASTER: |
| 42 | return "RASTER"; |
| 43 | case VK_STATE_BIND_POINT_COLOR_BLEND: |
| 44 | return "COLOR_BLEND"; |
| 45 | case VK_STATE_BIND_POINT_DEPTH_STENCIL: |
| 46 | return "DEPTH_STENCIL"; |
| 47 | default: |
| 48 | return "UNKNOWN_DYNAMIC_STATE_BIND_POINT"; |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | static VkDbgObjectType dynamicStateBindPointToObjType(DYNAMIC_STATE_BIND_POINT sbp) |
| 53 | { |
| 54 | switch (sbp) |
| 55 | { |
| 56 | case VK_STATE_BIND_POINT_VIEWPORT: |
| 57 | return VK_OBJECT_TYPE_DYNAMIC_VIEWPORT_STATE; |
| 58 | case VK_STATE_BIND_POINT_RASTER: |
| 59 | return VK_OBJECT_TYPE_DYNAMIC_RASTER_STATE; |
| 60 | case VK_STATE_BIND_POINT_COLOR_BLEND: |
| 61 | return VK_OBJECT_TYPE_DYNAMIC_COLOR_BLEND_STATE; |
| 62 | case VK_STATE_BIND_POINT_DEPTH_STENCIL: |
| 63 | return VK_OBJECT_TYPE_DYNAMIC_DEPTH_STENCIL_STATE; |
| 64 | default: |
| 65 | return VK_OBJECT_TYPE_MAX_ENUM; |
| 66 | } |
| 67 | } |