KhronosGroup / MoltenVK

MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on macOS, iOS and tvOS.
Apache License 2.0
4.82k stars 428 forks source link

reporting moltenvk/vulkan errors in games #1403

Open nsklaus opened 3 years ago

nsklaus commented 3 years ago

would it be acceptable to have a place somewhere on moltenvk's github account to report errors found in games ? it could be as a general issue, or on moltenvk discussion forum as a thread about moltenvk support for dxvk games. the point would be to highlight real world usages of moltenvk current implementation. because testing units can only go so far to show what current implementation actualy produce in the end. games are good for showcasing current status of moltenvk.

if that is acceptable this issue could be used to list games that present problems, to keep track of these, as a reminder. here's a few games that almost run fine, but require some additional care to be perfectly supported:

(as tested on macos big sur 11.4, macbook pro M1, with both crossover and wineskin)

if needed i could provide screenshots and additional infos for each titles.

billhollings commented 3 years ago

@nsklaus

This is a good idea in terms of cataloging, and I wish we had the resources to tackle such a list in development. But in the general case, the MoltenVK development team doesn't have the bandwidth or resources to evaluate issues with individual games, based on game-user feedback.

For the most part, we rely on either the developers of the game, or developers who are attempting a platform port of a game, to identify specific issues or deficiencies with MoltenVK's implementation of Vulkan, that can be addressed internally (be they bugs with current behavior, or additional feature support that needs to be added).

Ideally, those porting developers are welcome to submit a Pull Request code patch to MoltenVK. If they do not have the knowledge or resources to do that, then submitting a detailed issue that identifies the behavioral deficiency at a level that can be addressed by the MoltenVK development team. For example, not just "incorrect lighting in scene X of game Y", but something like "depth textures in a format Z not being read correctly by shader W".

So...as issues come up in games, we rely on interested developers to do some triage and report deficiencies at a Vulkan technical level to the team here.

nsklaus commented 3 years ago

i thought so. thanks for the reply anyway, sorry for the lack of technical depth in my issue. i thought all these games shared a common problem (missing render / invisible rendering of some 3d models). where i stand, the best i can see is the log output from wine and its derivates (wineskin/crossover/..) i'm not sure such output would be best to use for reports, so i'd like to ask a question about moltenvk lib instead: would it be possible for moltenvk lib to enable some sort of debug flag to output errors to a log file ? that way, i could spot a given error being repeatedly produced on variety of different games. given that i could see the same error over and over again on differents games then maybe it would worthwhile reporting it, i mean for you guys it could be a better hint at a particular, specific problem in moltenvk itself.

billhollings commented 3 years ago

would it be possible for moltenvk lib to enable some sort of debug flag to output errors to a log file

MoltenVK does support logging. If you are using the binary from the Vulkan SDK, I believe logging is disabled by default in that build. You can enable it to various levels with the MVK_CONFIG_LOG_LEVEL environment variable. You can learn more about this from the documentation in the vk_mvk_moltenvk.h header file.

nsklaus commented 3 years ago

the header file you linked to seems to indicate that if nothing is set or specified, the default behavior is to log errors and informational messages anyway. where would that log file be stored at on my local filesystem ? unless it is meant as in loged on std output, like terminal output, not actualy a file ? if so how could i direct moltenvk log to a file instead ? using plain redirection like: wine my_program.exe > my_log_file.txt would probably have wine output too mixed in..

by the way, i'm using moltenvk lib, from this repo, compiled as per instructions, the result is a libMoltenVK.dylib file that i put in : ~/Applications/Wineskin/MyCoolWrapper.app/Contents/Frameworks/libMoltenVK.dylib
or in /Applications/CrossOver.app/Contents/SharedSupport/CrossOver/lib64/libMoltenVK.dylib

billhollings commented 3 years ago

the header file you linked to seems to indicate that if nothing is set or specified, the default behavior is to log errors and informational messages anyway

This is true for MoltenVK in source form. However, MVK_CONFIG_LOG_LEVEL can be used as both an environment variable and a build variable (as can all of the config settings listed there). So, whoever builds a MoltenVK binary can set its value as a build variable and can therefore define that default value differently than documented in the source code. This value can then be overridden again as an environment variable with the same name.

I believe the Vulkan SDK build does override this setting, as may the source build of the lib binary you are using (I don't know that...but it's possible and may be likely).

it is meant as in loged on std output, like terminal output

The logging is to stderr, and to Vulkan's VK_EXT_debug_utils extension.

bryankeller commented 2 years ago

+1 to rocket league having missing nameplates and some other 2D things, like leaves on trees. I suspect these are related. This breaks the game unfortunately, as it makes it near impossible to see where an opponent or teammate is on the field if they're far away (critical to determining your own positioning).