mirror of
https://github.com/FEX-Emu/FEX.git
synced 2024-12-12 08:35:59 +00:00
Library Forwarding/GL: Assume void* always points to compatible data
This commit is contained in:
parent
b275c96889
commit
843b2d1969
@ -144,7 +144,7 @@ void GenerateThunkLibsAction::EmitLayoutWrappers(clang::ASTContext& context, std
|
||||
auto struct_name = get_type_name(context, type);
|
||||
|
||||
// Opaque types don't need layout definitions
|
||||
if (type_repack_info.assumed_compatible && type_repack_info.pointers_only) {
|
||||
if (type_repack_info.assumed_compatible && type_repack_info.pointers_only && struct_name != "void") {
|
||||
if (guest_abi.pointer_size != 4) {
|
||||
fmt::print(file, "template<> inline constexpr bool has_compatible_data_layout<{}*> = true;\n", struct_name);
|
||||
}
|
||||
|
@ -38,6 +38,11 @@ struct fex_gen_config<SetGuestXDisplayString> : fexgen::custom_guest_entrypoint,
|
||||
template<typename>
|
||||
struct fex_gen_type {};
|
||||
|
||||
// Assume void* always points to data with consistent layout.
|
||||
// It's used in too many functions to annotate them all.
|
||||
template<>
|
||||
struct fex_gen_type<void> : fexgen::opaque_type {};
|
||||
|
||||
template<>
|
||||
struct fex_gen_type<std::remove_pointer_t<GLXContext>> : fexgen::opaque_type {};
|
||||
template<>
|
||||
|
Loading…
Reference in New Issue
Block a user