Merge 31433106da
into 55bbb28a80
This commit is contained in:
commit
cc62862fea
|
@ -145,6 +145,10 @@ filter({"platforms:Linux", "language:C++", "toolset:clang"})
|
||||||
"deprecated-volatile",
|
"deprecated-volatile",
|
||||||
"switch",
|
"switch",
|
||||||
"deprecated-enum-enum-conversion",
|
"deprecated-enum-enum-conversion",
|
||||||
|
"attributes",
|
||||||
|
})
|
||||||
|
removeflags({
|
||||||
|
"FatalWarnings"
|
||||||
})
|
})
|
||||||
filter({"platforms:Linux", "language:C++", "toolset:clang", "files:*.cc or *.cpp"})
|
filter({"platforms:Linux", "language:C++", "toolset:clang", "files:*.cc or *.cpp"})
|
||||||
buildoptions({
|
buildoptions({
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#define XENIA_APU_AUDIO_MEDIA_PLAYER_H_
|
#define XENIA_APU_AUDIO_MEDIA_PLAYER_H_
|
||||||
|
|
||||||
#include "xenia/apu/audio_system.h"
|
#include "xenia/apu/audio_system.h"
|
||||||
|
#include "xenia/apu/audio_driver.h"
|
||||||
#include "xenia/kernel/xam/apps/xmp_app.h"
|
#include "xenia/kernel/xam/apps/xmp_app.h"
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
|
|
|
@ -160,23 +160,23 @@ static_assert_size(Xma2ExtraData, 34);
|
||||||
|
|
||||||
class XmaContext {
|
class XmaContext {
|
||||||
public:
|
public:
|
||||||
static const uint32_t kBytesPerPacket = 2048;
|
static constexpr uint32_t kBytesPerPacket = 2048;
|
||||||
static const uint32_t kBitsPerPacket = kBytesPerPacket * 8;
|
static constexpr uint32_t kBitsPerPacket = kBytesPerPacket * 8;
|
||||||
static const uint32_t kBitsPerHeader = 32;
|
static constexpr uint32_t kBitsPerHeader = 32;
|
||||||
|
|
||||||
static const uint32_t kBytesPerSample = 2;
|
static constexpr uint32_t kBytesPerSample = 2;
|
||||||
static const uint32_t kSamplesPerFrame = 512;
|
static constexpr uint32_t kSamplesPerFrame = 512;
|
||||||
static const uint32_t kSamplesPerSubframe = 128;
|
static constexpr uint32_t kSamplesPerSubframe = 128;
|
||||||
static const uint32_t kBytesPerFrameChannel =
|
static constexpr uint32_t kBytesPerFrameChannel =
|
||||||
kSamplesPerFrame * kBytesPerSample;
|
kSamplesPerFrame * kBytesPerSample;
|
||||||
static const uint32_t kBytesPerSubframeChannel =
|
static constexpr uint32_t kBytesPerSubframeChannel =
|
||||||
kSamplesPerSubframe * kBytesPerSample;
|
kSamplesPerSubframe * kBytesPerSample;
|
||||||
|
|
||||||
// static const uint32_t kOutputBytesPerBlock = 256;
|
// static const uint32_t kOutputBytesPerBlock = 256;
|
||||||
// static const uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock;
|
// static const uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock;
|
||||||
|
|
||||||
explicit XmaContext();
|
explicit XmaContext();
|
||||||
~XmaContext();
|
virtual ~XmaContext();
|
||||||
|
|
||||||
virtual int Setup(uint32_t id, Memory* memory, uint32_t guest_ptr) {
|
virtual int Setup(uint32_t id, Memory* memory, uint32_t guest_ptr) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -45,28 +45,28 @@ static constexpr int kIdToSampleRate[4] = {24000, 32000, 44100, 48000};
|
||||||
|
|
||||||
class XmaContextNew : public XmaContext {
|
class XmaContextNew : public XmaContext {
|
||||||
public:
|
public:
|
||||||
static const uint32_t kBytesPerPacket = 2048;
|
static constexpr uint32_t kBytesPerPacket = 2048;
|
||||||
static const uint32_t kBytesPerPacketHeader = 4;
|
static constexpr uint32_t kBytesPerPacketHeader = 4;
|
||||||
static const uint32_t kBytesPerPacketData =
|
static constexpr uint32_t kBytesPerPacketData =
|
||||||
kBytesPerPacket - kBytesPerPacketHeader;
|
kBytesPerPacket - kBytesPerPacketHeader;
|
||||||
|
|
||||||
static const uint32_t kBitsPerPacket = kBytesPerPacket * 8;
|
static constexpr uint32_t kBitsPerPacket = kBytesPerPacket * 8;
|
||||||
static const uint32_t kBitsPerPacketHeader = 32;
|
static constexpr uint32_t kBitsPerPacketHeader = 32;
|
||||||
static const uint32_t kBitsPerFrameHeader = 15;
|
static constexpr uint32_t kBitsPerFrameHeader = 15;
|
||||||
|
|
||||||
static const uint32_t kBytesPerSample = 2;
|
static constexpr uint32_t kBytesPerSample = 2;
|
||||||
static const uint32_t kSamplesPerFrame = 512;
|
static constexpr uint32_t kSamplesPerFrame = 512;
|
||||||
static const uint32_t kSamplesPerSubframe = 128;
|
static constexpr uint32_t kSamplesPerSubframe = 128;
|
||||||
static const uint32_t kBytesPerFrameChannel =
|
static constexpr uint32_t kBytesPerFrameChannel =
|
||||||
kSamplesPerFrame * kBytesPerSample;
|
kSamplesPerFrame * kBytesPerSample;
|
||||||
static const uint32_t kBytesPerSubframeChannel =
|
static constexpr uint32_t kBytesPerSubframeChannel =
|
||||||
kSamplesPerSubframe * kBytesPerSample;
|
kSamplesPerSubframe * kBytesPerSample;
|
||||||
|
|
||||||
static const uint32_t kOutputBytesPerBlock = 256;
|
static constexpr uint32_t kOutputBytesPerBlock = 256;
|
||||||
static const uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock;
|
static constexpr uint32_t kOutputMaxSizeBytes = 31 * kOutputBytesPerBlock;
|
||||||
|
|
||||||
static const uint32_t kLastFrameMarker = 0x7FFF;
|
static constexpr uint32_t kLastFrameMarker = 0x7FFF;
|
||||||
static const uint32_t kMaxFrameSizeinBits = 0x4000 - kBitsPerPacketHeader;
|
static constexpr uint32_t kMaxFrameSizeinBits = 0x4000 - kBitsPerPacketHeader;
|
||||||
|
|
||||||
explicit XmaContextNew();
|
explicit XmaContextNew();
|
||||||
~XmaContextNew();
|
~XmaContextNew();
|
||||||
|
|
|
@ -76,6 +76,9 @@ static void XeCopy16384StreamingAVX(CacheLine* XE_RESTRICT to,
|
||||||
}
|
}
|
||||||
XE_MSVC_REORDER_BARRIER();
|
XE_MSVC_REORDER_BARRIER();
|
||||||
}
|
}
|
||||||
|
#ifdef XE_PLATFORM_LINUX
|
||||||
|
__attribute__((__target__("movdir64b")))
|
||||||
|
#endif
|
||||||
XE_FORCEINLINE
|
XE_FORCEINLINE
|
||||||
static void XeCopy16384Movdir64M(CacheLine* XE_RESTRICT to,
|
static void XeCopy16384Movdir64M(CacheLine* XE_RESTRICT to,
|
||||||
CacheLine* XE_RESTRICT from) {
|
CacheLine* XE_RESTRICT from) {
|
||||||
|
@ -142,7 +145,9 @@ static void vastcpy_impl_avx(CacheLine* XE_RESTRICT physaddr,
|
||||||
xe::swcache::WriteLineNT(physaddr + i, &line0);
|
xe::swcache::WriteLineNT(physaddr + i, &line0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef XE_PLATFORM_LINUX
|
||||||
|
__attribute__((__target__("movdir64b")))
|
||||||
|
#endif
|
||||||
static void vastcpy_impl_movdir64m(CacheLine* XE_RESTRICT physaddr,
|
static void vastcpy_impl_movdir64m(CacheLine* XE_RESTRICT physaddr,
|
||||||
CacheLine* XE_RESTRICT rdmapping,
|
CacheLine* XE_RESTRICT rdmapping,
|
||||||
uint32_t written_length) {
|
uint32_t written_length) {
|
||||||
|
|
|
@ -724,11 +724,17 @@ static void ReadLineNT(CacheLine* XE_RESTRICT destination,
|
||||||
const CacheLine* XE_RESTRICT source) {
|
const CacheLine* XE_RESTRICT source) {
|
||||||
assert_true((reinterpret_cast<uintptr_t>(source) & 63ULL) == 0);
|
assert_true((reinterpret_cast<uintptr_t>(source) & 63ULL) == 0);
|
||||||
|
|
||||||
|
#ifdef XENIA_PLATFORM_WINDOWS
|
||||||
__m128i first = _mm_stream_load_si128(&source->xmms[0]);
|
__m128i first = _mm_stream_load_si128(&source->xmms[0]);
|
||||||
__m128i second = _mm_stream_load_si128(&source->xmms[1]);
|
__m128i second = _mm_stream_load_si128(&source->xmms[1]);
|
||||||
__m128i third = _mm_stream_load_si128(&source->xmms[2]);
|
__m128i third = _mm_stream_load_si128(&source->xmms[2]);
|
||||||
__m128i fourth = _mm_stream_load_si128(&source->xmms[3]);
|
__m128i fourth = _mm_stream_load_si128(&source->xmms[3]);
|
||||||
|
#else
|
||||||
|
__m128i first = _mm_stream_load_si128(const_cast<__m128i*>(&source->xmms[0]));
|
||||||
|
__m128i second = _mm_stream_load_si128(const_cast<__m128i*>(&source->xmms[1]));
|
||||||
|
__m128i third = _mm_stream_load_si128(const_cast<__m128i*>(&source->xmms[2]));
|
||||||
|
__m128i fourth = _mm_stream_load_si128(const_cast<__m128i*>(&source->xmms[3]));
|
||||||
|
#endif
|
||||||
destination->xmms[0] = first;
|
destination->xmms[0] = first;
|
||||||
destination->xmms[1] = second;
|
destination->xmms[1] = second;
|
||||||
destination->xmms[2] = third;
|
destination->xmms[2] = third;
|
||||||
|
|
|
@ -171,7 +171,10 @@ class CommandProcessor {
|
||||||
virtual void WriteRegistersFromMem(uint32_t start_index, uint32_t* base,
|
virtual void WriteRegistersFromMem(uint32_t start_index, uint32_t* base,
|
||||||
uint32_t num_registers);
|
uint32_t num_registers);
|
||||||
|
|
||||||
|
//FIXME(RodoMa92): This fails on Clang with Linux
|
||||||
|
#ifdef XE_PLATFORM_WINDOWS
|
||||||
XE_FORCEINLINE
|
XE_FORCEINLINE
|
||||||
|
#endif
|
||||||
virtual void WriteRegisterRangeFromRing(xe::RingBuffer* ring, uint32_t base,
|
virtual void WriteRegisterRangeFromRing(xe::RingBuffer* ring, uint32_t base,
|
||||||
uint32_t num_registers);
|
uint32_t num_registers);
|
||||||
|
|
||||||
|
|
|
@ -153,8 +153,7 @@ struct DPCImpersonationScope {
|
||||||
struct KernelVersion {
|
struct KernelVersion {
|
||||||
union {
|
union {
|
||||||
xe::be<uint64_t> value;
|
xe::be<uint64_t> value;
|
||||||
|
union {
|
||||||
struct {
|
|
||||||
xe::be<uint16_t> major;
|
xe::be<uint16_t> major;
|
||||||
xe::be<uint16_t> minor;
|
xe::be<uint16_t> minor;
|
||||||
xe::be<uint16_t> build;
|
xe::be<uint16_t> build;
|
||||||
|
|
|
@ -4,6 +4,7 @@ project("zarchive")
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
language("C++")
|
language("C++")
|
||||||
links({
|
links({
|
||||||
|
"zstd",
|
||||||
})
|
})
|
||||||
defines({
|
defines({
|
||||||
"_LIB",
|
"_LIB",
|
||||||
|
|
|
@ -75,6 +75,8 @@ function project_zstd(dir, compression, decompression, deprecated, dictbuilder,
|
||||||
|
|
||||||
defines {
|
defines {
|
||||||
'XXH_NAMESPACE=ZSTD_',
|
'XXH_NAMESPACE=ZSTD_',
|
||||||
|
-- See here on why: https://gitlab.kitware.com/cmake/cmake/-/issues/25744
|
||||||
|
'ZSTD_DISABLE_ASM=1',
|
||||||
'ZSTD_LEGACY_SUPPORT=' .. legacy
|
'ZSTD_LEGACY_SUPPORT=' .. legacy
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue