IKV provenance: AMD FidelityFX SDK (FSR 3.1.4 upscaler + frame generation subset)
================================================================

Upstream
  Repository  https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK
  Tag         v1.1.4 (release notes: FSR 3.1.4; sdk/include/FidelityFX/host/ffx_fsr3upscaler.h VERSION 3.1.4)
  Commit      c6efa6bf7f2027b3ec94f28578bb5965eabb9e55
  Archive     https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/archive/refs/tags/v1.1.4.tar.gz
              sha256 25c46398a656150397597f78d44bf7cb445e9e177dd116b309bbfdf50d50cc9f (198086086 bytes, fetched
              2026-10-10; GitHub tag archives are not guaranteed byte-stable, the per-file hashes below are authoritative)
  License     MIT, LICENSE.txt (installed as share/doc/<project>/third_party/FidelityFX-SDK-LICENSE.txt)

Selection
  What FSR 3.1.4 upscaling and frame generation need on the Vulkan backend: the fsr3upscaler, frameinterpolation and
  opticalflow host components, the VK backend (ffx_vk.cpp), their GLSL passes and gpu headers (fsr3upscaler, fsr1, spd,
  core, frameinterpolation, opticalflow), and the shared host helpers. Paths are kept as in the upstream tree. The
  Win32-only FrameInterpolationSwapchain, the fsr3 wrapper component, ffx-api, samples, prebuilt DLLs and other effects are
  not vendored: IKV owns the swapchain, pacing and presentation of generated frames (src/renderer_vk.cpp).
  Frame interpolation/optical flow files added 2026-10-10 from the same archive (same commit).

IKV-owned files around it (not upstream)
  tools/ffx_fsr3_blobs.py             replaces the Windows-only FidelityFX_SC: glslc SPIR-V for the 10 FSR3 upscaler passes x
                                      (HDR, sharpen), the 11 frame-interpolation passes (render-resolution unjittered motion,
                                      non-inverted depth) and the 7 optical-flow passes (SDR) + SPIR-V descriptor reflection into
                                      build-*/generated/ikv_fsr3_blobs.h
  third_party/ikv-ffx-posix/ikv_ffx_posix.h  force-included CRT stand-ins (POSIX: _countof, wcscpy_s, strcpy_s, sprintf_s;
                                      MinGW-w64: swprintf_s), missing std headers, FFX_SDK_DEFAULT_CONTEXT_SIZE 1 MiB
                                      (wchar_t is 4 bytes on Linux)
  include/ikv/fsr_vk.hpp, src/fsr_vk.cpp  IKV wrapper: blob accessor, capability clamp, shared resources, upscale dispatch,
                                      optical flow + frame interpolation contexts/dispatch (interpolate())

Local patches (each marked "IKV local patch" in the source)
  1. sdk/src/backends/vk/ffx_vk.cpp, findMemoryTypeIndex: skip memory types with VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD
     unless that property is requested. Upstream picked the last DEVICE_LOCAL type, which on RADV is the AMD
     device-coherent/uncached type: VUID-vkAllocateMemory-deviceCoherentMemory-02790 (feature not enabled) and
     uncached memory for every FSR resource.
  2. sdk/src/backends/vk/ffx_vk.cpp, ffxGetScratchMemorySizeVK + CreateBackendContextVK: scratch sub-arrays are aligned
     to alignof(BackendContext_VK::EffectContext) (alignas(32)) instead of 4 bytes, the first one aligned up after the
     backend context, and the size function adds that slack. With 4-byte offsets GCC -O2 emitted aligned SSE stores
     (movaps) into pEffectContexts and RelWithDebInfo clients crashed (SIGSEGV) creating the FSR context.
  3. sdk/src/components/fsr3upscaler/ffx_fsr3upscaler.cpp: a failed ffxFsr3UpscalerContextCreate released nothing; the
     backend context, resources and pipelines created before the failure leaked (VUID-vkDestroyDevice-device-05137,
     587 objects). context->device is now set only after the backend context exists (it was set before the version
     check) and ffxFsr3UpscalerContextCreate calls the existing idempotent fsr3upscalerRelease on failure.
  4. sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h: rw_luma_history storage format
     qualifier rgba8 -> rgba16f, the format of the FSR3UPSCALER_LumaHistory1/2 resources (R16G16B16A16_FLOAT). The
     mismatch makes every load/store undefined in Vulkan (validation Undefined-Value-StorageImage-FormatMismatch).
  5. sdk/src/backends/vk/ffx_vk.cpp, CreateBackendContextVK: the global descriptor pool lists 6 pool sizes but passed
     poolSizeCount = 5, dropping VK_DESCRIPTOR_TYPE_STORAGE_BUFFER; frame interpolation's counters are storage buffers
     (validation WARNING-CoreValidation-AllocateDescriptorSets-WrongType). Now _countof(poolSizes).
  6. sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h, LoadOpticalFlowConfidence:
     ffxFrameInterpolationDispatch never registers an optical-flow confidence resource (FSR 3.1 optical flow has none), so
     r_optical_flow_confidence was never written (VUID-vkCmdDispatch-None-08114; D3D12 reads a null SRV as 0). Returns the
     null-SRV value 0 without declaring the texture; its only caller computes a weight it never uses.

