Create wrapper for vulkan.hpp
authorFrancisco Santos <f1.santos@samsung.com>
Fri, 17 Nov 2017 11:31:16 +0000 (11:31 +0000)
committerAdam Bialogonski <jsr184@gmail.com>
Fri, 17 Nov 2017 11:49:12 +0000 (06:49 -0500)
Change-Id: I5a7a94fd6836b32273ed0384e38770902588f6b8

dali/graphics/vulkan/vulkan-command-buffer.cpp
dali/graphics/vulkan/vulkan-hpp-wrapper.h [new file with mode: 0644]
dali/graphics/vulkan/vulkan-standalone-test.cpp
dali/graphics/vulkan/vulkan-types.h
dali/integration-api/graphics/vulkan/vk-surface-factory.h

index 4bddcea..501cd26 100644 (file)
@@ -110,6 +110,7 @@ void CommandBuffer::ImageLayoutTransition(vk::Image            image,
     srcStageMask = vk::PipelineStageFlagBits::eBottomOfPipe;
     srcAccessMask = vk::AccessFlagBits::eColorAttachmentWrite | vk::AccessFlagBits::eColorAttachmentRead;
   }
+  break;
   case vk::ImageLayout::eColorAttachmentOptimal:
   {
     srcStageMask = vk::PipelineStageFlagBits::eFragmentShader | vk::PipelineStageFlagBits::eColorAttachmentOutput;
@@ -123,7 +124,7 @@ void CommandBuffer::ImageLayoutTransition(vk::Image            image,
   case vk::ImageLayout::eTransferSrcOptimal:
   case vk::ImageLayout::eTransferDstOptimal:
   case vk::ImageLayout::ePreinitialized:
-  default:
+  case vk::ImageLayout::eSharedPresentKHR:
   {
   }
   }
@@ -154,6 +155,7 @@ void CommandBuffer::ImageLayoutTransition(vk::Image            image,
   case vk::ImageLayout::eTransferDstOptimal:
   case vk::ImageLayout::ePreinitialized:
   case vk::ImageLayout::eUndefined:
+  case vk::ImageLayout::eSharedPresentKHR:
   default:
   {
   }
diff --git a/dali/graphics/vulkan/vulkan-hpp-wrapper.h b/dali/graphics/vulkan/vulkan-hpp-wrapper.h
new file mode 100644 (file)
index 0000000..7fc38bf
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
+#define DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
+
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// Vulkan without exceptions
+#ifndef VULKAN_HPP_NO_EXCEPTIONS
+#define VULKAN_HPP_NO_EXCEPTIONS
+#endif
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wfloat-equal"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#include <vulkan/vulkan.hpp>
+#pragma GCC diagnostic pop
+
+#endif // DALI_GRAPHICS_VULKAN_HPP_WRAPPER_H
index a23e7e4..92d3023 100644 (file)
@@ -12,7 +12,7 @@
 #define VK_USE_PLATFORM_XCB_KHR
 #endif
 
-#include <vulkan/vulkan.hpp>
+#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
 
 #include <dali/integration-api/graphics/vulkan/vk-surface-factory.h>
 #include <dali/integration-api/graphics/graphics.h>
index fb6e5b4..6f0dd62 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-
-// Vulkan
-#ifndef VULKAN_HPP_NO_EXCEPTIONS
-#define VULKAN_HPP_NO_EXCEPTIONS
-#endif
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wfloat-equal"
-#include <vulkan/vulkan.hpp>
-#pragma GCC diagnostic pop
-
-// StdC++
 #include <atomic>
 #include <unordered_map>
 #include <memory>
 
+#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
+
 namespace Dali
 {
 namespace Graphics
index f1fb66d..370d01b 100644 (file)
  *
  */
 
-// INTERNAL INCLUDES
+// EXTERNAL INCLUDES
+#include <dali/graphics/vulkan/vulkan-hpp-wrapper.h>
 
+// INTERNAL INCLUDES
 #include <dali/integration-api/graphics/surface-factory.h>
 
-// EXTERNAL INCLUDES
-// Vulkan
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wfloat-equal"
-#include <vulkan/vulkan.hpp>
-#pragma GCC diagnostic pop
 
 namespace Dali
 {