by Spike » Wed Oct 19, 2016 7:19 am
I think you need to use rendertargets, and NOT the $currentrender thing (grabbing a copy of the current framebuffer isn't going to be any faster with vulkan, and probably actually a bit slower due to much lazier (ie: none) optimisations for it).
also needs 'vk_loadglsl 1' set (when doing vid_restart) in order to enable the glsl-in-vulkan extension. be sure you're not using any debug layers at the time, because they'll probably crash... yeah, loading glsl isn't really a standard thing.
the spir-v that fte normally uses is directly embedded into the engine like the default glsl shaders are. I have some script to generate a c header file with the various blobs included for each shader language, using system-specific paths to the 3rd-party vulkan tools ('glslangvalidator'), and with an outdated version of the tools in order to avoid validation errors and driver crashes... the vertex+fragment shaders are merged into a single blob with an internal fte-specific header to deal with permutations+specialisations+3rdparty bugs, which kinda makes the whole thing a mess.
so no, fte does not officially try to support custom spir-v blobs right now. I expect you can generate one anyway, but don't expect it to be easy in any way, nor still work with the next revision too.
that reminds me, I really ought to rewrite some shader stuff some time... and not just for vulkan. don't worry, I'm sure I'll forget about it again soon.
regarding fxaa, I probably hardcoded the res or something lame. I could have sworn it was working for me.
bloom seemed to cause the framerate to seriously plummet in linux. windows didn't suffer nearly as much. I've no idea what was going on there, but like I said, I skipped some barriers.
regarding fullscreen performance, if you check the pipeline cache files from nvidia implementations, you can find some fragments of a variation on pre-glsl arb programs (ie: asm). it looks like it uses streamed ubos containing indirections (read: pointers) to the actual ubos.
so that's two extra levels of indirection for each shader invocation, which isn't needed with opengl. which also kills an entire class of optimisations that mobile vendors promote quite heavily too (though I've no idea if it affects desktop gpus much with all their spare cache).
so yeah, I'm going to say its a driver issue, rather than my fault. either way I've given up on trying to optimise it.
if you've a low resolution or a thousand draw calls then vulkan is a win. if you're quake, then it'll probably have lower performance at high resolutions than d3d and probably opengl too. either way, it'll probably still average above 1000fps, so who really cares? other than pedantic obsessives, that is... alright, so half my target players... fine, you win. GAH. just stick with d3d9 (on windows) if you want silly framerates.
.