Patched files: unmodified upstream sha256 -> IKV sha256
  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h
    upstream e1e132729a80fe8e812c83d527056a17d62e7d815a79511465bfd1b0f8483095
    ikv      c19ddf88b05b45f25f568123560b342287889f53186af9013d48948fbd7f7364
  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h
    upstream 875c2b8d8df93716fb46271886c768a9ef40c5ccc11ade39397952b4a4e54321
    ikv      aa712eb51dcea7d77e11b57a15d9497dd54caa2f0b42c2d0d014ca46be6f09b4
  sdk/src/backends/vk/ffx_vk.cpp
    upstream 9fa430949184fadb357e6949d7564cf0f8e4653ead683a99755a6f15c4a76589
    ikv      7430c5f674f55a7b89a987f6e33dba3baccfb0c434608cc70e163a5b47f67e7c
  sdk/src/components/fsr3upscaler/ffx_fsr3upscaler.cpp
    upstream 0b1f1227535971a818c6367f1c27f115db682aea4371fa0c15e8dbd3b0ba5764
    ikv      0c6cc10d8a4a62cd6f477ca0e8f1776277110d470350cac3d255005da4249faa

Upstream sha256 of every vendored file (unmodified originals; the 4 patched files differ as listed above)
82cf74fc23885107c7f69249ac3f1dac55898ff68320eb2c753984cae6b2d78a  LICENSE.txt
a19560f837c09f0c990e98b5925b731135d908e372af41c5895cbfa70cc9e5c8  sdk/include/FidelityFX/gpu/ffx_common_types.h
e439aa5f516b2d2ebf070ff1d24561f04fa5f00262a2e4f760764a7d07de7997  sdk/include/FidelityFX/gpu/ffx_core.h
bdb58574cf3ba80803c4198b4661e3a1cd63c877d59833f22bf15962b164a7fe  sdk/include/FidelityFX/gpu/ffx_core_cpu.h
01afe5b65549b2c0951b494ca4bf570ee2aa89a64344e4c7d98ef86e6613ab42  sdk/include/FidelityFX/gpu/ffx_core_glsl.h
0e3c50cb0b4592c051d87e028a1dfa54fbd097942ebb3146964db801dec095d0  sdk/include/FidelityFX/gpu/ffx_core_gpu_common.h
d10466cbf027c8c23858a25f8e8cbbbf521d29f373db663c9354221651e9a498  sdk/include/FidelityFX/gpu/ffx_core_gpu_common_half.h
98722d4b1331c437f5aee645e6f12ed722b721f2ffcb0ec523ee817857f394c7  sdk/include/FidelityFX/gpu/ffx_core_hlsl.h
a7c3a1c213ec083bec401181036cffe7a222af2c430c0bab6bd8c14e83e8a567  sdk/include/FidelityFX/gpu/ffx_core_portability.h
9b9280a86a00850e2930fd6e19442d2984aa36964dd22a077a328a573f7b4830  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation.h
e1e132729a80fe8e812c83d527056a17d62e7d815a79511465bfd1b0f8483095  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h
001340a5c8e7873d830846474b340ab920b73eb981b1ee855de05b60c24cd6ac  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_hlsl.h
3e0e8a8109e4ba19441216e1400d52370a37ab7a1520029d5456368df24a22cb  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_common.h
78b97b96fda75b0aa7c84dde5594eb63883e43c39dc098b8d05c648674a4b16e  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid.h
dd29e6171180b949342585bdfe70f8f8aec631058b19773432150f48da73d45b  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_compute_inpainting_pyramid.h
2ea6e00a345968b50e5aa89f4dbd2c1037eebb97066d9b322de6ed0afa024558  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_debug_view.h
5e7fe2cb7a60e838c6f0d2e009db2dfa5e09b2c2813e62726795cfb983bf0ea5  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_disocclusion_mask.h
8f998e6c2a71e70bf54dc02db63cd64df6131ee6508b5dde702cce5320d467b4  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_game_motion_vector_field.h
42cc6f6b11f98d4c2a827834da9707c43f5bc817f190aeb3b1a071c5b8ca1149  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_inpainting.h
950e5736eb49d0886f9c5703fa0bccea1210c8834170243f29b3d8a07cd1a8c3  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_optical_flow_vector_field.h
80a8cc026cc9352185ffb7366fbc275f3957b1fef2e1fdf9345509e1188c5ff4  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_reconstruct_dilated_velocity_and_previous_depth.h
64bdc3e1b6e5278955c1ef66ed65918e11e05b1452d7411c6601ea7bd77edbcc  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_reconstruct_previous_depth.h
aa9daea4d768cdc014de54bd42890673ffdef2d7d8cf796c986c2b873ad98ac9  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_resources.h
b8c785a0b09a8f148f12a19ca928f5a8178e82429c1f32e176ef300ae5e87493  sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_setup.h
5d608d9d0645da03a3aa6c729c5ad990c6f222053eab850b8e218607c1baaa9d  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1.h
1859aa7ebdaa8ab92da5d0034d7392b6daa5eb54c8775f18b5ad622fd759513b  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1_callbacks_glsl.h
26dc1e08945df01278e975b9baca62746967efeb2e668f7c96c41e601bd3a92c  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1_callbacks_hlsl.h
4247ba45634dba21bf27b6d81c27ee4ce323b6978fc772f1209b2b313aab25d7  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1_easu.h
26305f114f77faaa69e5e1eb89bf16009ac2373e96009624917aba5db645b522  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1_rcas.h
df2891141e2332cf309782e9e4183bf01a7c8bd3628a5035b99838f0e7a9f0bd  sdk/include/FidelityFX/gpu/fsr1/ffx_fsr1_resources.h
7212a028c6ff3ca4a76f9d62b7f64f5f5adce0f108067d8995c7bc795234afbc  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_accumulate.h
875c2b8d8df93716fb46271886c768a9ef40c5ccc11ade39397952b4a4e54321  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h
85d6250e9b89d431167e98400e6e2db64227769b393c97ca6aad077581179114  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h
4898aa014fef875d3644b9b3bed03f31a963349e17ad553198f87ae8af82cb3f  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_common.h
51849bd2f758e2b15375c6a21633fea2f7433a19eb3d74d1d07f8ead36a695ba  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_debug_view.h
82d13d21e161732e48b267d28906f067a8df306ead5aeeed65a1ef66b3e06003  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_luma_instability.h
fa6eeaf8197b214ee1853d73da3c66cd0c8fc24444a65237b0023bd68f10d887  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_luma_pyramid.h
acae0499b8805c363c105895afc28fc90e549b38c8bffdcbec1cf9e2f842abb0  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_prepare_inputs.h
ddf7a6d9cd6e357328e972e0b654da977edcb2e337c992b06d6256eeae339e03  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_prepare_reactivity.h
f1d8a9152bd3ceda8a10dafe44e0c6d27109b345fc4a5704f71c6bf23d6c5cb4  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_rcas.h
d2d01ea2f59658e5494414448f11435879bdac871c3ad7c84b951248bc223702  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_reproject.h
10c6f7619a6c1ff9983fdff9bac565789b1cda52f97ef60b491498223e7b7097  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_resources.h
e8de656c71b15537ddd891b7485492b7829e6aec1dea96256fbc246c9a7c7366  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_sample.h
13e772ff9bd32244fb990704055040f8dbb945c014cc6f0fdbf553188b300e7e  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_shading_change.h
b1e94d7cbb1b7d6e4556e4a080577a62fde07efbc8379b52223d322ed4b75912  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_shading_change_pyramid.h
c51f3af61b43fd779a6685202886dbb5dab3bfea989f8b5060c8c9ab4a93207b  sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_upsample.h
a6105db7ddfee06ab636dcd9a54e783d14e63980b844df64806f642eddce646b  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_callbacks_glsl.h
9161766e8f639d573591362822b4ff6a06dbbbda4e412ce80d6b7fb12504260b  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_callbacks_hlsl.h
9d4b9466bf831e7d4a9c1c3e5e61af4977582c4e24439751eca8b866feadb33a  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_common.h
c5cda3dbbceffe27b9837952b04440a3095fb16fbe15092f8568b5b78f6c6d69  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_compute_luminance_pyramid.h
8360c1840cb067b47485cbef4853392eae5f8826e9de17fa50af746502acb7a0  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_compute_optical_flow_v5.h
c254d8777507fccfaffdcaad304d5bd484473c0b19f38e35a3d05396537aa7b6  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_compute_scd_divergence.h
b4818d2e0ad597d2dcfee9c3d4f2b513f483cebb94098012ececc01a7c126a61  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_filter_optical_flow_v5.h
0c941d937d2dcb87e423016fb41fe24c39e6b4884c74445e41a276cb282f2351  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_generate_scd_histogram.h
6f3cec87a8ad0d68c2d8bd78e8b0862eea7143e708580946eea85cfbfe5a32a4  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_prepare_luma.h
cbb2a75305c6bb45d8efd2dd5b4e471529afed9005a8003eed39a330f2cfa079  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_resources.h
8e1f3d2e2b98a25e836e1dadb97fcbba5b0b126a2113f1551be45cdc1e696d4d  sdk/include/FidelityFX/gpu/opticalflow/ffx_opticalflow_scale_optical_flow_advanced_v5.h
d276f32ee18948cb053c991f3c8821f9664c93f12cb2483dd2978f333bca67b2  sdk/include/FidelityFX/gpu/spd/ffx_spd.h
87b1172d08d80767d91242cdb1ebc2a1127fd6e0787fa799732c8341fdf4b76e  sdk/include/FidelityFX/gpu/spd/ffx_spd_callbacks_glsl.h
dafecd4a2556828fafe4a57cb542903b2782426b1850610cc42984e539804ac0  sdk/include/FidelityFX/gpu/spd/ffx_spd_callbacks_hlsl.h
985cf820915f2b36bc3cc0a5f6cbd1d56fb86e34492df06fa970b32fc48dfcac  sdk/include/FidelityFX/gpu/spd/ffx_spd_downsample.h
b5b4eaa8cdc613ee1d3104a0be64ea4bac96afa1bffe1699ac7d0888e03a9c27  sdk/include/FidelityFX/gpu/spd/ffx_spd_resources.h
75343f8508cfa609bd79a7deddf2df572f0ff876ead8b5ddd1bd9c46f96f1459  sdk/include/FidelityFX/host/backends/vk/ffx_vk.h
d64fb7b916773d2ac96903fc699e438099b8702ecf5ce7aba051bd7e0a109ee1  sdk/include/FidelityFX/host/ffx_assert.h
511ba2b3d99aaa3ac450de7c548244647df146939a7de105bd85713bde4a36c0  sdk/include/FidelityFX/host/ffx_error.h
6851204a5f5fcbb83c9aafa0830859d9e8dacbb028d3e50f8e52e3ce5ca97bbd  sdk/include/FidelityFX/host/ffx_frameinterpolation.h
686cf613f70a1b01a9fa1302fb15f896b86cf2a68b069b3f5f2b5c0bcd9ea15b  sdk/include/FidelityFX/host/ffx_fsr3upscaler.h
0b012be0256c47663905e51fa31873f8bf2c5536c40211e1b01cf117eb5988d6  sdk/include/FidelityFX/host/ffx_interface.h
48c125292b054be1ad208e36b24fb174a9cae80a3fd780a2cb52c4674e6bf4fe  sdk/include/FidelityFX/host/ffx_message.h
efe99c1a3ea28b7378ed65be369a6582bbe2eaf36d37cbd40bf740bdc224bd78  sdk/include/FidelityFX/host/ffx_opticalflow.h
057535d46b7241bb25163a21dc4e59b0029f2d3da6a474b1c1028f921d5eb6f8  sdk/include/FidelityFX/host/ffx_types.h
efe50400378277356116f0a3989ec69367b08aaae65892fdf3a4cf931a4c7bb8  sdk/include/FidelityFX/host/ffx_util.h
d139f399b80ebf2f232c3fd64139edd1ea62f4d5f28ff144c3971fffdc5771a4  sdk/src/backends/shared/ffx_shader_blobs.h
9fa430949184fadb357e6949d7564cf0f8e4653ead683a99755a6f15c4a76589  sdk/src/backends/vk/ffx_vk.cpp
0637a0d5ecf54a5e1b4161dc48db334c1cdf33a6cdd475b5262254d74d8dd506  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_compute_game_vector_field_inpainting_pyramid_pass.glsl
0641760d7ccc676c4cfbc8a5b958435933eb523bb736fcdd42d270d05e5cc180  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_compute_inpainting_pyramid_pass.glsl
a4bc6277a40c00b847ad9b3dbea2114344ddec7caa1b976d83777735d3fab19f  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_debug_view_pass.glsl
5e8a4eafecc3c4c72ba076e2c45ea066f9abf083f962a55bd62b3a4bdbdec9d1  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_disocclusion_mask_pass.glsl
30ba7806d9451d89f6568b670eee6f1c6cc0f3fb5d98a89f6fafb75f51595b37  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_game_motion_vector_field_pass.glsl
0e9e87f6f323c1e7284ea3dd86022035be1db37953a9b988feee57a45d4ffb38  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_inpainting_pass.glsl
30279e09bba6c44051fd0e7d5c7e5e0606ff472c168985fba8250ab1eb6a874e  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_optical_flow_vector_field_pass.glsl
d7787ed6241e4f5f3951997abf6a35389dd9f215923306c81e8c4b3977c6cd0f  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_pass.glsl
4728c67aeaf2b480668e2a54a5c0acd2780303ccfe86f3056c150bc97a7f52d7  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_reconstruct_and_dilate_pass.glsl
b5fc5291656ed9770e22216fd90dddd354f17891b4ec84d300642c0584556cb5  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_reconstruct_previous_depth_pass.glsl
23f1bd8bb68060c2a5f95cd0261bbc42dce74054690e884bdda33a3aea7aa57e  sdk/src/backends/vk/shaders/frameinterpolation/ffx_frameinterpolation_setup_pass.glsl
73b5be6db479475559d2374957b2854aa6d7f7ddadba76ef5e4ed7f248ea9564  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_accumulate_pass.glsl
95991f97c70409cd2783ce7b6866d1fd318e8751c774e1aef6b55f3e470bd81f  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_autogen_reactive_pass.glsl
2ed1674f3f42316b1603111155aa042096158a646cb59117d38b6b0ec130c78b  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_debug_view_pass.glsl
423345d36c811237af7a41ef5e6220638f5159952e90fa084aa952ddd267581b  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_instability_pass.glsl
3e637a702c2cc6b6a222df4327a4ed565f731c6190e958e0ffec5b43741f7ea4  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_luma_pyramid_pass.glsl
bdf3b1ca0fdce968afb79f55d667960382139926eccdfdec46e08dbae3982657  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_inputs_pass.glsl
176f6aa5f2f437487222c7fc057ce858795a6677d6ac3e937a1ce36521c6ddfc  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_prepare_reactivity_pass.glsl
110b409d5e10b16e5a237c13932a707c1c07932bf790e814f1a9d76f02569ad7  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_rcas_pass.glsl
246d24b76e292b7c8c5ba39dfc3a4dff1486701f5fccc6482284afac5a7daaf9  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_shading_change_pass.glsl
ce34582f454925499523d30d2619e19aefd8f1c091545c37d4ebd8feea91cf55  sdk/src/backends/vk/shaders/fsr3upscaler/ffx_fsr3upscaler_shading_change_pyramid_pass.glsl
09c878c33ddac648cff4669a8544016e233a5d6784f9ab08fb39085f23a26d3d  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_compute_luminance_pyramid_pass.glsl
43adca846366f513cd65f818de14147cca58f0534fc8f1513b7db2c3f0611bcf  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_compute_optical_flow_advanced_pass_v5.glsl
cb01c895ac97f986bcff9174574b2e7a37a913333f505f80f3d161b719a6bbfa  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_compute_scd_divergence_pass.glsl
a313c2174790efc245ee722c2899f3743fef96ede28709ab636626930b66d4b5  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_filter_optical_flow_pass_v5.glsl
aa831f7f27d7f49ed2da9476b2ad9e0daad79ea6ed59a5166c9ca5ba3ebc2d97  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_generate_scd_histogram_pass.glsl
4ce523b2c9596565f836cc1975404aedca0f3341f62d16316ddf9e4e4260218d  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_prepare_luma_pass.glsl
82637bbf53fe960034e972fc00d0621dfbca84d91f608c737e2a6d74252fdf77  sdk/src/backends/vk/shaders/opticalflow/ffx_opticalflow_scale_optical_flow_advanced_pass_v5.glsl
a0d322d4753cbf7f174fe945a18aef536c23ec4447a7e127de2fa3f5bbb75969  sdk/src/components/frameinterpolation/ffx_frameinterpolation.cpp
e14534f233c2f824361f303fe9df82a2959dc871a482c064601cda5cc009f150  sdk/src/components/frameinterpolation/ffx_frameinterpolation_private.h
0b1f1227535971a818c6367f1c27f115db682aea4371fa0c15e8dbd3b0ba5764  sdk/src/components/fsr3upscaler/ffx_fsr3upscaler.cpp
89935ce16720ce8b164538e886df29929716e947b47c72ca3243fed833286bdd  sdk/src/components/fsr3upscaler/ffx_fsr3upscaler_private.h
4ffe3b19a4d1dea4f59e08cf2311441c6f3fc847c8ee161343a6aede5b5abb07  sdk/src/components/opticalflow/ffx_opticalflow.cpp
7ec5a22c60d5525b1276442e6793c70b0f9ca7770484a4cef1b37031b27a9215  sdk/src/components/opticalflow/ffx_opticalflow_private.h
c84efb3fe942e3c80b6a595cc68e580154d2380717a88f2ac37939e156b27952  sdk/src/shared/ffx_assert.cpp
fbe34fcdda7db272b7cdb97619ba4d800829fcbabd42cac6e9862d7f898de14a  sdk/src/shared/ffx_breadcrumbs_list.cpp
06c6a58888cbb0d9a74b330682adf3ad0a50d4aea8bce8e69e52c2e5b9c724e6  sdk/src/shared/ffx_breadcrumbs_list.h
96c5a2d576f0688aa77249bf9a85ff8ce3e85c874ccc3d7d4201693f95818811  sdk/src/shared/ffx_message.cpp
607b93de58b16eaa891056b6664d719699c83f8ba9e039aa1a9e44fcecd1ab09  sdk/src/shared/ffx_object_management.cpp
e388d1af28f4d3f7388e524257b9692be867884cff720414031d9768995bf223  sdk/src/shared/ffx_object_management.h

