summaryrefslogtreecommitdiff
path: root/gdk/gdkvulkancontext.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-02-23 13:49:17 +0100
committerBenjamin Otte <otte@redhat.com>2018-02-23 14:12:47 +0100
commit45603f70a82a87d82107c20d9e3f559126000a03 (patch)
tree7a5423b660f226a28020c9e0858968917edc1bd2 /gdk/gdkvulkancontext.c
parent4cfaee99e782e12e5f6050e41a16e49f8fc9656b (diff)
downloadgtk+-45603f70a82a87d82107c20d9e3f559126000a03.tar.gz
vulkan: Don't quiet the compiler
This reverts 76461a8004caf4490f84140b0551d1f5296241f6. We don't want to quiet the compiler here because new warnings should be added to the enum the moment they become available.
Diffstat (limited to 'gdk/gdkvulkancontext.c')
-rw-r--r--gdk/gdkvulkancontext.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c
index 21be067b61..83d5047a80 100644
--- a/gdk/gdkvulkancontext.c
+++ b/gdk/gdkvulkancontext.c
@@ -93,7 +93,35 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GdkVulkanContext, gdk_vulkan_context, GDK_TYPE
const char *
gdk_vulkan_strerror (VkResult result)
{
- switch ((int)result)
+ /* If your compiler brought you here with a warning about missing
+ * enumeration values, you're running a newer Vulkan version than
+ * the GTK developers )or you are a GTK developer) and have
+ * encountered a newly added Vulkan error message.
+ * You want to add it to this enum now.
+ *
+ * Becuse the Vulkan people don't make adding this too easy, here's
+ * the process to manage it:
+ * 1. go to
+ * https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blame/master/include/vulkan/vulkan.h
+ * 2. Find the line where this enum value was added.
+ * 3. Click the commit that added this line.
+ * 4. The commit you're looking at now should also change
+ * VK_HEADER_VERSION, find that number.
+ * 5. Use that number in the #ifdef when adding the enum value to
+ * this enum.
+ * 6. For the error message, look at the specification (the one
+ * that includes all extensions) at
+ * https://www.khronos.org/registry/vulkan/specs/1.0-extensions/html/vkspec.html#VkResult
+ * 7. If this value has not been added to the specification yet,
+ * search for the error message in the text of specification.
+ * Often it will have a description that can be used as an error
+ * message.
+ * 8. If that didn't lead to one (or you are lazy), just use the
+ * literal string of the enum value as the error message. A
+ * GTK developer will add the correct one once it's added to the
+ * specification.
+ */
+ switch (result)
{
case VK_SUCCESS:
return "Command successfully completed.";