3 Commits

Author SHA1 Message Date
Robin Voetter
2be3eefdfe Merge pull request #197 from mozbeel/android-fix
isARM -> isArm
2025-08-01 00:23:48 +02:00
mozbeel
17ddd01e42 isARM -> isArm 2025-08-01 00:22:02 +02:00
Robin Voetter
2846d415d8 Add workaround for incorrect StdVideoH265HrdParameters encoding
See https://github.com/KhronosGroup/Vulkan-Docs/issues/2557
2025-07-20 08:39:16 +02:00
2 changed files with 11 additions and 3 deletions

View File

@@ -365,10 +365,18 @@ fn parsePointerMeta(fields: Fields, type_info: *registry.TypeInfo, elem: *xml.El
else => break, else => break,
}; };
if (it.next()) |_| { if (it.next()) |_| ignore: {
// There are more elements in the `len` attribute than there are pointers // There are more elements in the `len` attribute than there are pointers
// Something probably went wrong // Something probably went wrong
std.log.err("len: {s}", .{lens}); switch (current_type_info.*) {
.name => |name| if (std.mem.eql(u8, name, "StdVideoH265SubLayerHrdParameters")) {
// Known issue: https://github.com/KhronosGroup/Vulkan-Docs/issues/2557
break :ignore;
},
else => {},
}
std.log.err("excessive pointer lengths: {s}", .{lens});
return error.InvalidRegistry; return error.InvalidRegistry;
} }
} }

View File

@@ -18,7 +18,7 @@ const preamble =
\\ \\
\\pub const vulkan_call_conv: std.builtin.CallingConvention = if (builtin.os.tag == .windows and builtin.cpu.arch == .x86) \\pub const vulkan_call_conv: std.builtin.CallingConvention = if (builtin.os.tag == .windows and builtin.cpu.arch == .x86)
\\ .Stdcall \\ .Stdcall
\\ else if (builtin.abi == .android and (builtin.cpu.arch.isARM() or builtin.cpu.arch.isThumb()) and std.Target.arm.featureSetHas(builtin.cpu.features, .has_v7) and builtin.cpu.arch.ptrBitWidth() == 32) \\ else if (builtin.abi == .android and (builtin.cpu.arch.isArm() or builtin.cpu.arch.isThumb()) and std.Target.arm.featureSetHas(builtin.cpu.features, .has_v7) and builtin.cpu.arch.ptrBitWidth() == 32)
\\ // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat" \\ // On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
\\ // calling convention, i.e. float parameters are passed in registers. This \\ // calling convention, i.e. float parameters are passed in registers. This
\\ // is true even if the rest of the application passes floats on the stack, \\ // is true even if the rest of the application passes floats on the stack,