Complete local diff (diff -u upstream ikv)
--- upstream/sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h
+++ ikv/sdk/include/FidelityFX/gpu/frameinterpolation/ffx_frameinterpolation_callbacks_glsl.h
@@ -345,11 +345,12 @@
 #endif
 
 #ifdef FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_CONFIDENCE
-    layout (set = 0, binding = FFX_FRAMEINTERPOLATION_BIND_SRV_OPTICAL_FLOW_CONFIDENCE)  uniform utexture2D  r_optical_flow_confidence;
-    
+    // IKV local patch: ffxFrameInterpolationDispatch (v1.1.4) never registers an optical-flow confidence resource, so
+    // this descriptor was never written (Vulkan: undefined; D3D12 reads its null SRV as 0). Return the null-SRV value;
+    // the only caller computes an unused weight from it.
     FfxFloat32 LoadOpticalFlowConfidence(FFX_PARAMETER_IN FfxInt32x2 iPxPos)
     {
-        return texelFetch(r_optical_flow_confidence, iPxPos, 0).y;
+        return 0.0f;
     }
 #endif
 
--- upstream/sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h
+++ ikv/sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_callbacks_glsl.h
@@ -395,7 +395,9 @@
 #endif
 
 #if defined(FSR3UPSCALER_BIND_UAV_LUMA_HISTORY)
