osy / Polaris22Fixup

Metal driver patches for Vega M
MIT License
47 stars 7 forks source link

Incompatible with Lilu user patches #3

Closed osy closed 4 years ago

osy commented 5 years ago

Because we hook cs_validate_range as well as Lilu (when user patches are used), this would cause issues including the order of the hooks and when one plugin decides to remove the hooks.

An ideal solution would be to detect if Lilu is available, make sure to always load after Lilu, and then patch using Lilu when detected.

osy commented 5 years ago

Lilu has been updated to support multiple hooks on a function. We should be compatible with Lilu again if we make use of it.

https://github.com/acidanthera/bugtracker/issues/390

osy commented 5 years ago

Reopening to support new Lilu api which would remove dependency on load order.

osy commented 5 years ago

Since Lilu was updated to support multiple patches and since we are moving to OC, VirtualSMC, and already depend on AppleALC, the arguments to not depend on Lilu no longer has much weight. The next release will simplify the codebase and re-introduce Lilu as a dependency.

vit9696 commented 4 years ago

@osy86 perhaps it is reasonable to merge this kext into WhateverGreen? It is not the first time for us to have userspace patches for GPU support there as we already have Shiki and CDF code there.

osy commented 4 years ago

The patch doesn’t apply to anything other than VegaM so I don’t want to pollute WG codebase with the hacky way that I’m patching user code. Maybe it would make more sense if the patch applies for any other cards.

vit9696 commented 4 years ago

Right, this makes sense to me.