Left 4 Dead 2 Vulkan

2 views
Skip to first unread message

Beatrix Gerke

unread,
Aug 5, 2024, 3:05:32 AM8/5/24
to khorimucsi
Muchlike we saw with DXVK being added to Portal 2, this new rendering mode is optional. It can be enabled by adding "-vulkan" as a command line option. To do so: right click the game and go to Properties, ensure you're on the General tab on the left, then enter "-vulkan" (without quotes) in the Launch Options box.

Plus a bunch of bug fixes, some of which are Linux specific including a startup crash, possible text corruption fixes for UTF-8 conversion, addon info being truncated "much earlier on Linux", the Windowed (No Border) option should now work on Linux plus a bunch of new scripting hooks for modders.


What's the point in adding Vulkan like this? Well, the original ports from Valve used a layer called ToGL which translated the original Direct3D rendering to OpenGL. With the Vulkan launch option this would replace it. It should give better overall performance, and hopefully smoother framerates. Perhaps even helping with lower end hardware, like an upcoming SteamPal handheld which would make sense for all the controller fixes.


As Vulkan spec has been released few days ago, I think it might be interesting to look at how it compares to what Apple gives us with Metal. First of all, a disclaimer: this is mostly from an academic standpoint, I am interested to comparing the APIs, the provided fetures and their relative merits. I hope that some other people here who are curious about GPUs, APIs and API design could offer their thouhgts on the matter.


Some folks (me included) were quite dissapointed to learn that Apple is jumping the Vulkan bandwagon. After reading the spec, I think I understand why. And I am starting to believe this might be a very reasonable move by Apple. Here are some thoughts.


Here's the problem--VR is one of the driving forces in the computer graphics industry at the moment. All of the big 3D apps are looking at Vulkan and what it can deliver, and wondering if they have the resources to continue supporting Apple and its distinct lack of forward progress in the graphics area, or not.


Metal vs Vulkan is yet another reason to abandon Mac hardware for serious graphics, as if the lack of adequate GPU solutions wasn't bad enough. Now we're talking about an additional switch in the codebase to support graphics specific to the one platform no one's going to be using for VR.


This is a massive, unparalleled opportunity for some companies to get a leg up on the competition, but only by embracing Vulkan. Unless Apple makes it real **** easy to support Vulkan, we're going to see OSX left behind.


Nevertheless, you raise a very valid concern. Both Apple and Apple users would surely benefit if they offered a standard, mature API that developers can rely on across platforms. I think there is already a company developing a Vulkan-to-Metal wrapper, and I still hope that Apple will implement the API in the close future. There is no reason why Metal and Vulkan shouldn't be able to coexist.


On the theoretically side, the way I see it , Vulkan is far more abstract and far lower leven than openGL, which is awesome for pc developer but not big deal for apple developer. Apple is better with custom software that works well and has been designed for its hardware and this is what Metal really is.


But to be frank with its really a moot point, because nowdays the vast majority of developers use game and graphic engines. Less and less people work directly with opengl and metal and I suspect even less with work directly with Vulkan. Its just too complex to do something like that.


I am using Unreal Engine , which currently supports Metal / OpenGL / DirectX / Cuda /OpenCL/ PhysX and much more, most likely it will support Vulkan as well if it does not already. An Unreal developer even though the game engine is state of the art rarely deals with low end backends unless we are talking about a big studio that wants to push envelope. For small team developers they dont even use C++ , they heavily rely on blueprints which is a form of visual scripting.


The Brenwill Workshop (who I work for) is indeed developing an implementation of Vulkan on Metal (using a similar approach to our existing OpenGL ES implementation on Metal). The Vulkan implementation runs on both iOS and OS X, and will be released soon.


I do a fair amount of OpenGL development for custom applications and starting to shift to Metal begrudgingly. So the demand is still there for graphical programming. I think the problem with Apple is that they've let OpenGL rot on their OS. It's in a really sorry state. Metal isn't mature enough or capable yet to fully replace it. The drivers are not great either.


This means all the companies not game related that have custom graphics code must port that over to Metal eventually. It's easier to port over OpenGL or Vulkan used on other platforms then it is to rewrite it all for a proprietary API. The last and most serious point is that regardless of all these different APIs it doesn't matter if the GPUs used are absolute crap.


You aren't going to be able to run VR or anything graphically intense on a Mac because none of them have capable GPUs. The new Mac Pro doesn't count either. Those sorry *** GPUs are terribly designed and severely limited by tdp. There was an article about the CGI group that created the Deadpool movie burned out the GPUs in 10 new Mac Pros because they just couldnt handle it. Dual D700s arent even capable of VR on the lowest setting. Oculus Rift wrote a piece on how VR will not come to Macs until Apple actually releases a good computer. How laughable is that. Apple has always lagged in the GPU department as well as their driver support. Look at Blizzard they aren't bringing their new game Overwatch to the Mac because the graphics technology and drivers has lagged so much it would cause their game to be below their standard of quality.


Unfortunately, without command buffer re-use, we still see high CPU usage encoding rendering and compute commands every application frame. This can be offset a bit by enqueing command buffers and then encoding them on separate threads, but the room for real savings in enormous with command buffer re-use. My hope is that this is added as a core capability to the Metal framework in the near term. Everything else is of secondary importance.


Going forward and pushing Metal this hard is an absolutely idiotic decision on Apple's part. I used to be such a fanboy and buy Apple hardware to do all of my development work, even though they had ****** OpenGL support, I'd still be able to do my App/Web dev work on their platform. Nowadays, I do a lot more Vulkan and modern OpenGL, both of which aren't supported. I've used MoltenVK but don't care to anymore, and OpenGL 4.1 lacks some features I really want. So in turn I own a "Macbook PRO", but some assholes at Apple have decided they don't want to allow me to be a PRO in certain technologies because they want to push their APIs this hard. Well Apple, you'll never get another cent from me since I don't even feel like I own the overpriced hardware I purchased from you. Jobs had forward thinking and respect for developers, which is why I switched to Apple in the 2000s, nowadays I find myself being unable to use all sorts of tools on MacOS.


OpenGL is dead, and Vulkan is overly complex to use. MoltenVK is good enough, and with VK_EXT_shader_object support, it should be able to make Vulkan emulate Metal/DX11.Vulkan is moving back to shaders and dynamic state from the locked-down PSOs that it started with. Even AMD's consoles aren't that locked down in their graphics APIs. Metal and metal-cpp aren't that hard to grasp, and tie direclty in with the hardware used on the desktop and mobile side.


I upgraded my computer setup pretty thoroughly to be a dual-purpose racing and flying sim rig. Almost everything is new. I had some motherboard and possibly ram-related problems and managed to sort those out. The racing component is working well, but now I'm stuck with vulkan device loss errors in Xplane. The graphics card is a 4090 only a couple of months old.


For what it's worth, on the new setup I was able to run both Xplane 11 and 12, and get my old Ortho sceneries to work on both - briefly. Then suddenly I'm stuck with the Vulkan errors and I'm getting critical write failures on my Windows storage space pool where I keep my Orthos. I figured out that my storage space is somehow broken with critical drive errors, so I disabled that and will revisit it another time - maybe the SAS cables are faulty or something else with it is going on.


I also tried deleting the preferences folder and starting fresh that way. To check if my graphics card is not interacting with Vulkan well, I ran Red Dead Redemption 2 (heavy graphics using Vulkan) and it runs fine.


Bottom line, I can run Xplane 11 in Open GL fine. I can't get any flavor of Xplane (11 or 12) to run in Vulkan at all - though it did work at one point for a few minutes here and there while I was trying to sort out Ortho setup. Yet, I can run other Vulkan games fine. At this point I'm 100% at a loss about how to fix this and could really use some help.


@Pretext a few ideas as I also have a 4090 and do not get these errors. In no particular order:

1. Updated Nvidia drivers?

2. There should be no device read or write errors - that's not an x-plane error, that's a Windows I/O error. Check chipset driver if you updated windows in-place to make sure it's not using defaults. That can happen if you update the hardware but re-use an old install of Windows on a boot drive.

3. Disable any overclocking on the video card (run vanilla profiles) to make sure the vulkan errors are not related to OC (even automatic).

4. Make sure your system passes benchmarks in OCCT. This will make sure your hardware passes the test. It has both a CPU and GPU test and will run the stress tests to make sure all passes in flying colors.


More obscure: BIOS setting? Change ports on the drive and see if the issues go away and change the cable. Move the files to another drive?



The symptoms you describe could be many things, it sound to me like some sort of intermittent hardware problem that tells me your system isn't stable: an IO error is pretty serious and would manifest itself in x-plane like what you're experiencing.

Because it could be a laundry list of causes, this is a process of elimination as this is a new build.



In my experience one game may work great, the other will have problems because it touches on different parts of the system. For example, x-plane is very I/O extensive and will definitely stress your I/O.

3a8082e126
Reply all
Reply to author
Forward
0 new messages