-layout (set = 0, binding = FSR3UPSCALER_BIND_UAV_LUMA_HISTORY, rgba8) uniform image2D  rw_luma_history;
+// IKV local patch: rgba8 -> rgba16f, the format of FSR3UPSCALER_LumaHistory1/2 (R16G16B16A16_FLOAT, ffx_fsr3upscaler.cpp);
+// a mismatched storage format qualifier makes every load/store undefined in Vulkan.
+layout (set = 0, binding = FSR3UPSCALER_BIND_UAV_LUMA_HISTORY, rgba16f) uniform image2D  rw_luma_history;
 
 void StoreLumaHistory(FfxInt32x2 iPxPos, FfxFloat32x4 fLumaHistory)
 {
--- upstream/sdk/src/backends/vk/ffx_vk.cpp
+++ ikv/sdk/src/backends/vk/ffx_vk.cpp
@@ -280,14 +280,17 @@
         vkEnumerateDeviceExtensionProperties(physicalDevice, nullptr, &numExtensions, nullptr);
 
     uint32_t extensionPropArraySize = sizeof(VkExtensionProperties) * numExtensions;
-    uint32_t gpuJobDescArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_GPU_JOBS * sizeof(FfxGpuJobDescription), sizeof(uint32_t));
-    uint32_t resourceViewArraySize = FFX_ALIGN_UP(((maxContexts * FFX_MAX_QUEUED_FRAMES * FFX_MAX_RESOURCE_COUNT * 2) + FFX_MAX_BINDLESS_DESCRIPTOR_COUNT) * sizeof(BackendContext_VK::VkResourceView), sizeof(uint32_t));
-    uint32_t stagingRingBufferArraySize = FFX_ALIGN_UP(maxContexts * FFX_CONSTANT_BUFFER_RING_BUFFER_SIZE, sizeof(uint32_t));
-    uint32_t pipelineArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_PASS_COUNT * sizeof(BackendContext_VK::PipelineLayout), sizeof(uint32_t));
-    uint32_t resourceArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_RESOURCE_COUNT * sizeof(BackendContext_VK::Resource), sizeof(uint32_t));
-    uint32_t contextArraySize = FFX_ALIGN_UP(maxContexts * sizeof(BackendContext_VK::EffectContext), sizeof(uint32_t));
+    // IKV local patch: every sub-array is aligned for alignas(32) EffectContext (upstream: 4 bytes, so -O2 aligned vector
+    // stores into pEffectContexts faulted), plus slack to align the first array after the backend context.
+    const size_t alignment = alignof(BackendContext_VK::EffectContext);
+    uint32_t gpuJobDescArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_GPU_JOBS * sizeof(FfxGpuJobDescription), alignment);
+    uint32_t resourceViewArraySize = FFX_ALIGN_UP(((maxContexts * FFX_MAX_QUEUED_FRAMES * FFX_MAX_RESOURCE_COUNT * 2) + FFX_MAX_BINDLESS_DESCRIPTOR_COUNT) * sizeof(BackendContext_VK::VkResourceView), alignment);
+    uint32_t stagingRingBufferArraySize = FFX_ALIGN_UP(maxContexts * FFX_CONSTANT_BUFFER_RING_BUFFER_SIZE, alignment);
+    uint32_t pipelineArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_PASS_COUNT * sizeof(BackendContext_VK::PipelineLayout), alignment);
+    uint32_t resourceArraySize = FFX_ALIGN_UP(maxContexts * FFX_MAX_RESOURCE_COUNT * sizeof(BackendContext_VK::Resource), alignment);
+    uint32_t contextArraySize = FFX_ALIGN_UP(maxContexts * sizeof(BackendContext_VK::EffectContext), alignment);
     
