1 // Copyright (C) 2018 The Android Open Source Project
2 // Copyright (C) 2018 Google Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 // Autogenerated module VkDecoder
17 //
18 // (header) generated by scripts/genvk.py -registry
19 // ../../../../../hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/xml/vk.xml
20 // -registryGfxstream xml/vk_gfxstream.xml cereal -o
21 // ../../../../../hardware/google/gfxstream/host/vulkan/cereal
22 //
23 // Please do not modify directly;
24 // re-run mesa3d/src/gfxstream/codegen/generate-gfxstream-vulkan.sh,
25 // or directly from Python by defining:
26 // VULKAN_REGISTRY_XML_DIR : Directory containing vk.xml
27 // VULKAN_REGISTRY_SCRIPTS_DIR : Directory containing genvk.py
28 // CEREAL_OUTPUT_DIR: Where to put the generated sources.
29 //
30 // python3 $VULKAN_REGISTRY_SCRIPTS_DIR/genvk.py -registry $VULKAN_REGISTRY_XML_DIR/vk.xml cereal -o
31 // $CEREAL_OUTPUT_DIR
32 //
33 #pragma once
34 #include <vulkan/vulkan.h>
35 
36 #include <memory>
37 
38 #include "ProcessResources.h"
39 #include "VkDecoderContext.h"
40 #include "vk_android_native_buffer_gfxstream.h"
41 #include "vulkan_gfxstream.h"
42 
43 namespace android {
44 namespace base {
45 class BumpPool;
46 }  // namespace base
47 }  // namespace android
48 
49 namespace gfxstream {
50 class IOStream;
51 }  // namespace gfxstream
52 
53 namespace gfxstream {
54 namespace vk {
55 
56 class VkDecoder {
57    public:
58     VkDecoder();
59     ~VkDecoder();
60     void setForSnapshotLoad(bool forSnapshotLoad);
61     size_t decode(void* buf, size_t bufsize, IOStream* stream,
62                   const ProcessResources* processResources, const VkDecoderContext&);
63 
64    private:
65     class Impl;
66     std::unique_ptr<Impl> mImpl;
67 };
68 
69 }  // namespace vk
70 }  // namespace gfxstream
71