25 May
2023
25 May
'23
11:48 a.m.
I encountered a case where a game provides an empty fragment shader, one that disassembles to just: ``` ps_5_0 dcl_globalFlags refactoringAllowed ``` which gets translated to: ``` OpCapability Shader OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" OpExecutionMode %main OriginUpperLeft OpName %main "main" %void = OpTypeVoid %3 = OpTypeFunction %void %main = OpFunction %void None %3 %4 = OpLabel OpFunctionEnd ``` This patch is to detect that the OpLabel has not been terminated by a corresponding top-level return, and add it. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/212