gfxstream: add REQUIRED_TYPES list
This makes the checks into a list. It also adds support for uint16_t, which are hit with newer versions of vk.xml. I'm not sure exactly why we need the list, only that codegen errors occur if we don't don't generate a type here. Maybe as we try to upstream the cerealgenerator, we can figure out why and fix it. Reviewed-by: Aaron Ruby <aruby@blackberry.com> Acked-by: Yonggang Luo <luoyonggang@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27246>
This commit is contained in:
committed by
Marge Bot
parent
a1ac0bedfc
commit
2dbbeca869
@@ -166,6 +166,15 @@ SUPPORTED_MODULES = {
|
||||
"VK_KHR_swapchain" : HOST_MODULES,
|
||||
}
|
||||
|
||||
REQUIRED_TYPES = {
|
||||
"int",
|
||||
"uint16_t",
|
||||
"int64_t",
|
||||
"double",
|
||||
"VkPresentScalingFlagsEXT",
|
||||
"VkPresentGravityFlagsEXT",
|
||||
}
|
||||
|
||||
copyrightHeader = """// Copyright (C) 2018 The Android Open Source Project
|
||||
// Copyright (C) 2018 Google Inc.
|
||||
//
|
||||
@@ -812,23 +821,9 @@ class BumpPool;
|
||||
def genType(self, typeinfo: TypeInfo, name, alias):
|
||||
OutputGenerator.genType(self, typeinfo, name, alias)
|
||||
|
||||
if self.featureSupported == False and name == "int":
|
||||
self.typeInfo.onGenType(typeinfo, name, alias)
|
||||
return
|
||||
|
||||
if self.featureSupported == False and name == "int64_t":
|
||||
self.typeInfo.onGenType(typeinfo, name, alias)
|
||||
return
|
||||
|
||||
if self.featureSupported == False and name == "double":
|
||||
self.typeInfo.onGenType(typeinfo, name, alias)
|
||||
return
|
||||
|
||||
if self.featureSupported == False and name == "VkPresentScalingFlagsEXT":
|
||||
self.typeInfo.onGenType(typeinfo, name, alias)
|
||||
return
|
||||
|
||||
if self.featureSupported == False and name == "VkPresentGravityFlagsEXT":
|
||||
# Maybe this check can be removed if we refactor other things inside
|
||||
# the cereal subdirectory.
|
||||
if self.featureSupported == False and name in REQUIRED_TYPES:
|
||||
self.typeInfo.onGenType(typeinfo, name, alias)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user