You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I noticed a performance degradations when calling some heavy non-side-effected GLSL function a few times, without using its result. Simplifying the code and checking that issue still exists, I ended up with this code:
As I can see, read_buf() is a pure function, but calling it generates additional code in main().
This issue occures when I set --target-env to vulkan1.2 or vulkan1.3 , but clears out at vulkan1.0, vulkan1.1, or without specifying target env at all.
Hello, I noticed a performance degradations when calling some heavy non-side-effected GLSL function a few times, without using its result. Simplifying the code and checking that issue still exists, I ended up with this code:
Which compiles (
glslc shader.frag -O --target-env=vulkan1.2
) into:As I can see,
read_buf()
is a pure function, but calling it generates additional code inmain()
.This issue occures when I set
--target-env
tovulkan1.2
orvulkan1.3
, but clears out atvulkan1.0
,vulkan1.1
, or without specifying target env at all.Version:
glslc from VulkanSDK 1.3.268.0
Am I missing something about these Vulkan versions, or is this an optimizer bug?
The text was updated successfully, but these errors were encountered: