summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaiyi Li <kaiyili@google.com>2022-08-29 17:15:59 -0700
committerKaiyi Li <kaiyili@google.com>2022-08-29 17:28:34 -0700
commit3b1953b1026ffc28f9ff9f915d13cb5e0a7f581a (patch)
tree389f167d9287b6f99ff01cff269aeff7c4af0634
parentf020531c7c58051a512385e4a59c842c12fe1d35 (diff)
downloadgfxstream-protocols-3b1953b1026ffc28f9ff9f915d13cb5e0a7f581a.tar.gz
vulkan: put the copyright comments at the beginning
... in the vulkan_gfxstream.h headers. Change-Id: I3e04c9e6ed3ece23af419a2853159e4c3f930e3e
-rwxr-xr-xregistry/vulkan/scripts/genvk.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/registry/vulkan/scripts/genvk.py b/registry/vulkan/scripts/genvk.py
index ad39664b..f7646d56 100755
--- a/registry/vulkan/scripts/genvk.py
+++ b/registry/vulkan/scripts/genvk.py
@@ -277,6 +277,7 @@ def makeGenOpts(args):
'// re-run gfxstream-protocols/scripts/generate-vulkan-sources.sh,',
'// or directly from Python by calling the genvk.py script with correct parameters.',
'',
+ '#pragma once',
'#ifdef VK_GFXSTREAM_STRUCTURE_TYPE_EXT',
'#include "vulkan_gfxstream_structure_type.h"',
'#endif',
@@ -299,7 +300,9 @@ def makeGenOpts(args):
emitExtensions = makeREstring(['VK_GOOGLE_gfxstream'], None),
prefixText = gfxstreamPrefixStrings,
genFuncPointers = True,
- protectFile = protectFile,
+ # Use #pragma once in the prefixText instead, so that we can put the copyright comments
+ # at the beginning of the file.
+ protectFile = False,
protectFeature = False,
protectProto = '#ifndef',
protectProtoStr = 'VK_NO_PROTOTYPES',