[4.6pre-229] Player color not changing using Vulkan

Moderator: GZDoom Developers

[4.6pre-229] Player color not changing using Vulkan

Postby grahf78 » Sat May 15, 2021 10:37 pm

I don't know since when this bug has been present, but I just noticed it using the latest devbuild (aaf8323eb294b1a5ab258b729df714488be11c2a).

Using Vulkan, if you go to Player Setup and change colors, they don't get reflected in the player preview box, instead it uses the last color that was applied to the sprite (caching related?).

Steps to reproduce:

- Use the Vulkan backend.
- Go to Player Setup, and change the player color.
grahf78
 
Joined: 21 Jun 2020
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia (Modern GZDoom)

Re: [4.6pre-229] Player color not changing using Vulkan

Postby Rachael » Tue May 18, 2021 5:42 am

I will investigate this further later if I have time, but I had to stop temporarily. So far in my investigation though, I've found that VkRenderState::ApplyMaterial() is not called anywhere near the same way that FGLRenderState::ApplyMaterial(FMaterial *mat, int clampmode, int translation, int overrideshader) is - which has actual parameters in its function prototype. Which is relevant because the GL version has this line:
Code: Select allExpand view
   lastTranslation = translation;


Hopefully I can do more with this later. Not even sure if I am hitting the right function here - but the Vulkan version of that function is quite a bit more simplified.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.6pre-229] Player color not changing using Vulkan

Postby Rachael » Tue May 18, 2021 7:14 am

Well turns out I can't fix this one on my own, I don't know enough about what is going on here. I attempted this to fix it:
Spoiler:

but that did absolutely nothing to help with the situation.
User avatar
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [4.6pre-229] Player color not changing using Vulkan

Postby Lippeth » Sat May 22, 2021 2:54 pm

I noticed that this seemed to be fixed in gzdoom-x64-g4.6pre-259-gfef835bca, but is misbehaving again in gzdoom-x64-g4.6pre-264-gbe4e19b07.

EDIT: I take it back, I was using OpenGL when it worked, and didn't notice the correlation.
User avatar
Lippeth
Metalvangelist
 
Joined: 24 Apr 2013
Location: Lost Angeles
Discord: Lippeth#2552


Return to Vulkan Renderer Bugs

Who is online

Users browsing this forum: No registered users and 0 guests