-    return FFX_ALIGN_UP(sizeof(BackendContext_VK) + extensionPropArraySize + gpuJobDescArraySize + resourceViewArraySize + stagingRingBufferArraySize +
+    return FFX_ALIGN_UP(sizeof(BackendContext_VK) + alignment + extensionPropArraySize + gpuJobDescArraySize + resourceViewArraySize + stagingRingBufferArraySize +
                             pipelineArraySize + resourceArraySize + contextArraySize,
                         sizeof(uint64_t));
 }
@@ -406,6 +409,11 @@
     for (uint32_t i = 0; i < memProperties.memoryTypeCount; i++) {
         if ((memRequirements.memoryTypeBits & (1 << i)) && (memProperties.memoryTypes[i].propertyFlags & requestedProperties)) {
 
+            // IKV local patch: never select AMD device-coherent/uncached types (RADV lists them last) unless requested;
+            // they require the deviceCoherentMemory feature and bypass the GPU caches.
+            if ((memProperties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD) && !(requestedProperties & VK_MEMORY_PROPERTY_DEVICE_COHERENT_BIT_AMD))
+                continue;
+
             // if just device-local memory is requested, make sure this is the invisible heap to prevent over-subscribing the local heap
             if (requestedProperties == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT && (memProperties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT))
                 continue;
@@ -1402,13 +1410,15 @@
         new (&backendContext->uniformBufferMutex) std::mutex();
 
         // Map all of our pointers
-        uint32_t gpuJobDescArraySize   = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_GPU_JOBS * sizeof(FfxGpuJobDescription), sizeof(uint32_t));
-        uint32_t resourceViewArraySize = FFX_ALIGN_UP(((backendContext->maxEffectContexts * FFX_MAX_QUEUED_FRAMES * FFX_MAX_RESOURCE_COUNT * 2) + FFX_MAX_BINDLESS_DESCRIPTOR_COUNT) * sizeof(BackendContext_VK::VkResourceView), sizeof(uint32_t));
-        uint32_t stagingRingBufferArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_CONSTANT_BUFFER_RING_BUFFER_SIZE, sizeof(uint32_t));
-        uint32_t pipelineArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_PASS_COUNT * sizeof(BackendContext_VK::PipelineLayout), sizeof(uint32_t));
-        uint32_t resourceArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_RESOURCE_COUNT * sizeof(BackendContext_VK::Resource), sizeof(uint32_t));
-        uint32_t contextArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * sizeof(BackendContext_VK::EffectContext), sizeof(uint32_t));
-        uint8_t* pMem = (uint8_t*)((BackendContext_VK*)(backendContext + 1));
+        // IKV local patch: sub-arrays aligned for alignas(32) EffectContext, see ffxGetScratchMemorySizeVK.
+        const size_t alignment = alignof(BackendContext_VK::EffectContext);
+        uint32_t gpuJobDescArraySize   = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_GPU_JOBS * sizeof(FfxGpuJobDescription), alignment);
+        uint32_t resourceViewArraySize = FFX_ALIGN_UP(((backendContext->maxEffectContexts * FFX_MAX_QUEUED_FRAMES * FFX_MAX_RESOURCE_COUNT * 2) + FFX_MAX_BINDLESS_DESCRIPTOR_COUNT) * sizeof(BackendContext_VK::VkResourceView), alignment);
+        uint32_t stagingRingBufferArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_CONSTANT_BUFFER_RING_BUFFER_SIZE, alignment);
+        uint32_t pipelineArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_PASS_COUNT * sizeof(BackendContext_VK::PipelineLayout), alignment);
+        uint32_t resourceArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * FFX_MAX_RESOURCE_COUNT * sizeof(BackendContext_VK::Resource), alignment);
+        uint32_t contextArraySize = FFX_ALIGN_UP(backendContext->maxEffectContexts * sizeof(BackendContext_VK::EffectContext), alignment);
+        uint8_t* pMem = (uint8_t*)FFX_ALIGN_UP((uintptr_t)(backendContext + 1), alignment);
 
         // Map gpu job array
         backendContext->pGpuJobs = (FfxGpuJobDescription*)pMem;
