-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compile *.comp with glslang optimizations enabled (-Os) #1117
Conversation
FWIU, glslang optimizations are pretty worthless, the majority of the good stuff comes from the driver. |
From some testing with running gamescope on my integrate intel igpu (
where I ran the same exact command for both: Maybe some drivers implement more shader optimizations than others? also more specs for my laptop I tested this on:
|
3.1ms seems extraordinarily slow for the composite shader, but what you are reporting seems kinda margin of error given it looks like n = 1 in your testing. If you disable the 1D + 3D LUT stuff going on, does it make it faster on Intel? (Just comment it out) |
Ok: Here's the branch I'm running for testing running gamescope w/ 1D + 3D LUT commented out (in case I messed something up) : https://github.com/sharkautarch/gamescope/tree/test_w_no_lut EDIT: I did another test where I removed a conditional from apply_layer_color_mgmt(): |
Where's the GPU submit on your graph? |
If by GPU submit, you mean the i915_* and intel_* perf stats, they're not being recorded, because those stats are only available for recording if your kernel is built w/ CONFIG_EXPERT=y and CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y btw, here's another gpuvis trace I did w/ just perform_3dlut commented out + a slight modification to perform_1dlut(): |
closing this, since it seems that |
It seems that glslang doesn't actually do any optimizations by default.
I compared the
cs_composite_*.h
file sizes between gamescope built from ValveSoftware/gamescope/master, and gamescope built with a modification tosrc/meson.build
where I added-Od
toglslang
's argsAnd the file sizes with or without
-Od
turned out to be the same...Oddly enough,
glslang
only lets you specify-Os
or-Od
, not sure why...I exclude one shader from optimization:
cs_composite_rcas.comp
because I had noticed that if optimization was enabled for
cs_composite_rcas.comp
, it would take longer for gamescope to startup when running w/ fsr (also, it seems like that specific shader's.h
output file would balloon in size w/-Os
)