mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
macos: fix build for arm64
Adds arm64 branches to some x86 specific code and modifies some casting logic to make Clang happy
This commit is contained in:
parent
219ddf3e11
commit
e761b3235c
5 changed files with 20 additions and 5 deletions
|
|
@ -48,6 +48,12 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
// Suppress old-style casts in this file on Clang ARM64
|
||||
#if defined(__clang__) && defined(ARCH_ARM64)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||
#endif
|
||||
|
||||
/* Tunable configurations */
|
||||
|
||||
/* Enable precise implementation of math operations
|
||||
|
|
@ -8774,3 +8780,7 @@ FORCE_INLINE void _sse2neon_mm_set_denormals_zero_mode(unsigned int flag)
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && defined(ARCH_ARM64)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1514,7 +1514,7 @@ bool VKGSRender::release_GCM_label(u32 address, u32 args)
|
|||
{
|
||||
while (m_host_data_ptr->last_label_release_event > m_host_data_ptr->commands_complete_event)
|
||||
{
|
||||
_mm_pause();
|
||||
utils::pause();
|
||||
|
||||
if (thread_ctrl::state() == thread_state::aborting)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ namespace utils
|
|||
struct scoped_av
|
||||
{
|
||||
AVFormatContext* format = nullptr;
|
||||
AVCodec* codec = nullptr;
|
||||
const AVCodec* codec = nullptr;
|
||||
AVCodecContext* context = nullptr;
|
||||
AVFrame* frame = nullptr;
|
||||
SwrContext* swr = nullptr;
|
||||
|
|
@ -180,8 +180,8 @@ namespace utils
|
|||
swr_free(&swr);
|
||||
if (context)
|
||||
avcodec_close(context);
|
||||
if (codec)
|
||||
av_free(codec);
|
||||
// AVCodec is managed by libavformat, no need to free it
|
||||
// see: https://stackoverflow.com/a/18047320
|
||||
if (format)
|
||||
avformat_free_context(format);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue