Permalink
Browse files

Vk: initial Vulkan headers generated using flextGL.

  • Loading branch information...
mosra committed Mar 2, 2018
1 parent fec1a07 commit b1377033e81efd5f3037b8624cf4574bd3574d52
View
@@ -607,6 +607,22 @@ In order to remove OpenAL functionality, be sure to touch all places mentioned
above, only in inverse --- but usually @ref developers-deprecation "deprecate first",
unless it doesn't affect public API at all.
@section developers-vk-extensions Checklist for adding / removing Vulkan versions and extensions
@todoc adapt from the GL section
In order to remove Vulkan functionality, be sure to touch all places mentioned
above, only in inverse --- but usually @ref developers-deprecation "deprecate first",
unless it doesn't affect public API at all.
@section developers-vk-functionality Checklist for adding / removing Vulkan functionality
@todoc adapt from the GL section
In order to remove Vulkan functionality, be sure to touch all places mentioned
above, only in inverse --- but usually @ref developers-deprecation "deprecate first",
unless it doesn't affect public API at all.
@section developers-dependency Checklist for adding, removing or updating a dependency
1. Verify that there are no important clients stuck on the old version with no
@@ -24,3 +24,48 @@
# DEALINGS IN THE SOFTWARE.
#
# We don't need system-wide includes
set(Vulkan_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/src/MagnumExternal/Vulkan)
find_package(Vulkan REQUIRED)
set(MagnumVk_SRCS )
set(MagnumVk_HEADERS
Vk.h
visibility.h)
set(MagnumVk_PRIVATE_HEADERS )
# Vk library
add_library(MagnumVk ${SHARED_OR_STATIC}
${MagnumVk_SRCS}
${MagnumVk_HEADERS}
${MagnumVk_PRIVATE_HEADERS}
$<TARGET_OBJECTS:MagnumFlextVkObjects>)
set_target_properties(MagnumVk PROPERTIES
DEBUG_POSTFIX "-d"
FOLDER "Magnum/Vk")
if(NOT BUILD_STATIC)
target_compile_definitions(MagnumVk PRIVATE "FlextVk_EXPORTS")
set_target_properties(MagnumVk PROPERTIES VERSION ${MAGNUM_LIBRARY_VERSION} SOVERSION ${MAGNUM_LIBRARY_SOVERSION})
elseif(BUILD_STATIC_PIC)
set_target_properties(MagnumVk PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
target_include_directories(MagnumVk PUBLIC
${PROJECT_SOURCE_DIR}/src
${PROJECT_BINARY_DIR}/src)
target_link_libraries(MagnumVk PUBLIC
Magnum
Vulkan::Vulkan)
install(TARGETS MagnumVk
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})
install(FILES ${MagnumVk_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Vk)
# Magnum Vk library target alias for superprojects
add_library(Magnum::Vk ALIAS MagnumVk)
if(BUILD_TESTS)
add_subdirectory(Test)
endif()
@@ -0,0 +1,25 @@
#
# This file is part of Magnum.
#
# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
# Vladimír Vondruš <mosra@centrum.cz>
# Copyright © 2016 Jonathan Hale <squareys@googlemail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
View
@@ -0,0 +1,38 @@
#ifndef Magnum_Vk_Vk_h
#define Magnum_Vk_Vk_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
Vladimír Vondruš <mosra@centrum.cz>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
/** @file
* @brief Forward declarations for the @ref Magnum::Vk namespace
*/
namespace Magnum { namespace Vk {
}}
#endif
View
@@ -0,0 +1,50 @@
#ifndef Magnum_Vk_visibility_h
#define Magnum_Vk_visibility_h
/*
This file is part of Magnum.
Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
Vladimír Vondruš <mosra@centrum.cz>
Copyright © 2016 Jonathan Hale <squareys@googlemail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#include <Corrade/Utility/VisibilityMacros.h>
#include "Magnum/configure.h"
#ifndef DOXYGEN_GENERATING_OUTPUT
#ifndef MAGNUM_BUILD_STATIC
#ifdef MagnumVk_EXPORTS
#define MAGNUM_VK_EXPORT CORRADE_VISIBILITY_EXPORT
#else
#define MAGNUM_VK_EXPORT CORRADE_VISIBILITY_IMPORT
#endif
#else
#define MAGNUM_VK_EXPORT CORRADE_VISIBILITY_STATIC
#endif
#define MAGNUM_VK_LOCAL CORRADE_VISIBILITY_LOCAL
#else
#define MAGNUM_VK_EXPORT
#define MAGNUM_VK_LOCAL
#endif
#endif
@@ -29,6 +29,9 @@ endif()
if(WITH_GL)
add_subdirectory(OpenGL)
endif()
if(WITH_VK)
add_subdirectory(Vulkan)
endif()
if(MAGNUM_BUILD_DEPRECATED)
add_subdirectory(Optional)
@@ -0,0 +1,36 @@
#
# This file is part of Magnum.
#
# Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018
# Vladimír Vondruš <mosra@centrum.cz>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
add_library(MagnumFlextVkObjects OBJECT flextVk.cpp)
target_include_directories(MagnumFlextVkObjects PUBLIC $<TARGET_PROPERTY:MagnumVk,INTERFACE_INCLUDE_DIRECTORIES>)
if(NOT BUILD_STATIC)
target_compile_definitions(MagnumFlextVkObjects PRIVATE "FlextVk_EXPORTS")
endif()
if(NOT BUILD_STATIC OR BUILD_STATIC_PIC)
set_target_properties(MagnumFlextVkObjects PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()
set_target_properties(MagnumFlextVkObjects PROPERTIES FOLDER "MagnumExternal/Vulkan")
install(FILES flextVk.h flextVkGlobal.h DESTINATION ${MAGNUM_EXTERNAL_INCLUDE_INSTALL_DIR}/Vulkan)
@@ -0,0 +1,25 @@
version 1.1 vulkan
extension KHR_16bit_storage optional
extension KHR_bind_memory2 optional
extension KHR_dedicated_allocation optional
extension KHR_descriptor_update_template optional
extension KHR_device_group optional
extension KHR_device_group_creation optional
extension KHR_external_memory optional
extension KHR_external_memory_capabilities optional
extension KHR_external_semaphore optional
extension KHR_external_semaphore_capabilities optional
extension KHR_external_fence optional
extension KHR_external_fence_capabilities optional
extension KHR_get_memory_requirements2 optional
extension KHR_get_physical_device_properties2 optional
extension KHR_maintenance1 optional
extension KHR_maintenance2 optional
extension KHR_maintenance3 optional
extension KHR_multiview optional
extension KHR_relaxed_block_layout optional
extension KHR_sampler_ycbcr_conversion optional
extension KHR_shader_draw_parameters optional
extension KHR_storage_buffer_storage_class optional
extension KHR_variable_pointers optional
Oops, something went wrong.

0 comments on commit b137703

Please sign in to comment.