@@ -1529,7 +1539,8 @@
         descriptorPoolCreateInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
         descriptorPoolCreateInfo.pNext = nullptr;
         descriptorPoolCreateInfo.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
-        descriptorPoolCreateInfo.poolSizeCount = 5;
+        // IKV local patch: all 6 entries (upstream passed 5, dropping STORAGE_BUFFER, which frame interpolation's counters use).
+        descriptorPoolCreateInfo.poolSizeCount = _countof(poolSizes);
         descriptorPoolCreateInfo.pPoolSizes = poolSizes;
         descriptorPoolCreateInfo.maxSets = backendContext->maxEffectContexts * FFX_MAX_PASS_COUNT * MAX_PIPELINE_USAGE_PER_FRAME * FFX_MAX_QUEUED_FRAMES;
 
--- upstream/sdk/src/components/fsr3upscaler/ffx_fsr3upscaler.cpp
+++ ikv/sdk/src/components/fsr3upscaler/ffx_fsr3upscaler.cpp
@@ -508,7 +508,6 @@
 
     // Setup the data for implementation.
     memset(context, 0, sizeof(FfxFsr3UpscalerContext_Private));
-    context->device = contextDescription->backendInterface.device;
 
     memcpy(&context->contextDescription, contextDescription, sizeof(FfxFsr3UpscalerContextDescription));
 
@@ -519,6 +518,9 @@
     // Create the context.
     FfxErrorCode errorCode = context->contextDescription.backendInterface.fpCreateBackendContext(&context->contextDescription.backendInterface, FFX_EFFECT_FSR3UPSCALER, nullptr, &context->effectContextId);
     FFX_RETURN_ON_ERROR(errorCode == FFX_OK, errorCode);
+    // IKV local patch: device marks a live backend context (moved here from before the version check) so a failed
+    // create can release it, see ffxFsr3UpscalerContextCreate.
+    context->device = contextDescription->backendInterface.device;
 
     // call out for device caps.
     errorCode = context->contextDescription.backendInterface.fpGetDeviceCapabilities(&context->contextDescription.backendInterface, &context->deviceCapabilities);
@@ -1208,6 +1210,14 @@
     FfxFsr3UpscalerContext_Private* contextPrivate = (FfxFsr3UpscalerContext_Private*)(context);
     const FfxErrorCode errorCode = fsr3upscalerCreate(contextPrivate, contextDescription);
 
+    // IKV local patch: fsr3upscalerCreate returns early after creating the backend context, resources or pipelines;
+    // release that partial state (every release step is idempotent on zeroed or partially created objects).
+    if (errorCode != FFX_OK && contextPrivate->device)
+    {
+        fsr3upscalerRelease(contextPrivate);
+        contextPrivate->device = nullptr;
+    }
+
     return errorCode;
 }
 

Toyota Trafik Oyunu port
  Copied unchanged (including the two local patches above) from the IKV Linux project (same author's toolchain), where
  this subset was assembled and verified. Wrapper here: src/render/fsr.{hpp,cpp} (namespace tto); posix shim:
  third_party/ffx-posix/ffx_posix.h; blob generator: tools/ffx_fsr3_blobs.py (generated namespace tto::ffx_blobs).
  Frame generation presentation is this project's (src/render/vk.cpp: generated + real frame presented per rendered frame).
