mirror of
https://github.com/KhronosGroup/Vulkan-Hpp
synced 2024-12-04 01:01:08 +00:00
Add inclusion of new encode file to VideoHppGenerator, add compile test for video. (#2002)
This commit is contained in:
parent
06b91cfdc2
commit
1e92bf4fcd
@ -42,8 +42,15 @@ void VideoHppGenerator::generateHppFile() const
|
||||
#ifndef VULKAN_VIDEO_HPP
|
||||
#define VULKAN_VIDEO_HPP
|
||||
|
||||
// clang-format off
|
||||
#include <vulkan/vulkan.hpp>
|
||||
// clang-format on
|
||||
|
||||
#include <vk_video/vulkan_video_codec_av1std.h>
|
||||
#include <vk_video/vulkan_video_codec_av1std_decode.h>
|
||||
#if ( 301 < VK_HEADER_VERSION )
|
||||
# include <vk_video/vulkan_video_codec_av1std_encode.h>
|
||||
#endif
|
||||
#include <vk_video/vulkan_video_codecs_common.h>
|
||||
#include <vk_video/vulkan_video_codec_h264std.h>
|
||||
#include <vk_video/vulkan_video_codec_h264std_decode.h>
|
||||
@ -51,7 +58,6 @@ void VideoHppGenerator::generateHppFile() const
|
||||
#include <vk_video/vulkan_video_codec_h265std.h>
|
||||
#include <vk_video/vulkan_video_codec_h265std_decode.h>
|
||||
#include <vk_video/vulkan_video_codec_h265std_encode.h>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
#if !defined( VULKAN_HPP_VIDEO_NAMESPACE )
|
||||
# define VULKAN_HPP_VIDEO_NAMESPACE video
|
||||
|
@ -46,3 +46,4 @@ add_subdirectory( UniqueHandle )
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
add_subdirectory( UniqueHandleDefaultArguments )
|
||||
endif()
|
||||
add_subdirectory( Video )
|
||||
|
15
tests/Video/CMakeLists.txt
Normal file
15
tests/Video/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright(c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# 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_hpp__setup_test( NAME Video )
|
40
tests/Video/Video.cpp
Normal file
40
tests/Video/Video.cpp
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright(c) 2024, NVIDIA CORPORATION. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// VulkanHpp Samples : Video
|
||||
// Compile test on using vk::video
|
||||
|
||||
#if defined( _MSC_VER )
|
||||
# pragma warning( disable : 4101 ) // 'name': unreference local variable
|
||||
#elif defined( __clang__ )
|
||||
# pragma clang diagnostic ignored "-Wunused-variable"
|
||||
#elif defined( __GNUC__ )
|
||||
# pragma GCC diagnostic ignored "-Wunused-variable"
|
||||
#else
|
||||
// unknown compiler... just ignore the warnings for yourselves ;)
|
||||
#endif
|
||||
|
||||
#include <vulkan/vulkan_video.hpp>
|
||||
|
||||
int main( int /*argc*/, char ** /*argv*/ )
|
||||
{
|
||||
vk::video::H264ChromaFormatIdc x;
|
||||
vk::video::H264ProfileIdc y;
|
||||
|
||||
#if ( 301 < VK_HEADER_VERSION )
|
||||
vk::video::EncodeAV1DecoderModelInfo z;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
@ -7,8 +7,15 @@
|
||||
#ifndef VULKAN_VIDEO_HPP
|
||||
#define VULKAN_VIDEO_HPP
|
||||
|
||||
// clang-format off
|
||||
#include <vulkan/vulkan.hpp>
|
||||
// clang-format on
|
||||
|
||||
#include <vk_video/vulkan_video_codec_av1std.h>
|
||||
#include <vk_video/vulkan_video_codec_av1std_decode.h>
|
||||
#if ( 301 < VK_HEADER_VERSION )
|
||||
# include <vk_video/vulkan_video_codec_av1std_encode.h>
|
||||
#endif
|
||||
#include <vk_video/vulkan_video_codec_h264std.h>
|
||||
#include <vk_video/vulkan_video_codec_h264std_decode.h>
|
||||
#include <vk_video/vulkan_video_codec_h264std_encode.h>
|
||||
@ -16,7 +23,6 @@
|
||||
#include <vk_video/vulkan_video_codec_h265std_decode.h>
|
||||
#include <vk_video/vulkan_video_codec_h265std_encode.h>
|
||||
#include <vk_video/vulkan_video_codecs_common.h>
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
#if !defined( VULKAN_HPP_VIDEO_NAMESPACE )
|
||||
# define VULKAN_HPP_VIDEO_NAMESPACE video
|
||||
|
Loading…
Reference in New Issue
Block a user