new ABI, broaden support

This commit is contained in:
nmzik
2026-07-28 00:20:04 +02:00
parent 4b9030bd3d
commit 64845e2294
6 changed files with 79 additions and 9 deletions
@@ -102,6 +102,10 @@ constexpr RenderTargetFormatMapping kRenderTargetFormats[] = {
Prospero::ChannelType::kUNorm,
Prospero::ChannelOrder::kStandard,
{vk::Format::eR16G16B16A16Unorm, 8}},
{Prospero::ChannelLayout::k16_16_16_16,
Prospero::ChannelType::kUInt,
Prospero::ChannelOrder::kStandard,
{vk::Format::eR16G16B16A16Uint, 8}},
{Prospero::ChannelLayout::k16_16_16_16,
Prospero::ChannelType::kFloat,
Prospero::ChannelOrder::kStandard,
@@ -333,8 +333,10 @@ static bool IsSupportedStorageTextureDescriptor(const ShaderRecompiler::IR::Imag
!Prospero::IsFmaskTextureFormat(descriptor.Format()) && (is_2d || is_2d_array) &&
TileGetBlockLayout(TileBlockFamily::Depth64KB, depth_bpe, depth_block);
const bool supported_standard_tile =
tile == Prospero::GpuEnumValue(Prospero::TileMode::kStandard4KB) &&
TileIsStandard4KBTextureSupported(descriptor.Format());
(tile == Prospero::GpuEnumValue(Prospero::TileMode::kStandard4KB) &&
TileIsStandard4KBTextureSupported(descriptor.Format())) ||
(tile == Prospero::GpuEnumValue(Prospero::TileMode::kStandard64KB) &&
TileIsStandard64KBTextureSupported(descriptor.Format()));
const bool supported_tile = tile == Prospero::GpuEnumValue(Prospero::TileMode::kLinear) ||
tile == Prospero::GpuEnumValue(Prospero::TileMode::kRenderTarget) ||
supported_depth_tile || supported_standard_tile;
+7
View File
@@ -1996,6 +1996,12 @@ int64_t KYTY_SYSV_ABI send(int s, const void* buf, uint64_t len, int flags) {
return Network::Net::Send(s, buf, len, flags);
}
int64_t KYTY_SYSV_ABI sendto(int s, const void* buf, uint64_t len, int flags, const void* addr,
uint32_t addrlen) {
PRINT_NAME();
return Network::Net::Sendto(s, buf, len, flags, addr, addrlen);
}
int64_t KYTY_SYSV_ABI recv(int s, void* buf, uint64_t len, int flags) {
PRINT_NAME();
return Network::Net::Recv(s, buf, len, flags);
@@ -2135,6 +2141,7 @@ LIB_DEFINE(InitLibKernel_1_Posix) {
LIB_FUNC("fFxGkxF2bVo", Posix::setsockopt);
LIB_FUNC("T8fER+tIGgk", Posix::select);
LIB_FUNC("fZOeZIOEmLw", Posix::send);
LIB_FUNC("oBr313PppNE", Posix::sendto);
LIB_FUNC("Ez8xjo9UF4E", Posix::recv);
LIB_FUNC("5jRCs2axtr4", Posix::inet_ntop);
LIB_FUNC("cfwBSQyr5Ys", cfwBSQyr5Ys);
+22 -3
View File
@@ -1907,13 +1907,21 @@ int KYTY_SYSV_ABI Setsockopt(int s, int level, int optname, const void* optval,
}
int64_t KYTY_SYSV_ABI Send(int s, const void* buf, uint64_t len, int flags) {
return Sendto(s, buf, len, flags, nullptr, 0);
}
int64_t KYTY_SYSV_ABI Sendto(int s, const void* buf, uint64_t len, int flags, const void* addr,
uint32_t addrlen) {
PRINT_NAME();
LOGF("\t s = %d\n"
"\t buf = 0x%016" PRIx64 "\n"
"\t len = %" PRIu64 "\n"
"\t flags = 0x%08" PRIx32 "\n",
s, reinterpret_cast<uint64_t>(buf), len, static_cast<uint32_t>(flags));
"\t flags = 0x%08" PRIx32 "\n"
"\t addr = 0x%016" PRIx64 "\n"
"\t addrlen = %" PRIu32 "\n",
s, reinterpret_cast<uint64_t>(buf), len, static_cast<uint32_t>(flags),
reinterpret_cast<uint64_t>(addr), addrlen);
NativeSocket socket = INVALID_NATIVE_SOCKET;
if (buf == nullptr || !GetSocketBackend(s, &socket)) {
@@ -1928,7 +1936,18 @@ int64_t KYTY_SYSV_ABI Send(int s, const void* buf, uint64_t len, int flags) {
}
const int host_len = static_cast<int>(len > 0x7fffffffu ? 0x7fffffffu : len);
const int result = ::send(socket, static_cast<const char*>(buf), host_len, host_flags);
int result = 0;
if (addr == nullptr) {
result = ::send(socket, static_cast<const char*>(buf), host_len, host_flags);
} else {
sockaddr_storage host_addr {};
int host_addrlen = 0;
if (ConvertGuestSockaddr(addr, addrlen, &host_addr, &host_addrlen) != 0) {
return -1;
}
result = ::sendto(socket, static_cast<const char*>(buf), host_len, host_flags,
reinterpret_cast<const sockaddr*>(&host_addr), host_addrlen);
}
if (result == SOCKET_ERROR) {
return SetPosixSocketError();
}
+2
View File
@@ -60,6 +60,8 @@ int KYTY_SYSV_ABI Setsockopt(int s, int level, int optname, const void* optval,
int KYTY_SYSV_ABI Select(int nfds, void* readfds, void* writefds, void* exceptfds,
const void* timeout);
int64_t KYTY_SYSV_ABI Send(int s, const void* buf, uint64_t len, int flags);
int64_t KYTY_SYSV_ABI Sendto(int s, const void* buf, uint64_t len, int flags, const void* addr,
uint32_t addrlen);
int64_t KYTY_SYSV_ABI Recv(int s, void* buf, uint64_t len, int flags);
} // namespace Net