mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
vulkan/util: no need to hide ANB property itself behind Android
Property members are never going to use platform specific struct. Getting rid of the guard around sharedImage propperty simplifies driver side setting the prop. Reviewed-by: Lucas Fryzek <lfryzek@igalia.com> Acked-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36702>
This commit is contained in:
parent
567cff487c
commit
9999cd3967
1 changed files with 2 additions and 11 deletions
|
|
@ -82,9 +82,8 @@ class Property:
|
|||
name: str
|
||||
actual_name: str
|
||||
length: str
|
||||
is_android: bool
|
||||
|
||||
def __init__(self, p, property_struct_name, is_android=False):
|
||||
def __init__(self, p, property_struct_name):
|
||||
self.decl = ""
|
||||
for element in p:
|
||||
if element.tag != "comment":
|
||||
|
|
@ -100,8 +99,6 @@ class Property:
|
|||
|
||||
self.decl = self.decl.replace(self.name, self.actual_name)
|
||||
|
||||
self.is_android = is_android
|
||||
|
||||
@dataclass
|
||||
class PropertyStruct:
|
||||
c_type: str
|
||||
|
|
@ -162,13 +159,7 @@ extern "C" {
|
|||
|
||||
struct vk_properties {
|
||||
% for prop in all_properties:
|
||||
% if prop.is_android:
|
||||
#if DETECT_OS_ANDROID
|
||||
% endif
|
||||
${prop.decl};
|
||||
% if prop.is_android:
|
||||
#endif /* DETECT_OS_ANDROID */
|
||||
% endif
|
||||
% endfor
|
||||
};
|
||||
|
||||
|
|
@ -331,7 +322,7 @@ def get_property_structs(doc, api, beta):
|
|||
elif m_name == "sType":
|
||||
s_type = p.attrib.get("values")
|
||||
else:
|
||||
properties.append(Property(p, name, is_android))
|
||||
properties.append(Property(p, name))
|
||||
|
||||
property_struct = PropertyStruct(c_type=full_name, s_type=s_type,
|
||||
name=name, properties=properties, is_android=is_android)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue