Xenia: Xenia for Mac?

Created on 3 Jul 2016  Β·  57Comments  Β·  Source: xenia-project/xenia

Is there a way to Compile for Mac?

cross-platform

Most helpful comment

So just contribute to porting Xenia upon OSX. Less wording, more coding.

All 57 comments

macOS doesn't meet quite a lot of the requirements for xenia.

Until it gets an updated openGL driver to support 4.5 or vulkan support (unlikely right now) xenia cannot run on mac.

Your best bet would be to dual boot and run xenia on windows.

it can be made to run if they had a dev who worked with https://moltengl.com/moltenvk/ which brings vulkan to os x through metal low level api

even with that, there is still a huge amount of porting work needed. For example xenia currently relies on quite a few windows API calls

but at least its a starting point and opengl is no longer a factor

Sent from my iPhone

On Jul 29, 2016, at 4:32 AM, Satori [email protected] wrote:

even with that, there is still a huge amount of porting work needed. For example xenia currently relies on quite a few windows API calls

β€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

moltenvk isn't even free..

^ that too

IT'S NOT NO but the dev who makes it might give it to you for free since this is a big project but the metal api is free

seems unlikely

already taking to him about it for my project of learning and doing videos to get his work out

xbox means DirectX box. Macs do not have DirectX so I doubt there will ever be a version for Mac.

but mac does have vulkan now and metal which works like direct x which means it can be done

Sent from my iPhone

On Oct 15, 2016, at 11:24 AM, Mohammed Arabiat [email protected] wrote:

@MightyElemental, actually the emulator uses OpenGL. Which Macs also don't support the required version of.

β€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@Gamedev1909 Are you sure about that?

@MightyElemental but they can write OpenGL/Vulkan driver so it could work on Mac, it is possible, but not worth at actual state of xenia.

ya that's not for everyone that's really to much work for some

Sent from my iPhone

On Oct 15, 2016, at 3:25 PM, Margen67 [email protected] wrote:

..or just switch to a better OS

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

yes satori well i do own a hackintosh and switching to a so called better os is something not everyone wants when we have options like metal and vulkan for os x free to use so there is options.

Sent from my iPhone

There is nothing stopping a OSX build from existing, other than a contributor who would make the necessary effort to get it building on OSX. The main contributors don't develop on OSX.

@gibbed the problem with OS X (at least for now) is awful graphics support. No vulkan and the max OpenGL version is OpenGL 4.2.

If mac gets proper graphics drivers I'd be more than happy to attempt to port the rest

Not even 4.2, it's 4.1 on the latest Mac OS. Being a graphics developer on Mac OS is a hard life.

Metal definitely has the features to host Xenia, but it'd be better to get the graphics subsystem closer to feature-complete/working before trying to port to yet another hardware backend.

it runs vulkan through the metal api as for opengl that was never really a goood option for emulators like the ps3 or xenia it caused way to many issues even vulkan is buggy beyond words but metal would be the perfect choice as its more like direct x 12 and runs the same on all hardware no nvidiot bs

Sent from my iPhone

On Oct 15, 2016, at 7:51 PM, Satori [email protected] wrote:

@gibbed the problem with OS X (at least for now) is awful graphics support. No vulkan and the max OpenGL version is OpenGL 4.2.

If mac gets proper graphics drivers I'd be more than happy to attempt to port the rest

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

You have no idea what you're talking about. Just stop.

i work with vulkan in os x its super easy even made a few apps my attempt before my motherboard died was switching the ui to render on vulkan and not metal so i do know very much what i am talking about i dont view things from a limited view like most

Sent from my iPhone

On Oct 15, 2016, at 8:30 PM, Margen67 [email protected] wrote:

You have no idea what you're talking about. Just stop.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

So just contribute to porting Xenia upon OSX. Less wording, more coding.

coding takes time to learn and a computer i dont have right now it was my plan

Sent from my iPhone

On Oct 15, 2016, at 9:56 PM, hlide [email protected] wrote:

So just contribute to porting Xenia upon OSX. Less wording, more coding.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

C'mon, no one has worked on the emu in a month and you want someone to rewrite craploads of code so it runs on a mac?

Does Xenia definitely require features from OpenGL 4.5, or is that the minimum requirement because it's more convenient?

Maybe it would be possible to support 4.1 or 4.2 with some smaller scale reworking.

@petmac OpenGL is deprecated.

it seems MoltenVK went open source https://github.com/KhronosGroup/MoltenVK
I am not a graphics dev so i have no idea how useful or feature-complete it is for xenia but i guess it's a glimmer of hope for those with a mac

  1. Fuck Apple and their refusal to use any industry standards and their shitty closed ecosystem
  2. OSX does not natively have Vulkan (MoltenVK is not native and it's not free) or anything past OpenGL 4.1 (you can find Drivers for Vulkan and OpenGL 4.5 on fucking Windows XP)
  3. Get a decent OS

Correction: MoltenVK went Opensource

Or lets not be stuck up and yes moltenvk is not free
And yes metal does have everything opengl 4.5 has and more which is used to run vulkan which macos can run just fine and its macos now hasnt been os x for a long time

Sent from my iPhone

On Feb 26, 2018, at 1:45 PM, 0x7FFFFFFF notifications@github.com wrote:

Fuck Apple and their shitty closed ecosystem
OSX does not natively have Vulkan (MoltenVK is not native and it's not free) or anything past OpenGL 4.1 (you can find Drivers for Vulkan and OpenGL 4.5 on fucking Windows XP)
Get a decent OS
β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@Gamedev1909 what's the difference between a peice of shit and a peice of shit 2?
In this case not much since Apple barely do anything new with newer Mac OS releases.
Its just a name and a number, they're both shit.

Yet 10.13.4 just changed and overhauled the entire driver set for amd added fan control and overclocking heck a guy built a app for it again judge all you want but dont talk shit if you dont have macos

Sent from my iPhone

On Feb 26, 2018, at 4:31 PM, 0x7FFFFFFF notifications@github.com wrote:

@Gamedev1909 what's the difference between a peice of shit and a price of shit 2?
In this case not much since Apple barely do anything new with newer Mac OS releases.
Its just a name and a number.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

They added fan control and overclocking...

When Windows and Linux had this for years.

Also I do have macOS and OSX and it was a painful experience for me.

Drivers barely worked, UI was over simplified to the point where navigating system files was a pain and general usability is horrible for a power user like me.

This isn't even bringing up how much of a pain in the ass it is to setup MacOS on non-Apple hardware or even attempting to fix issues with OSX

No offense. But I just think this would be a waste of resources for the
Xenia Team. Its been years and Xenia is still in its early stages and the
team should put as their priority making it emulate Xbox 360 with the most
precision possible so we can play more games on it.
After all most people who use Mac are people who work in graphics design
industry or Web Development. Most hardware and software programmers are
using Linux or Windows as their main OS. Maybe when Xenia gets more stable
the team can look forward in making it avalaible in the platform of good
olΒ΄ narcissistic Steve Jobs. Right now it would be just a waste of
resources and time when the emulator is still in early stages. There are
more important things to fix right now.

On Mon, Feb 26, 2018 at 5:34 PM, Gamedev1909 notifications@github.com
wrote:

Yet 10.13.4 just changed and overhauled the entire driver set for amd
added fan control and overclocking heck a guy built a app for it again
judge all you want but dont talk shit if you dont have macos

Sent from my iPhone

On Feb 26, 2018, at 4:31 PM, 0x7FFFFFFF notifications@github.com
wrote:

@Gamedev1909 what's the difference between a peice of shit and a price
of shit 2?
In this case not much since Apple barely do anything new with newer Mac
OS releases.
Its just a name and a number.

β€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub, or mute the thread.

β€”

Linux barley has any overclocking ability most of it is trouble to get working and windows was a main os for billions its stupid to even compare os to be honest or to hate on any os for any reason just get over your selfs what happens with xenia is up to the devs who care enough to add this shit and if you cant add it just avoid the topic instead of whining about a os you dont understand or used

Sent from my iPhone

On Feb 26, 2018, at 4:43 PM, Rafael notifications@github.com wrote:

No offense. But I just think this would be a waste of resources for the
Xenia Team. Its been years and Xenia is still in its early stages and the
team should put as their priority making it emulate Xbox 360 with the most
precision possible so we can play more games on it.
After all most people who use Mac are people who work in graphics design
industry or Web Development. Most hardware and software programmers are
using Linux or Windows as their main OS. Maybe when Xenia gets more stable
the team can look forward in making it avalaible in the platform of good
olΒ΄ narcissistic Steve Jobs. Right now it would be just a waste of
resources and time when the emulator is still in early stages. There are
more important things to fix right now.

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
Livre
de vΓ­rus. www.avast.com
https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail.
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Feb 26, 2018 at 5:34 PM, Gamedev1909 notifications@github.com
wrote:

Yet 10.13.4 just changed and overhauled the entire driver set for amd
added fan control and overclocking heck a guy built a app for it again
judge all you want but dont talk shit if you dont have macos

Sent from my iPhone

On Feb 26, 2018, at 4:31 PM, 0x7FFFFFFF notifications@github.com
wrote:

@Gamedev1909 what's the difference between a peice of shit and a price
of shit 2?
In this case not much since Apple barely do anything new with newer Mac
OS releases.
Its just a name and a number.

β€”
You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub, or mute the thread.

β€”
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/benvanik/xenia/issues/596#issuecomment-368640623, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACDZlh0o_02OXTLAPdtKDmuJryvmSQ0gks5tYxUzgaJpZM4JD8TL
.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

this thread got really off topic really quickly...
I was only pointing out moltenvk is now available for future reference.

And thank you for that i like when emulators work on all os so im not stuck to just windows or linux. I do have all 3 on my pc being limited is stupid

Sent from my iPhone

On Feb 26, 2018, at 5:59 PM, Satori notifications@github.com wrote:

this thread got really off topic really quickly...
I was only pointing out moltenvk is now available for future reference.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Since Hackintosh can achieve very high performance hardware spec, when xenia is feature complete, I strongly suggest porting it to MacOS also expecting that I can offer some practical work.

Metal has no way to swizzle so its semi pointless unless in 7 days metal 3 has swizzle ability

Sent from my iPhone

On May 29, 2018, at 3:09 AM, Sekkit notifications@github.com wrote:

Since Hackintosh can achieve very high performance hardware spec, when xenia is feature complete, I strongly suggest porting it to MacOS also expecting that I can offer some practical work.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

True

Sent from my iPhone

On Jun 4, 2018, at 10:58 AM, Sekkit notifications@github.com wrote:

Ok, 3 hours later it can be clear.

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Metal has no way to swizzle so its semi pointless unless in 7 days metal 3 has swizzle ability

This is unfortunately true. RPCS3 was able to work around this in https://github.com/RPCS3/rpcs3/pull/5024

It also doesn't support geometry shaders, which are needed for clear rectangles, and some significant memory usage optimization features used in the new Xenia renderer β€” sparse resources and heap aliasing.

@Triang3l oh, interesting! I'd like to know more.
How are the geometry shaders used for clears? Are sparse resources and heap aliasing non-optional in your Vulkan renderer?

@kvark Xenos clear render targets by drawing a large rectangle, however, only 3 vertices are submitted, so we need to reconstruct another one in a geometry shader from the 3 vertices we have, after the vertex shader is done.

Regarding the memory-saving features: I was talking about my Direct3D 12 renderer rewrite, but this applies to Vulkan as well. They are optional, but definitely help reduce video memory usage.

I'm using a 512 MB buffer to emulate physical memory layout for texture untiling/tiling and vertex fetch because it increases performance (no need to maintain vertex caches) and accuracy (allows for weird render to texture cases, including horizontal predicated tiling). However, games don't necessarily use all those 512 megabytes for textures and vertex buffers, so it's better to allocate that buffer in smaller parts.

Resource aliasing is great for render targets since they're transient on the Xbox 360 due to EDRAM. Without aliasing of heap contents, memory would have to be allocated for every used size and format combination, but arbitrary allocation in heaps lets us reuse the memory backing render targets and simply create views of it with different sizes and formats.

What features does Xenia depend on? anything heavily used?
if someone goes through the hassle of reducing ogl support and falling back features it would run but at less performance. blame apple really
also moltenvk isn't as ideal since the limitations imposed by apple still makes some things impossible.
yet there's no point, especially since Mojave is removing OpenGL.

OpenGL is being deprecated, not removed... Yet.

@petmac OpenGL has been completely removed from Xenia for a while

@Triang3l

Xenos clear render targets by drawing a large rectangle, however, only 3 vertices are submitted, so we need to reconstruct another one in a geometry shader from the 3 vertices we have, after the vertex shader is done.

Is this a full-screen clear? If yes, why can't you just make it a large triangle and let it be clipped by render target boundaries?

Regarding the memory-saving features: I was talking about my Direct3D 12 renderer rewrite, but this applies to Vulkan as well. They are optional, but definitely help reduce video memory usage.

Ok, I do agree that transient resources as well as aliasing can help a ton. But given that their use is optional, it's not a blocker for running on MacOS. Hopefully, we'll figure out how to support those features at some point in the future.

@kvark It's not necessarily fullscreen, and it's even drawn with viewport disabled (the shader returning screen coordinates), 8192x8192 scissor, and we don't have render target height at all… We aren't even sure if it's used only for clearing or also for regular quads/copying.

@Triang3l is there a place this function is described in detail? I can clearly see why the geometry shader solution makes sense, but I'd like to re-evaluate it in greater detail.

@kvark There is none, but here's that shader: https://github.com/xenia-project/xenia/blob/master/src/xenia/gpu/vulkan/shaders/rect_list.geom

Since the 4th vertex simply doesn't exist, this can't be emulated with a custom index buffer. I don't even know if what the shader does is the correct way of reconstructing that vertex, but it seems to work.

Those clears are not some special packets, they are regular draw calls with the primitive type being set to rectangle lists. Regarding render target boundaries β€” the GPU doesn't have access to the height of the render target at all, it's not needed for it to draw, and it also supports drawing without viewport and clipping β€” we emulate this by setting the viewport to 2560x2560, which appears to be the maximum possible framebuffer size on the Xbox 360.

@Triang3l thank you for the info! I've filed https://github.com/gfx-rs/portability/issues/140 to track it on our side.
I wonder though, where does the vertex data come in this case? If it is in CPU-visible memory, could we add a vertex on CPU side, computing it's position accordingly? Alternatively, the shader could be written to see the vertex data as uniform buffer, and compute the coordinates based on the vertex ID. I understand that this could require more work on CPU side, and may not be feasible at all.

@kvark X360 has unified memory, but the vertices are transformed by a vertex shader, which can fetch and modify them any way it wants. Not sure how the vertex shader solution is going to work because every 4 vertices, you'd have to run the translated shader code 3 times, not 1, to calculate 3 SV_Position values to have enough info to reconstruct the vertex (basically doing what a geometry shader does). It's probably easier to do this using tessellation, though the vertex shader would need to become a compute shader probably because Metal appears to use vertex shaders as domain shaders.

But everything depends on what games actually do with those rectangles. If their usage is limited to simple fixed-function clears, we could assume vertices always have the same layout and are processed the same way (we already do that for resolving render targets to textures), so we could just add a new one on the CPU, but this won't work if games use them with custom vertex shaders.

X360 has unified memory, but the vertices are transformed by a vertex shader, which can fetch and modify them any way it wants.

Ok great. So unless the shader does anything funky with gl_VertexID we can just run it on 4 vertices (the last one generated by us on CPU), and it should be good.

Not sure how the vertex shader solution is going to work because every 4 vertices, you'd have to run the translated shader code 3 times, not 1, to calculate 3 SV_Position values

Yes, we'd have to compute all vertices in every invocation of a vertex shader. I don't think it's an issue, since we are talking about quads here. There is no expectation we are VS-bottlenecked :)

Xenos clear render targets by drawing a large rectangle, however, only 3 vertices are submitted, so we need to reconstruct another one in a geometry shader from the 3 vertices we have, after the vertex shader is done.

Have you seen https://www.saschawillems.de/?page_id=2122 @Triang3l ?

@termhn Yes, that's what I already use for AA resolves, format conversion in rendering to textures and front buffer presentation. However, I don't think we can simply make the triangle 4x bigger in the vertex shader because we don't know which vertex is located at the right angle (it's 0 in the "if" case, but 1 in the "else" case in that shader) and those quads are usually drawn without viewport clipping and with a huge scissor.

@Triang3l BTW, if you're still wondering about the rectangle lists primitive topology then AMD has a driver extension for it but unfortunately it's only available through D3D11. A similar extension is available on Nvidia either through NVAPI on D3D11/12 or NV_fill_rectangle on GL/VK.

mayfixsomedaybuttotallynotrightmeow :-3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arcadee1977 picture arcadee1977  Β·  3Comments

yugi1408 picture yugi1408  Β·  3Comments

thx4ever picture thx4ever  Β·  3Comments

ProtoByter picture ProtoByter  Β·  3Comments

kobyaustin1 picture kobyaustin1  Β·  4Comments