OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Graphical issue on intel core ultra 5 (arch linux)

Open kmwagnera opened this issue 1 year ago • 14 comments

Issue

I can start gothic 2 but there are graphical issues. Is there any way available to solve this issue? Bildschirmfoto_20250101_150717

Logs

logfile If I activate -v flag, I have very much cli output... maybe it helps? log.txt

kmwagnera avatar Jan 01 '25 14:01 kmwagnera

Hi, @kmwagnera !

I've looked into the log, seem to be 2 issues there:

If primitiveFragmentShadingRateMeshShader is VK_TRUE then primitiveFragmentShadingRate also needs to be VK_TRUE.

Issue here is engine requests all mesh-shader features that gpu claim to support, without accounting that other dependency has to be meet. Since no reason to care about VRS - just need to set primitiveFragmentShadingRateMeshShader to false.

Second:

vkCmdUpdateBuffer(): dstBuffer (VkBuffer 0xe5277c0000000317[]) was created with VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR but requires VK_BUFFER_USAGE_TRANSFER_DST_BIT.

Need to add VK_BUFFER_USAGE_TRANSFER_DST_BIT usage for, what seem to be uniform buffer.

Try avatar Jan 01 '25 22:01 Try

Can't quite fix it immediatly, as my windows-laptop died, but can do code-reviews.

Try avatar Jan 01 '25 22:01 Try

The issue happens on my archlinux system... If I can test anything, please come back to me and I will give it a try :) Thank you!

kmwagnera avatar Jan 02 '25 13:01 kmwagnera

my windows-laptop died The issue happens on my archlinux system...

I mean I have nothing that can run vulkan at the moment :D

Try avatar Jan 02 '25 21:01 Try

Reproduced and fixed part about primitiveFragmentShadingRateMeshShader

Try avatar Jan 19 '25 14:01 Try

I also observe. Intel(R) Core(TM) Ultra 7 Arc Graphics Xe driver Linux 6.12.15 Build from 913dc793944ba2f58cd171960e0c7be6f60e8313 (Feb 22 15:12:50 2025 +0100)

https://github.com/user-attachments/assets/fc063953-f584-40d8-9bcb-7c8431370ec4

AlexJakeGreen avatar Feb 23 '25 00:02 AlexJakeGreen

Very interesting!

Those "rings", suggest to me that issue occurring only at the edge of light source. Presumably intel has some issue, when working with non-full quad.

@AlexJakeGreen If you take hero outside of Xardas'es tower, will game rendering normalize ?

Try avatar Feb 23 '25 19:02 Try

@Try Yes, the rainbow lines disappear when I take the hero outside, but I notice it in caves, other buildings too, I guess any enclosed areas have this effect.

Outside, however, I see something else: it looks like a shadow (it is not a shadow but this name is the only thing I can link it with) quickly jumping from one tree to another.

Some rainbow lines don't hold a single color either — they change colors over time. I believe we’re dealing with two separate things here: one causes the rainbow lines, while the other is responsible for both the flickering shadow on the trees and the changing colors of the rainbows.

It's much clearer to watch the video rather than reading a lot of explanation:

https://github.com/user-attachments/assets/47ac9905-31d7-4058-9ed1-89ad4acd6a11

AlexJakeGreen avatar Feb 24 '25 18:02 AlexJakeGreen

If you have development environment, you may check: OpenGothic/shader/lighting/light.frag.

Shader has multiple early-outs in the main function:

  if(factor>1.0)
    discard;
  if(light<=0.0)
    discard;
  if(isShadow(cenPosition.xyz, ldir, cenPosition.w))
    discard;

I'm assuming that Intel has some problems when only part of quad is disarded

Try avatar Feb 24 '25 21:02 Try

If I comment the third discard, then circles go away

-  if(isShadow(cenPosition.xyz, ldir, cenPosition.w))
-    discard;
+  //if(isShadow(cenPosition.xyz, ldir, cenPosition.w))
+  //  discard;

But trees still blink

https://github.com/user-attachments/assets/5b289575-520c-47a1-97b6-abf54464e13e

AlexJakeGreen avatar Feb 24 '25 21:02 AlexJakeGreen

@AlexJakeGreen are you playing with rayTracing? On RT-capable gpu it should be enable by default; will issue go away, if you run the game with -rt 0?

Try avatar Feb 24 '25 22:02 Try

I confirm, that with -rt 0 circles are absent without -rt 0 circles are present

trees and shrubs blink in both cases

AlexJakeGreen avatar Feb 24 '25 23:02 AlexJakeGreen

Hi, I found a workaround that helps avoid the flickering issue (it looks like a shadow jumping around objects in a circular pattern). I can get rid of it by launching the game with the -ms 0 parameter.

So, in order to play on intel ultra igpu, both -rt 0 and -ms 0 must be added -- and then I do not see issues.

@Try According to the main README,

    Ray tracing: setting affects only capable hardware, off by default for igpu's, add -rt 1 to enable

I guess, igpu auto-detection needs some improvement, so raytracing and meshlets are disabled automatically for this Intel Arc video card On my laptop the game engine detects it as GPU = Intel(R) Arc(tm) Graphics (MTL)

VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Arc Graphics] (rev 08)
	Subsystem: Lenovo Device 50e9
	Kernel driver in use: i915
	Kernel modules: xe

AlexJakeGreen avatar Oct 11 '25 22:10 AlexJakeGreen

Hi,

I guess, igpu auto-detection needs some improvement,

There is no detection of a sort - engine takes this information directly from device property VkPhysicalDeviceProperties::deviceType. This is consistent with Intel-Arc marketing as dGPU.

And it's generally same thing about mesh-shader / ray-query. If GPU claim that it has support, and can't deliver - that's on Intel.

Try avatar Oct 12 '25 13:10 Try