diff options
author | Stelios Tsampas | 2024-03-05 18:48:41 +0200 |
---|---|---|
committer | Stelios Tsampas | 2024-03-05 18:48:41 +0200 |
commit | ff4d51af13777790adee173ffeac5bbcf20adf12 (patch) | |
tree | a5882c42dab619b8ff5810b012290212326d1ea8 | |
parent | 7d3d1bc2f4e13cef5cd24913a0b7e5fbbc62fcff (diff) | |
download | aur-ff4d51af13777790adee173ffeac5bbcf20adf12.tar.gz |
[proton-experimental] Clean PKGBUILD from tests
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | 0001-fshack-AMD-FSR-complete.patch | 1981 | ||||
-rw-r--r-- | 4947.patch | 1017 | ||||
-rw-r--r-- | PKGBUILD | 20 |
4 files changed, 4 insertions, 3022 deletions
@@ -1,7 +1,7 @@ pkgbase = proton-experimental pkgdesc = Compatibility tool for Steam Play based on Wine and additional components, experimental branch pkgver = 9.0.20240301 - pkgrel = 6 + pkgrel = 7 epoch = 1 url = https://github.com/ValveSoftware/Proton install = proton-experimental.install @@ -141,9 +141,6 @@ pkgbase = proton-experimental source = 0004-AUR-Copy-DLL-dependencies-of-32bit-libvkd3d-dlls-int.patch source = 0005-AUR-Strip-binaries-early.patch source = 0006-AUR-Fix-hwnd-redefinition.patch - source = 0007-AUR-Enable-winewayland.patch - source = 0001-fshack-AMD-FSR-complete.patch - source = 4947.patch sha256sums = SKIP sha256sums = 2cfc8d5c948602e21eff8a78613e1826f2d033df9672cace87fed56e8310afb6 sha256sums = fd88fc7e537d058d7a8abf0c1ebc90c574892a466de86706a26d254710a82814 @@ -154,8 +151,5 @@ pkgbase = proton-experimental sha256sums = a3667c3fe517ea856dc7a5ab73fb5e10b20e5743f66f72d35b9a42394ed31701 sha256sums = fce16c5db9950068a3c965fd87e9194bbe13ead8a2c02d4710884c3669e236e5 sha256sums = 89baf181f197a6156507841c018fd81c8f934f77161ba90f5ee6466677428235 - sha256sums = b7297cabb316eb9621ec1abade892143392eba5fdbd3bd496df7992a7c9d7358 - sha256sums = 3d308f8e87361669267fa52b986c24f1dea1913156a045f43ea04e02f7444b18 - sha256sums = 0f9ddda17319e3ef23ee847c0a740bf74847796d4b3cf61b05feb9aa3141b7c7 pkgname = proton-experimental diff --git a/0001-fshack-AMD-FSR-complete.patch b/0001-fshack-AMD-FSR-complete.patch deleted file mode 100644 index d95d8b2eb488..000000000000 --- a/0001-fshack-AMD-FSR-complete.patch +++ /dev/null @@ -1,1981 +0,0 @@ -From 5082f3875a6afe8cfad2f3a427a7cabef1981377 Mon Sep 17 00:00:00 2001 -From: Stelios Tsampas <loathingkernel@gmail.com> -Date: Thu, 29 Feb 2024 00:33:20 +0200 -Subject: [PATCH] fshack: AMD FSR complete - ---- - dlls/winevulkan/Makefile.in | 2 +- - dlls/winevulkan/fsr_spv.h | 744 +++++++++++++++++++++++++++++++ - dlls/winevulkan/make_vulkan | 2 +- - dlls/winevulkan/vulkan.c | 546 ++++++++++++++++++----- - dlls/winevulkan/vulkan_private.h | 23 +- - dlls/winex11.drv/fs.c | 204 ++++++++- - dlls/winex11.drv/vulkan.c | 8 +- - dlls/winex11.drv/x11drv.h | 1 + - 8 files changed, 1416 insertions(+), 114 deletions(-) - create mode 100644 dlls/winevulkan/fsr_spv.h - -diff --git a/dlls/winevulkan/Makefile.in b/dlls/winevulkan/Makefile.in -index 52bffca2843..1c27b304177 100644 ---- a/dlls/winevulkan/Makefile.in -+++ b/dlls/winevulkan/Makefile.in -@@ -2,7 +2,7 @@ MODULE = winevulkan.dll - UNIXLIB = winevulkan.so - IMPORTLIB = winevulkan - IMPORTS = user32 gdi32 advapi32 setupapi win32u --UNIX_LIBS = -lwin32u $(PTHREAD_LIBS) -+UNIX_LIBS = -lwin32u -lm $(PTHREAD_LIBS) - - SOURCES = \ - loader.c \ -diff --git a/dlls/winevulkan/fsr_spv.h b/dlls/winevulkan/fsr_spv.h -new file mode 100644 -index 00000000000..cc4d3dea877 ---- /dev/null -+++ b/dlls/winevulkan/fsr_spv.h -@@ -0,0 +1,744 @@ -+#ifndef __FSR_SPV_H -+#define __FSR_SPV_H -+ -+#include <stdint.h> -+ -+/* -+#version 460 -+#extension GL_GOOGLE_include_directive: require -+ -+layout(local_size_x=8, local_size_y=8, local_size_z=1) in; -+ -+layout(binding = 0) uniform sampler2D texSampler; -+layout(binding = 1) uniform writeonly image2D outImage; -+ -+#define A_GPU 1 -+#define A_GLSL 1 -+//#include "ffx_a.h" -+#define FSR_EASU_F 1 -+AF4 FsrEasuRF(AF2 p){return AF4(textureGather(texSampler, p, 0));} -+AF4 FsrEasuGF(AF2 p){return AF4(textureGather(texSampler, p, 1));} -+AF4 FsrEasuBF(AF2 p){return AF4(textureGather(texSampler, p, 2));} -+//#include "ffx_fsr1.h" -+ -+layout(push_constant) uniform pushConstants { -+ uvec4 c1, c2, c3, c4; -+}; -+ -+ -+void main() -+{ -+ vec3 color; -+ -+ if (any(greaterThanEqual(gl_GlobalInvocationID.xy, c4.zw))) -+ return; -+ -+ FsrEasuF(color, uvec2(gl_GlobalInvocationID.xy), c1, c2, c3, c4); -+ -+ imageStore(outImage, ivec2(gl_GlobalInvocationID.xy), vec4(color, 1.0)); -+} -+*/ -+const uint32_t fsr_easu_comp_spv[] = { -+ 0x07230203,0x00010000,0x0008000a,0x0000129e,0x00000000,0x00020011,0x00000001,0x00020011, -+ 0x00000038,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e, -+ 0x00000000,0x00000001,0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x000004ee, -+ 0x00060010,0x00000004,0x00000011,0x00000008,0x00000008,0x00000001,0x00030003,0x00000002, -+ 0x000001cc,0x000a0004,0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,0x5f656c79,0x656e696c, -+ 0x7269645f,0x69746365,0x00006576,0x00080004,0x475f4c47,0x4c474f4f,0x6e695f45,0x64756c63, -+ 0x69645f65,0x74636572,0x00657669,0x00040005,0x00000004,0x6e69616d,0x00000000,0x00050005, -+ 0x000000bc,0x53786574,0x6c706d61,0x00007265,0x00080005,0x000004ee,0x475f6c67,0x61626f6c, -+ 0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00060005,0x000004f1,0x68737570,0x736e6f43, -+ 0x746e6174,0x00000073,0x00040006,0x000004f1,0x00000000,0x00003163,0x00040006,0x000004f1, -+ 0x00000001,0x00003263,0x00040006,0x000004f1,0x00000002,0x00003363,0x00040006,0x000004f1, -+ 0x00000003,0x00003463,0x00030005,0x000004f3,0x00000000,0x00050005,0x00000517,0x4974756f, -+ 0x6567616d,0x00000000,0x00040047,0x000000bc,0x00000022,0x00000000,0x00040047,0x000000bc, -+ 0x00000021,0x00000000,0x00040047,0x000004ee,0x0000000b,0x0000001c,0x00050048,0x000004f1, -+ 0x00000000,0x00000023,0x00000000,0x00050048,0x000004f1,0x00000001,0x00000023,0x00000010, -+ 0x00050048,0x000004f1,0x00000002,0x00000023,0x00000020,0x00050048,0x000004f1,0x00000003, -+ 0x00000023,0x00000030,0x00030047,0x000004f1,0x00000002,0x00040047,0x00000517,0x00000022, -+ 0x00000000,0x00040047,0x00000517,0x00000021,0x00000001,0x00030047,0x00000517,0x00000019, -+ 0x00040047,0x00000523,0x0000000b,0x00000019,0x00020013,0x00000002,0x00030021,0x00000003, -+ 0x00000002,0x00030016,0x00000006,0x00000020,0x00040017,0x0000000c,0x00000006,0x00000002, -+ 0x00040017,0x00000011,0x00000006,0x00000003,0x00040017,0x00000016,0x00000006,0x00000004, -+ 0x00040015,0x0000001b,0x00000020,0x00000000,0x00020014,0x0000004f,0x00040017,0x00000060, -+ 0x0000001b,0x00000002,0x00040017,0x00000062,0x0000001b,0x00000004,0x0004002b,0x00000006, -+ 0x00000093,0x3f800000,0x0004002b,0x00000006,0x0000009b,0x00000000,0x0004002b,0x0000001b, -+ 0x000000a3,0x7ef07ebb,0x0004002b,0x0000001b,0x000000ac,0x5f347d74,0x0004002b,0x0000001b, -+ 0x000000b1,0x00000001,0x00090019,0x000000b9,0x00000006,0x00000001,0x00000000,0x00000000, -+ 0x00000000,0x00000001,0x00000000,0x0003001b,0x000000ba,0x000000b9,0x00040020,0x000000bb, -+ 0x00000000,0x000000ba,0x0004003b,0x000000bb,0x000000bc,0x00000000,0x00040015,0x000000bf, -+ 0x00000020,0x00000001,0x0004002b,0x000000bf,0x000000c0,0x00000000,0x0004002b,0x000000bf, -+ 0x000000cb,0x00000001,0x0004002b,0x000000bf,0x000000d6,0x00000002,0x0004002b,0x0000001b, -+ 0x000000e0,0x00000000,0x0004002b,0x00000006,0x0000010d,0x3ecccccd,0x0004002b,0x00000006, -+ 0x00000112,0xbf800000,0x0004002b,0x00000006,0x00000123,0x3fc80000,0x0004002b,0x00000006, -+ 0x00000128,0xbf100000,0x0004002b,0x00000006,0x00000230,0x3f000000,0x0004002b,0x00000006, -+ 0x000002f5,0x38000000,0x0004002b,0x00000006,0x0000033e,0xbf000000,0x0004002b,0x00000006, -+ 0x00000348,0xbe947ae1,0x0005002c,0x0000000c,0x0000039c,0x0000009b,0x00000112,0x0005002c, -+ 0x0000000c,0x000003b7,0x00000093,0x00000112,0x0005002c,0x0000000c,0x000003d2,0x00000112, -+ 0x00000093,0x0005002c,0x0000000c,0x000003ed,0x0000009b,0x00000093,0x0005002c,0x0000000c, -+ 0x00000423,0x00000112,0x0000009b,0x0005002c,0x0000000c,0x0000043e,0x00000093,0x00000093, -+ 0x0004002b,0x00000006,0x00000459,0x40000000,0x0005002c,0x0000000c,0x0000045a,0x00000459, -+ 0x00000093,0x0005002c,0x0000000c,0x00000475,0x00000459,0x0000009b,0x0005002c,0x0000000c, -+ 0x00000490,0x00000093,0x0000009b,0x0005002c,0x0000000c,0x000004ab,0x00000093,0x00000459, -+ 0x0005002c,0x0000000c,0x000004c6,0x0000009b,0x00000459,0x00040017,0x000004ec,0x0000001b, -+ 0x00000003,0x00040020,0x000004ed,0x00000001,0x000004ec,0x0004003b,0x000004ed,0x000004ee, -+ 0x00000001,0x0006001e,0x000004f1,0x00000062,0x00000062,0x00000062,0x00000062,0x00040020, -+ 0x000004f2,0x00000009,0x000004f1,0x0004003b,0x000004f2,0x000004f3,0x00000009,0x0004002b, -+ 0x000000bf,0x000004f4,0x00000003,0x00040020,0x000004f5,0x00000009,0x00000062,0x00040017, -+ 0x000004f9,0x0000004f,0x00000002,0x00090019,0x00000515,0x00000006,0x00000001,0x00000000, -+ 0x00000000,0x00000000,0x00000002,0x00000000,0x00040020,0x00000516,0x00000000,0x00000515, -+ 0x0004003b,0x00000516,0x00000517,0x00000000,0x00040017,0x0000051b,0x000000bf,0x00000002, -+ 0x0004002b,0x0000001b,0x00000522,0x00000008,0x0006002c,0x000004ec,0x00000523,0x00000522, -+ 0x00000522,0x000000b1,0x0007002c,0x00000016,0x0000127a,0x00000230,0x00000230,0x00000230, -+ 0x00000230,0x00030001,0x0000000c,0x0000129d,0x00050036,0x00000002,0x00000004,0x00000000, -+ 0x00000003,0x000200f8,0x00000005,0x000300f7,0x00000524,0x00000000,0x000300fb,0x000000e0, -+ 0x00000525,0x000200f8,0x00000525,0x0004003d,0x000004ec,0x000004ef,0x000004ee,0x0007004f, -+ 0x00000060,0x000004f0,0x000004ef,0x000004ef,0x00000000,0x00000001,0x00050041,0x000004f5, -+ 0x000004f6,0x000004f3,0x000004f4,0x0004003d,0x00000062,0x000004f7,0x000004f6,0x0007004f, -+ 0x00000060,0x000004f8,0x000004f7,0x000004f7,0x00000002,0x00000003,0x000500ae,0x000004f9, -+ 0x000004fa,0x000004f0,0x000004f8,0x0004009a,0x0000004f,0x000004fb,0x000004fa,0x000300f7, -+ 0x000004fd,0x00000000,0x000400fa,0x000004fb,0x000004fc,0x000004fd,0x000200f8,0x000004fc, -+ 0x000200f9,0x00000524,0x000200f8,0x000004fd,0x00050051,0x0000001b,0x00000502,0x000004ef, -+ 0x00000000,0x00050051,0x0000001b,0x00000503,0x000004ef,0x00000001,0x00050050,0x00000060, -+ 0x00000504,0x00000502,0x00000503,0x00050041,0x000004f5,0x00000508,0x000004f3,0x000000c0, -+ 0x0004003d,0x00000062,0x00000509,0x00000508,0x00050041,0x000004f5,0x0000050b,0x000004f3, -+ 0x000000cb,0x0004003d,0x00000062,0x0000050c,0x0000050b,0x00050041,0x000004f5,0x0000050e, -+ 0x000004f3,0x000000d6,0x0004003d,0x00000062,0x0000050f,0x0000050e,0x00040070,0x0000000c, -+ 0x00000618,0x00000504,0x00050051,0x0000001b,0x0000061b,0x00000509,0x00000000,0x00050051, -+ 0x0000001b,0x0000061c,0x00000509,0x00000001,0x00050050,0x00000060,0x0000061d,0x0000061b, -+ 0x0000061c,0x0004007c,0x0000000c,0x0000061e,0x0000061d,0x00050085,0x0000000c,0x0000061f, -+ 0x00000618,0x0000061e,0x00050051,0x0000001b,0x00000622,0x00000509,0x00000002,0x00050051, -+ 0x0000001b,0x00000623,0x00000509,0x00000003,0x00050050,0x00000060,0x00000624,0x00000622, -+ 0x00000623,0x0004007c,0x0000000c,0x00000625,0x00000624,0x00050081,0x0000000c,0x00000626, -+ 0x0000061f,0x00000625,0x0006000c,0x0000000c,0x00000628,0x00000001,0x00000008,0x00000626, -+ 0x00050083,0x0000000c,0x0000062b,0x00000626,0x00000628,0x00050051,0x0000001b,0x0000062f, -+ 0x0000050c,0x00000000,0x00050051,0x0000001b,0x00000630,0x0000050c,0x00000001,0x00050050, -+ 0x00000060,0x00000631,0x0000062f,0x00000630,0x0004007c,0x0000000c,0x00000632,0x00000631, -+ 0x00050085,0x0000000c,0x00000633,0x00000628,0x00000632,0x00050051,0x0000001b,0x00000636, -+ 0x0000050c,0x00000002,0x00050051,0x0000001b,0x00000637,0x0000050c,0x00000003,0x00050050, -+ 0x00000060,0x00000638,0x00000636,0x00000637,0x0004007c,0x0000000c,0x00000639,0x00000638, -+ 0x00050081,0x0000000c,0x0000063a,0x00000633,0x00000639,0x00050051,0x0000001b,0x0000063e, -+ 0x0000050f,0x00000000,0x00050051,0x0000001b,0x0000063f,0x0000050f,0x00000001,0x00050050, -+ 0x00000060,0x00000640,0x0000063e,0x0000063f,0x0004007c,0x0000000c,0x00000641,0x00000640, -+ 0x00050081,0x0000000c,0x00000642,0x0000063a,0x00000641,0x00050051,0x0000001b,0x00000646, -+ 0x0000050f,0x00000002,0x00050051,0x0000001b,0x00000647,0x0000050f,0x00000003,0x00050050, -+ 0x00000060,0x00000648,0x00000646,0x00000647,0x0004007c,0x0000000c,0x00000649,0x00000648, -+ 0x00050081,0x0000000c,0x0000064a,0x0000063a,0x00000649,0x00050051,0x0000001b,0x0000064e, -+ 0x000004f7,0x00000000,0x00050051,0x0000001b,0x0000064f,0x000004f7,0x00000001,0x00050050, -+ 0x00000060,0x00000650,0x0000064e,0x0000064f,0x0004007c,0x0000000c,0x00000651,0x00000650, -+ 0x00050081,0x0000000c,0x00000652,0x0000063a,0x00000651,0x0004003d,0x000000ba,0x00000845, -+ 0x000000bc,0x00060060,0x00000016,0x00000847,0x00000845,0x0000063a,0x000000c0,0x00060060, -+ 0x00000016,0x00000851,0x00000845,0x0000063a,0x000000cb,0x00060060,0x00000016,0x0000085b, -+ 0x00000845,0x0000063a,0x000000d6,0x00060060,0x00000016,0x00000865,0x00000845,0x00000642, -+ 0x000000c0,0x00060060,0x00000016,0x0000086f,0x00000845,0x00000642,0x000000cb,0x00060060, -+ 0x00000016,0x00000879,0x00000845,0x00000642,0x000000d6,0x00060060,0x00000016,0x00000883, -+ 0x00000845,0x0000064a,0x000000c0,0x00060060,0x00000016,0x0000088d,0x00000845,0x0000064a, -+ 0x000000cb,0x00060060,0x00000016,0x00000897,0x00000845,0x0000064a,0x000000d6,0x00060060, -+ 0x00000016,0x000008a1,0x00000845,0x00000652,0x000000c0,0x00060060,0x00000016,0x000008ab, -+ 0x00000845,0x00000652,0x000000cb,0x00060060,0x00000016,0x000008b5,0x00000845,0x00000652, -+ 0x000000d6,0x00050085,0x00000016,0x0000066d,0x0000085b,0x0000127a,0x00050085,0x00000016, -+ 0x00000670,0x00000847,0x0000127a,0x00050081,0x00000016,0x00000672,0x00000670,0x00000851, -+ 0x00050081,0x00000016,0x00000673,0x0000066d,0x00000672,0x00050085,0x00000016,0x00000676, -+ 0x00000879,0x0000127a,0x00050085,0x00000016,0x00000679,0x00000865,0x0000127a,0x00050081, -+ 0x00000016,0x0000067b,0x00000679,0x0000086f,0x00050081,0x00000016,0x0000067c,0x00000676, -+ 0x0000067b,0x00050085,0x00000016,0x0000067f,0x00000897,0x0000127a,0x00050085,0x00000016, -+ 0x00000682,0x00000883,0x0000127a,0x00050081,0x00000016,0x00000684,0x00000682,0x0000088d, -+ 0x00050081,0x00000016,0x00000685,0x0000067f,0x00000684,0x00050085,0x00000016,0x00000688, -+ 0x000008b5,0x0000127a,0x00050085,0x00000016,0x0000068b,0x000008a1,0x0000127a,0x00050081, -+ 0x00000016,0x0000068d,0x0000068b,0x000008ab,0x00050081,0x00000016,0x0000068e,0x00000688, -+ 0x0000068d,0x00050051,0x00000006,0x00000690,0x00000673,0x00000000,0x00050051,0x00000006, -+ 0x00000692,0x00000673,0x00000001,0x00050051,0x00000006,0x00000694,0x0000067c,0x00000000, -+ 0x00050051,0x00000006,0x00000696,0x0000067c,0x00000001,0x00050051,0x00000006,0x00000698, -+ 0x0000067c,0x00000002,0x00050051,0x00000006,0x0000069a,0x0000067c,0x00000003,0x00050051, -+ 0x00000006,0x0000069c,0x00000685,0x00000000,0x00050051,0x00000006,0x0000069e,0x00000685, -+ 0x00000001,0x00050051,0x00000006,0x000006a0,0x00000685,0x00000002,0x00050051,0x00000006, -+ 0x000006a2,0x00000685,0x00000003,0x00050051,0x00000006,0x000006a4,0x0000068e,0x00000002, -+ 0x00050051,0x00000006,0x000006a6,0x0000068e,0x00000003,0x00050051,0x00000006,0x00000913, -+ 0x0000062b,0x00000000,0x00050083,0x00000006,0x00000914,0x00000093,0x00000913,0x00050051, -+ 0x00000006,0x00000917,0x0000062b,0x00000001,0x00050083,0x00000006,0x00000918,0x00000093, -+ 0x00000917,0x00050085,0x00000006,0x00000919,0x00000914,0x00000918,0x00050083,0x00000006, -+ 0x00000939,0x000006a2,0x00000698,0x00050083,0x00000006,0x0000093c,0x00000698,0x0000069a, -+ 0x0006000c,0x00000006,0x0000093e,0x00000001,0x00000004,0x00000939,0x0006000c,0x00000006, -+ 0x00000940,0x00000001,0x00000004,0x0000093c,0x0007000c,0x00000006,0x00000941,0x00000001, -+ 0x00000028,0x0000093e,0x00000940,0x0004007c,0x0000001b,0x00000993,0x00000941,0x00050082, -+ 0x0000001b,0x00000994,0x000000a3,0x00000993,0x0004007c,0x00000006,0x00000995,0x00000994, -+ 0x00050083,0x00000006,0x00000946,0x000006a2,0x0000069a,0x00050085,0x00000006,0x00000949, -+ 0x00000946,0x00000919,0x0006000c,0x00000006,0x0000094f,0x00000001,0x00000004,0x00000946, -+ 0x00050085,0x00000006,0x00000951,0x0000094f,0x00000995,0x0008000c,0x00000006,0x000009a0, -+ 0x00000001,0x0000002b,0x00000951,0x0000009b,0x00000093,0x00050085,0x00000006,0x00000955, -+ 0x000009a0,0x000009a0,0x00050085,0x00000006,0x00000958,0x00000955,0x00000919,0x00050083, -+ 0x00000006,0x0000095d,0x00000696,0x00000698,0x00050083,0x00000006,0x00000960,0x00000698, -+ 0x00000690,0x0006000c,0x00000006,0x00000962,0x00000001,0x00000004,0x0000095d,0x0006000c, -+ 0x00000006,0x00000964,0x00000001,0x00000004,0x00000960,0x0007000c,0x00000006,0x00000965, -+ 0x00000001,0x00000028,0x00000962,0x00000964,0x0004007c,0x0000001b,0x000009ac,0x00000965, -+ 0x00050082,0x0000001b,0x000009ad,0x000000a3,0x000009ac,0x0004007c,0x00000006,0x000009ae, -+ 0x000009ad,0x00050083,0x00000006,0x0000096a,0x00000696,0x00000690,0x00050085,0x00000006, -+ 0x0000096d,0x0000096a,0x00000919,0x0006000c,0x00000006,0x00000973,0x00000001,0x00000004, -+ 0x0000096a,0x00050085,0x00000006,0x00000975,0x00000973,0x000009ae,0x0008000c,0x00000006, -+ 0x000009b9,0x00000001,0x0000002b,0x00000975,0x0000009b,0x00000093,0x00050085,0x00000006, -+ 0x00000979,0x000009b9,0x000009b9,0x00050085,0x00000006,0x0000097c,0x00000979,0x00000919, -+ 0x00050081,0x00000006,0x0000097e,0x00000958,0x0000097c,0x00050085,0x00000006,0x000009e8, -+ 0x00000913,0x00000918,0x00050083,0x00000006,0x000009fe,0x000006a0,0x000006a2,0x0006000c, -+ 0x00000006,0x00000a03,0x00000001,0x00000004,0x000009fe,0x0007000c,0x00000006,0x00000a06, -+ 0x00000001,0x00000028,0x00000a03,0x0000093e,0x0004007c,0x0000001b,0x00000a58,0x00000a06, -+ 0x00050082,0x0000001b,0x00000a59,0x000000a3,0x00000a58,0x0004007c,0x00000006,0x00000a5a, -+ 0x00000a59,0x00050083,0x00000006,0x00000a0b,0x000006a0,0x00000698,0x00050085,0x00000006, -+ 0x00000a0e,0x00000a0b,0x000009e8,0x00050081,0x00000006,0x00000a11,0x00000949,0x00000a0e, -+ 0x0006000c,0x00000006,0x00000a14,0x00000001,0x00000004,0x00000a0b,0x00050085,0x00000006, -+ 0x00000a16,0x00000a14,0x00000a5a,0x0008000c,0x00000006,0x00000a65,0x00000001,0x0000002b, -+ 0x00000a16,0x0000009b,0x00000093,0x00050085,0x00000006,0x00000a1a,0x00000a65,0x00000a65, -+ 0x00050085,0x00000006,0x00000a1d,0x00000a1a,0x000009e8,0x00050081,0x00000006,0x00000a1f, -+ 0x0000097e,0x00000a1d,0x00050083,0x00000006,0x00000a22,0x0000069c,0x000006a2,0x00050083, -+ 0x00000006,0x00000a25,0x000006a2,0x00000692,0x0006000c,0x00000006,0x00000a27,0x00000001, -+ 0x00000004,0x00000a22,0x0006000c,0x00000006,0x00000a29,0x00000001,0x00000004,0x00000a25, -+ 0x0007000c,0x00000006,0x00000a2a,0x00000001,0x00000028,0x00000a27,0x00000a29,0x0004007c, -+ 0x0000001b,0x00000a71,0x00000a2a,0x00050082,0x0000001b,0x00000a72,0x000000a3,0x00000a71, -+ 0x0004007c,0x00000006,0x00000a73,0x00000a72,0x00050083,0x00000006,0x00000a2f,0x0000069c, -+ 0x00000692,0x00050085,0x00000006,0x00000a32,0x00000a2f,0x000009e8,0x00050081,0x00000006, -+ 0x00000a35,0x0000096d,0x00000a32,0x0006000c,0x00000006,0x00000a38,0x00000001,0x00000004, -+ 0x00000a2f,0x00050085,0x00000006,0x00000a3a,0x00000a38,0x00000a73,0x0008000c,0x00000006, -+ 0x00000a7e,0x00000001,0x0000002b,0x00000a3a,0x0000009b,0x00000093,0x00050085,0x00000006, -+ 0x00000a3e,0x00000a7e,0x00000a7e,0x00050085,0x00000006,0x00000a41,0x00000a3e,0x000009e8, -+ 0x00050081,0x00000006,0x00000a43,0x00000a1f,0x00000a41,0x00050085,0x00000006,0x00000ab7, -+ 0x00000914,0x00000917,0x00050083,0x00000006,0x00000ac3,0x0000069c,0x00000696,0x00050083, -+ 0x00000006,0x00000ac6,0x00000696,0x00000694,0x0006000c,0x00000006,0x00000ac8,0x00000001, -+ 0x00000004,0x00000ac3,0x0006000c,0x00000006,0x00000aca,0x00000001,0x00000004,0x00000ac6, -+ 0x0007000c,0x00000006,0x00000acb,0x00000001,0x00000028,0x00000ac8,0x00000aca,0x0004007c, -+ 0x0000001b,0x00000b1d,0x00000acb,0x00050082,0x0000001b,0x00000b1e,0x000000a3,0x00000b1d, -+ 0x0004007c,0x00000006,0x00000b1f,0x00000b1e,0x00050083,0x00000006,0x00000ad0,0x0000069c, -+ 0x00000694,0x00050085,0x00000006,0x00000ad3,0x00000ad0,0x00000ab7,0x00050081,0x00000006, -+ 0x00000ad6,0x00000a11,0x00000ad3,0x0006000c,0x00000006,0x00000ad9,0x00000001,0x00000004, -+ 0x00000ad0,0x00050085,0x00000006,0x00000adb,0x00000ad9,0x00000b1f,0x0008000c,0x00000006, -+ 0x00000b2a,0x00000001,0x0000002b,0x00000adb,0x0000009b,0x00000093,0x00050085,0x00000006, -+ 0x00000adf,0x00000b2a,0x00000b2a,0x00050085,0x00000006,0x00000ae2,0x00000adf,0x00000ab7, -+ 0x00050081,0x00000006,0x00000ae4,0x00000a43,0x00000ae2,0x00050083,0x00000006,0x00000ae7, -+ 0x000006a6,0x00000696,0x0006000c,0x00000006,0x00000aec,0x00000001,0x00000004,0x00000ae7, -+ 0x0007000c,0x00000006,0x00000aef,0x00000001,0x00000028,0x00000aec,0x00000962,0x0004007c, -+ 0x0000001b,0x00000b36,0x00000aef,0x00050082,0x0000001b,0x00000b37,0x000000a3,0x00000b36, -+ 0x0004007c,0x00000006,0x00000b38,0x00000b37,0x00050083,0x00000006,0x00000af4,0x000006a6, -+ 0x00000698,0x00050085,0x00000006,0x00000af7,0x00000af4,0x00000ab7,0x00050081,0x00000006, -+ 0x00000afa,0x00000a35,0x00000af7,0x0006000c,0x00000006,0x00000afd,0x00000001,0x00000004, -+ 0x00000af4,0x00050085,0x00000006,0x00000aff,0x00000afd,0x00000b38,0x0008000c,0x00000006, -+ 0x00000b43,0x00000001,0x0000002b,0x00000aff,0x0000009b,0x00000093,0x00050085,0x00000006, -+ 0x00000b03,0x00000b43,0x00000b43,0x00050085,0x00000006,0x00000b06,0x00000b03,0x00000ab7, -+ 0x00050081,0x00000006,0x00000b08,0x00000ae4,0x00000b06,0x00050085,0x00000006,0x00000b84, -+ 0x00000913,0x00000917,0x00050083,0x00000006,0x00000b88,0x0000069e,0x0000069c,0x0006000c, -+ 0x00000006,0x00000b8d,0x00000001,0x00000004,0x00000b88,0x0007000c,0x00000006,0x00000b90, -+ 0x00000001,0x00000028,0x00000b8d,0x00000ac8,0x0004007c,0x0000001b,0x00000be2,0x00000b90, -+ 0x00050082,0x0000001b,0x00000be3,0x000000a3,0x00000be2,0x0004007c,0x00000006,0x00000be4, -+ 0x00000be3,0x00050083,0x00000006,0x00000b95,0x0000069e,0x00000696,0x00050085,0x00000006, -+ 0x00000b98,0x00000b95,0x00000b84,0x00050081,0x00000006,0x00000b9b,0x00000ad6,0x00000b98, -+ 0x00060052,0x0000000c,0x0000116f,0x00000b9b,0x0000129d,0x00000000,0x0006000c,0x00000006, -+ 0x00000b9e,0x00000001,0x00000004,0x00000b95,0x00050085,0x00000006,0x00000ba0,0x00000b9e, -+ 0x00000be4,0x0008000c,0x00000006,0x00000bef,0x00000001,0x0000002b,0x00000ba0,0x0000009b, -+ 0x00000093,0x00050085,0x00000006,0x00000ba4,0x00000bef,0x00000bef,0x00050085,0x00000006, -+ 0x00000ba7,0x00000ba4,0x00000b84,0x00050081,0x00000006,0x00000ba9,0x00000b08,0x00000ba7, -+ 0x00050083,0x00000006,0x00000bac,0x000006a4,0x0000069c,0x0006000c,0x00000006,0x00000bb1, -+ 0x00000001,0x00000004,0x00000bac,0x0007000c,0x00000006,0x00000bb4,0x00000001,0x00000028, -+ 0x00000bb1,0x00000a27,0x0004007c,0x0000001b,0x00000bfb,0x00000bb4,0x00050082,0x0000001b, -+ 0x00000bfc,0x000000a3,0x00000bfb,0x0004007c,0x00000006,0x00000bfd,0x00000bfc,0x00050083, -+ 0x00000006,0x00000bb9,0x000006a4,0x000006a2,0x00050085,0x00000006,0x00000bbc,0x00000bb9, -+ 0x00000b84,0x00050081,0x00000006,0x00000bbf,0x00000afa,0x00000bbc,0x00060052,0x0000000c, -+ 0x00001172,0x00000bbf,0x0000116f,0x00000001,0x0006000c,0x00000006,0x00000bc2,0x00000001, -+ 0x00000004,0x00000bb9,0x00050085,0x00000006,0x00000bc4,0x00000bc2,0x00000bfd,0x0008000c, -+ 0x00000006,0x00000c08,0x00000001,0x0000002b,0x00000bc4,0x0000009b,0x00000093,0x00050085, -+ 0x00000006,0x00000bc8,0x00000c08,0x00000c08,0x00050085,0x00000006,0x00000bcb,0x00000bc8, -+ 0x00000b84,0x00050081,0x00000006,0x00000bcd,0x00000ba9,0x00000bcb,0x00050085,0x0000000c, -+ 0x000006d7,0x00001172,0x00001172,0x00050051,0x00000006,0x000006d9,0x000006d7,0x00000000, -+ 0x00050051,0x00000006,0x000006db,0x000006d7,0x00000001,0x00050081,0x00000006,0x000006dc, -+ 0x000006d9,0x000006db,0x000500b8,0x0000004f,0x000006df,0x000006dc,0x000002f5,0x0004007c, -+ 0x0000001b,0x00000c18,0x000006dc,0x000500c2,0x0000001b,0x00000c1a,0x00000c18,0x000000b1, -+ 0x00050082,0x0000001b,0x00000c1b,0x000000ac,0x00000c1a,0x0004007c,0x00000006,0x00000c1c, -+ 0x00000c1b,0x000200f9,0x000006e7,0x000200f8,0x000006e7,0x000600a9,0x00000006,0x0000129c, -+ 0x000006df,0x00000093,0x00000c1c,0x000300f7,0x000006ef,0x00000000,0x000400fa,0x000006df, -+ 0x000006ea,0x000006ec,0x000200f8,0x000006ec,0x000200f9,0x000006ef,0x000200f8,0x000006ea, -+ 0x000200f9,0x000006ef,0x000200f8,0x000006ef,0x000700f5,0x00000006,0x0000127e,0x00000b9b, -+ 0x000006ec,0x00000093,0x000006ea,0x00060052,0x0000000c,0x00001177,0x0000127e,0x00001172, -+ 0x00000000,0x00050050,0x0000000c,0x00000c2d,0x0000129c,0x0000129c,0x00050085,0x0000000c, -+ 0x000006f5,0x00001177,0x00000c2d,0x00050085,0x00000006,0x000006f8,0x00000bcd,0x00000230, -+ 0x00050085,0x00000006,0x000006fb,0x000006f8,0x000006f8,0x00050051,0x00000006,0x000006fd, -+ 0x000006f5,0x00000000,0x00050085,0x00000006,0x00000700,0x000006fd,0x000006fd,0x00050051, -+ 0x00000006,0x00000702,0x000006f5,0x00000001,0x00050085,0x00000006,0x00000705,0x00000702, -+ 0x00000702,0x00050081,0x00000006,0x00000706,0x00000700,0x00000705,0x0006000c,0x00000006, -+ 0x00000709,0x00000001,0x00000004,0x000006fd,0x0006000c,0x00000006,0x0000070c,0x00000001, -+ 0x00000004,0x00000702,0x0007000c,0x00000006,0x0000070d,0x00000001,0x00000028,0x00000709, -+ 0x0000070c,0x0004007c,0x0000001b,0x00000c36,0x0000070d,0x00050082,0x0000001b,0x00000c37, -+ 0x000000a3,0x00000c36,0x0004007c,0x00000006,0x00000c38,0x00000c37,0x00050085,0x00000006, -+ 0x0000070f,0x00000706,0x00000c38,0x00050083,0x00000006,0x00000713,0x0000070f,0x00000093, -+ 0x00050085,0x00000006,0x00000715,0x00000713,0x000006fb,0x00050081,0x00000006,0x00000716, -+ 0x00000093,0x00000715,0x00050085,0x00000006,0x0000071a,0x0000033e,0x000006fb,0x00050081, -+ 0x00000006,0x0000071b,0x00000093,0x0000071a,0x00050050,0x0000000c,0x0000071c,0x00000716, -+ 0x0000071b,0x00050085,0x00000006,0x00000720,0x00000348,0x000006fb,0x00050081,0x00000006, -+ 0x00000721,0x00000230,0x00000720,0x0004007c,0x0000001b,0x00000c53,0x00000721,0x00050082, -+ 0x0000001b,0x00000c54,0x000000a3,0x00000c53,0x0004007c,0x00000006,0x00000c55,0x00000c54, -+ 0x00050051,0x00000006,0x00000725,0x00000865,0x00000002,0x00050051,0x00000006,0x00000727, -+ 0x0000086f,0x00000002,0x00050051,0x00000006,0x00000729,0x00000879,0x00000002,0x00060050, -+ 0x00000011,0x0000072a,0x00000725,0x00000727,0x00000729,0x00050051,0x00000006,0x0000072c, -+ 0x00000883,0x00000003,0x00050051,0x00000006,0x0000072e,0x0000088d,0x00000003,0x00050051, -+ 0x00000006,0x00000730,0x00000897,0x00000003,0x00060050,0x00000011,0x00000731,0x0000072c, -+ 0x0000072e,0x00000730,0x00050051,0x00000006,0x00000733,0x00000865,0x00000001,0x00050051, -+ 0x00000006,0x00000735,0x0000086f,0x00000001,0x00050051,0x00000006,0x00000737,0x00000879, -+ 0x00000001,0x00060050,0x00000011,0x00000738,0x00000733,0x00000735,0x00000737,0x0007000c, -+ 0x00000011,0x00000c5e,0x00000001,0x00000025,0x00000731,0x00000738,0x0007000c,0x00000011, -+ 0x00000c5f,0x00000001,0x00000025,0x0000072a,0x00000c5e,0x00050051,0x00000006,0x0000073b, -+ 0x00000883,0x00000000,0x00050051,0x00000006,0x0000073d,0x0000088d,0x00000000,0x00050051, -+ 0x00000006,0x0000073f,0x00000897,0x00000000,0x00060050,0x00000011,0x00000740,0x0000073b, -+ 0x0000073d,0x0000073f,0x0007000c,0x00000011,0x00000741,0x00000001,0x00000025,0x00000c5f, -+ 0x00000740,0x0007000c,0x00000011,0x00000c65,0x00000001,0x00000028,0x00000731,0x00000738, -+ 0x0007000c,0x00000011,0x00000c66,0x00000001,0x00000028,0x0000072a,0x00000c65,0x0007000c, -+ 0x00000011,0x0000075f,0x00000001,0x00000028,0x00000c66,0x00000740,0x00050083,0x0000000c, -+ 0x00000763,0x0000039c,0x0000062b,0x00050051,0x00000006,0x00000765,0x00000847,0x00000000, -+ 0x00050051,0x00000006,0x00000767,0x00000851,0x00000000,0x00050051,0x00000006,0x00000769, -+ 0x0000085b,0x00000000,0x00060050,0x00000011,0x0000076a,0x00000765,0x00000767,0x00000769, -+ 0x00050051,0x00000006,0x00000c7c,0x00000763,0x00000000,0x00050085,0x00000006,0x00000c7f, -+ 0x00000c7c,0x000006fd,0x00050051,0x00000006,0x00000c81,0x00000763,0x00000001,0x00050085, -+ 0x00000006,0x00000c84,0x00000c81,0x00000702,0x00050081,0x00000006,0x00000c85,0x00000c7f, -+ 0x00000c84,0x00060052,0x0000000c,0x0000119e,0x00000c85,0x0000129d,0x00000000,0x0004007f, -+ 0x00000006,0x00000c8b,0x00000702,0x00050085,0x00000006,0x00000c8c,0x00000c7c,0x00000c8b, -+ 0x00050085,0x00000006,0x00000c91,0x00000c81,0x000006fd,0x00050081,0x00000006,0x00000c92, -+ 0x00000c8c,0x00000c91,0x00060052,0x0000000c,0x000011a4,0x00000c92,0x0000119e,0x00000001, -+ 0x00050085,0x0000000c,0x00000c96,0x000011a4,0x0000071c,0x00050051,0x00000006,0x00000c98, -+ 0x00000c96,0x00000000,0x00050085,0x00000006,0x00000c9b,0x00000c98,0x00000c98,0x00050051, -+ 0x00000006,0x00000c9d,0x00000c96,0x00000001,0x00050085,0x00000006,0x00000ca0,0x00000c9d, -+ 0x00000c9d,0x00050081,0x00000006,0x00000ca1,0x00000c9b,0x00000ca0,0x0007000c,0x00000006, -+ 0x00000ca4,0x00000001,0x00000025,0x00000ca1,0x00000c55,0x00050085,0x00000006,0x00000ca7, -+ 0x0000010d,0x00000ca4,0x00050081,0x00000006,0x00000ca9,0x00000ca7,0x00000112,0x00050085, -+ 0x00000006,0x00000cac,0x00000721,0x00000ca4,0x00050081,0x00000006,0x00000cae,0x00000cac, -+ 0x00000112,0x00050085,0x00000006,0x00000cb1,0x00000ca9,0x00000ca9,0x00050085,0x00000006, -+ 0x00000cb4,0x00000cae,0x00000cae,0x00050085,0x00000006,0x00000cb7,0x00000123,0x00000cb1, -+ 0x00050081,0x00000006,0x00000cb9,0x00000cb7,0x00000128,0x00050085,0x00000006,0x00000cbc, -+ 0x00000cb9,0x00000cb4,0x0005008e,0x00000011,0x00000cbf,0x0000076a,0x00000cbc,0x00050083, -+ 0x0000000c,0x00000775,0x000003b7,0x0000062b,0x00050051,0x00000006,0x00000777,0x00000847, -+ 0x00000001,0x00050051,0x00000006,0x00000779,0x00000851,0x00000001,0x00050051,0x00000006, -+ 0x0000077b,0x0000085b,0x00000001,0x00060050,0x00000011,0x0000077c,0x00000777,0x00000779, -+ 0x0000077b,0x00050051,0x00000006,0x00000ce0,0x00000775,0x00000000,0x00050085,0x00000006, -+ 0x00000ce3,0x00000ce0,0x000006fd,0x00050051,0x00000006,0x00000ce5,0x00000775,0x00000001, -+ 0x00050085,0x00000006,0x00000ce8,0x00000ce5,0x00000702,0x00050081,0x00000006,0x00000ce9, -+ 0x00000ce3,0x00000ce8,0x00060052,0x0000000c,0x000011b1,0x00000ce9,0x0000129d,0x00000000, -+ 0x00050085,0x00000006,0x00000cf0,0x00000ce0,0x00000c8b,0x00050085,0x00000006,0x00000cf5, -+ 0x00000ce5,0x000006fd,0x00050081,0x00000006,0x00000cf6,0x00000cf0,0x00000cf5,0x00060052, -+ 0x0000000c,0x000011b7,0x00000cf6,0x000011b1,0x00000001,0x00050085,0x0000000c,0x00000cfa, -+ 0x000011b7,0x0000071c,0x00050051,0x00000006,0x00000cfc,0x00000cfa,0x00000000,0x00050085, -+ 0x00000006,0x00000cff,0x00000cfc,0x00000cfc,0x00050051,0x00000006,0x00000d01,0x00000cfa, -+ 0x00000001,0x00050085,0x00000006,0x00000d04,0x00000d01,0x00000d01,0x00050081,0x00000006, -+ 0x00000d05,0x00000cff,0x00000d04,0x0007000c,0x00000006,0x00000d08,0x00000001,0x00000025, -+ 0x00000d05,0x00000c55,0x00050085,0x00000006,0x00000d0b,0x0000010d,0x00000d08,0x00050081, -+ 0x00000006,0x00000d0d,0x00000d0b,0x00000112,0x00050085,0x00000006,0x00000d10,0x00000721, -+ 0x00000d08,0x00050081,0x00000006,0x00000d12,0x00000d10,0x00000112,0x00050085,0x00000006, -+ 0x00000d15,0x00000d0d,0x00000d0d,0x00050085,0x00000006,0x00000d18,0x00000d12,0x00000d12, -+ 0x00050085,0x00000006,0x00000d1b,0x00000123,0x00000d15,0x00050081,0x00000006,0x00000d1d, -+ 0x00000d1b,0x00000128,0x00050085,0x00000006,0x00000d20,0x00000d1d,0x00000d18,0x0005008e, -+ 0x00000011,0x00000d23,0x0000077c,0x00000d20,0x00050081,0x00000011,0x00000d25,0x00000cbf, -+ 0x00000d23,0x00050081,0x00000006,0x00000d28,0x00000cbc,0x00000d20,0x00050083,0x0000000c, -+ 0x00000787,0x000003d2,0x0000062b,0x00050051,0x00000006,0x00000789,0x00000865,0x00000000, -+ 0x00050051,0x00000006,0x0000078b,0x0000086f,0x00000000,0x00050051,0x00000006,0x0000078d, -+ 0x00000879,0x00000000,0x00060050,0x00000011,0x0000078e,0x00000789,0x0000078b,0x0000078d, -+ 0x00050051,0x00000006,0x00000d44,0x00000787,0x00000000,0x00050085,0x00000006,0x00000d47, -+ 0x00000d44,0x000006fd,0x00050051,0x00000006,0x00000d49,0x00000787,0x00000001,0x00050085, -+ 0x00000006,0x00000d4c,0x00000d49,0x00000702,0x00050081,0x00000006,0x00000d4d,0x00000d47, -+ 0x00000d4c,0x00060052,0x0000000c,0x000011c4,0x00000d4d,0x0000129d,0x00000000,0x00050085, -+ 0x00000006,0x00000d54,0x00000d44,0x00000c8b,0x00050085,0x00000006,0x00000d59,0x00000d49, -+ 0x000006fd,0x00050081,0x00000006,0x00000d5a,0x00000d54,0x00000d59,0x00060052,0x0000000c, -+ 0x000011ca,0x00000d5a,0x000011c4,0x00000001,0x00050085,0x0000000c,0x00000d5e,0x000011ca, -+ 0x0000071c,0x00050051,0x00000006,0x00000d60,0x00000d5e,0x00000000,0x00050085,0x00000006, -+ 0x00000d63,0x00000d60,0x00000d60,0x00050051,0x00000006,0x00000d65,0x00000d5e,0x00000001, -+ 0x00050085,0x00000006,0x00000d68,0x00000d65,0x00000d65,0x00050081,0x00000006,0x00000d69, -+ 0x00000d63,0x00000d68,0x0007000c,0x00000006,0x00000d6c,0x00000001,0x00000025,0x00000d69, -+ 0x00000c55,0x00050085,0x00000006,0x00000d6f,0x0000010d,0x00000d6c,0x00050081,0x00000006, -+ 0x00000d71,0x00000d6f,0x00000112,0x00050085,0x00000006,0x00000d74,0x00000721,0x00000d6c, -+ 0x00050081,0x00000006,0x00000d76,0x00000d74,0x00000112,0x00050085,0x00000006,0x00000d79, -+ 0x00000d71,0x00000d71,0x00050085,0x00000006,0x00000d7c,0x00000d76,0x00000d76,0x00050085, -+ 0x00000006,0x00000d7f,0x00000123,0x00000d79,0x00050081,0x00000006,0x00000d81,0x00000d7f, -+ 0x00000128,0x00050085,0x00000006,0x00000d84,0x00000d81,0x00000d7c,0x0005008e,0x00000011, -+ 0x00000d87,0x0000078e,0x00000d84,0x00050081,0x00000011,0x00000d89,0x00000d25,0x00000d87, -+ 0x00050081,0x00000006,0x00000d8c,0x00000d28,0x00000d84,0x00050083,0x0000000c,0x00000799, -+ 0x000003ed,0x0000062b,0x00050051,0x00000006,0x00000da8,0x00000799,0x00000000,0x00050085, -+ 0x00000006,0x00000dab,0x00000da8,0x000006fd,0x00050051,0x00000006,0x00000dad,0x00000799, -+ 0x00000001,0x00050085,0x00000006,0x00000db0,0x00000dad,0x00000702,0x00050081,0x00000006, -+ 0x00000db1,0x00000dab,0x00000db0,0x00060052,0x0000000c,0x000011d7,0x00000db1,0x0000129d, -+ 0x00000000,0x00050085,0x00000006,0x00000db8,0x00000da8,0x00000c8b,0x00050085,0x00000006, -+ 0x00000dbd,0x00000dad,0x000006fd,0x00050081,0x00000006,0x00000dbe,0x00000db8,0x00000dbd, -+ 0x00060052,0x0000000c,0x000011dd,0x00000dbe,0x000011d7,0x00000001,0x00050085,0x0000000c, -+ 0x00000dc2,0x000011dd,0x0000071c,0x00050051,0x00000006,0x00000dc4,0x00000dc2,0x00000000, -+ 0x00050085,0x00000006,0x00000dc7,0x00000dc4,0x00000dc4,0x00050051,0x00000006,0x00000dc9, -+ 0x00000dc2,0x00000001,0x00050085,0x00000006,0x00000dcc,0x00000dc9,0x00000dc9,0x00050081, -+ 0x00000006,0x00000dcd,0x00000dc7,0x00000dcc,0x0007000c,0x00000006,0x00000dd0,0x00000001, -+ 0x00000025,0x00000dcd,0x00000c55,0x00050085,0x00000006,0x00000dd3,0x0000010d,0x00000dd0, -+ 0x00050081,0x00000006,0x00000dd5,0x00000dd3,0x00000112,0x00050085,0x00000006,0x00000dd8, -+ 0x00000721,0x00000dd0,0x00050081,0x00000006,0x00000dda,0x00000dd8,0x00000112,0x00050085, -+ 0x00000006,0x00000ddd,0x00000dd5,0x00000dd5,0x00050085,0x00000006,0x00000de0,0x00000dda, -+ 0x00000dda,0x00050085,0x00000006,0x00000de3,0x00000123,0x00000ddd,0x00050081,0x00000006, -+ 0x00000de5,0x00000de3,0x00000128,0x00050085,0x00000006,0x00000de8,0x00000de5,0x00000de0, -+ 0x0005008e,0x00000011,0x00000deb,0x00000738,0x00000de8,0x00050081,0x00000011,0x00000ded, -+ 0x00000d89,0x00000deb,0x00050081,0x00000006,0x00000df0,0x00000d8c,0x00000de8,0x0004007f, -+ 0x0000000c,0x000007ab,0x0000062b,0x00050051,0x00000006,0x00000e0c,0x000007ab,0x00000000, -+ 0x00050085,0x00000006,0x00000e0f,0x00000e0c,0x000006fd,0x00050051,0x00000006,0x00000e11, -+ 0x000007ab,0x00000001,0x00050085,0x00000006,0x00000e14,0x00000e11,0x00000702,0x00050081, -+ 0x00000006,0x00000e15,0x00000e0f,0x00000e14,0x00060052,0x0000000c,0x000011ea,0x00000e15, -+ 0x0000129d,0x00000000,0x00050085,0x00000006,0x00000e1c,0x00000e0c,0x00000c8b,0x00050085, -+ 0x00000006,0x00000e21,0x00000e11,0x000006fd,0x00050081,0x00000006,0x00000e22,0x00000e1c, -+ 0x00000e21,0x00060052,0x0000000c,0x000011f0,0x00000e22,0x000011ea,0x00000001,0x00050085, -+ 0x0000000c,0x00000e26,0x000011f0,0x0000071c,0x00050051,0x00000006,0x00000e28,0x00000e26, -+ 0x00000000,0x00050085,0x00000006,0x00000e2b,0x00000e28,0x00000e28,0x00050051,0x00000006, -+ 0x00000e2d,0x00000e26,0x00000001,0x00050085,0x00000006,0x00000e30,0x00000e2d,0x00000e2d, -+ 0x00050081,0x00000006,0x00000e31,0x00000e2b,0x00000e30,0x0007000c,0x00000006,0x00000e34, -+ 0x00000001,0x00000025,0x00000e31,0x00000c55,0x00050085,0x00000006,0x00000e37,0x0000010d, -+ 0x00000e34,0x00050081,0x00000006,0x00000e39,0x00000e37,0x00000112,0x00050085,0x00000006, -+ 0x00000e3c,0x00000721,0x00000e34,0x00050081,0x00000006,0x00000e3e,0x00000e3c,0x00000112, -+ 0x00050085,0x00000006,0x00000e41,0x00000e39,0x00000e39,0x00050085,0x00000006,0x00000e44, -+ 0x00000e3e,0x00000e3e,0x00050085,0x00000006,0x00000e47,0x00000123,0x00000e41,0x00050081, -+ 0x00000006,0x00000e49,0x00000e47,0x00000128,0x00050085,0x00000006,0x00000e4c,0x00000e49, -+ 0x00000e44,0x0005008e,0x00000011,0x00000e4f,0x0000072a,0x00000e4c,0x00050081,0x00000011, -+ 0x00000e51,0x00000ded,0x00000e4f,0x00050081,0x00000006,0x00000e54,0x00000df0,0x00000e4c, -+ 0x00050083,0x0000000c,0x000007bd,0x00000423,0x0000062b,0x00050051,0x00000006,0x000007bf, -+ 0x00000865,0x00000003,0x00050051,0x00000006,0x000007c1,0x0000086f,0x00000003,0x00050051, -+ 0x00000006,0x000007c3,0x00000879,0x00000003,0x00060050,0x00000011,0x000007c4,0x000007bf, -+ 0x000007c1,0x000007c3,0x00050051,0x00000006,0x00000e70,0x000007bd,0x00000000,0x00050085, -+ 0x00000006,0x00000e73,0x00000e70,0x000006fd,0x00050051,0x00000006,0x00000e75,0x000007bd, -+ 0x00000001,0x00050085,0x00000006,0x00000e78,0x00000e75,0x00000702,0x00050081,0x00000006, -+ 0x00000e79,0x00000e73,0x00000e78,0x00060052,0x0000000c,0x000011fd,0x00000e79,0x0000129d, -+ 0x00000000,0x00050085,0x00000006,0x00000e80,0x00000e70,0x00000c8b,0x00050085,0x00000006, -+ 0x00000e85,0x00000e75,0x000006fd,0x00050081,0x00000006,0x00000e86,0x00000e80,0x00000e85, -+ 0x00060052,0x0000000c,0x00001203,0x00000e86,0x000011fd,0x00000001,0x00050085,0x0000000c, -+ 0x00000e8a,0x00001203,0x0000071c,0x00050051,0x00000006,0x00000e8c,0x00000e8a,0x00000000, -+ 0x00050085,0x00000006,0x00000e8f,0x00000e8c,0x00000e8c,0x00050051,0x00000006,0x00000e91, -+ 0x00000e8a,0x00000001,0x00050085,0x00000006,0x00000e94,0x00000e91,0x00000e91,0x00050081, -+ 0x00000006,0x00000e95,0x00000e8f,0x00000e94,0x0007000c,0x00000006,0x00000e98,0x00000001, -+ 0x00000025,0x00000e95,0x00000c55,0x00050085,0x00000006,0x00000e9b,0x0000010d,0x00000e98, -+ 0x00050081,0x00000006,0x00000e9d,0x00000e9b,0x00000112,0x00050085,0x00000006,0x00000ea0, -+ 0x00000721,0x00000e98,0x00050081,0x00000006,0x00000ea2,0x00000ea0,0x00000112,0x00050085, -+ 0x00000006,0x00000ea5,0x00000e9d,0x00000e9d,0x00050085,0x00000006,0x00000ea8,0x00000ea2, -+ 0x00000ea2,0x00050085,0x00000006,0x00000eab,0x00000123,0x00000ea5,0x00050081,0x00000006, -+ 0x00000ead,0x00000eab,0x00000128,0x00050085,0x00000006,0x00000eb0,0x00000ead,0x00000ea8, -+ 0x0005008e,0x00000011,0x00000eb3,0x000007c4,0x00000eb0,0x00050081,0x00000011,0x00000eb5, -+ 0x00000e51,0x00000eb3,0x00050081,0x00000006,0x00000eb8,0x00000e54,0x00000eb0,0x00050083, -+ 0x0000000c,0x000007cf,0x0000043e,0x0000062b,0x00050051,0x00000006,0x00000ed4,0x000007cf, -+ 0x00000000,0x00050085,0x00000006,0x00000ed7,0x00000ed4,0x000006fd,0x00050051,0x00000006, -+ 0x00000ed9,0x000007cf,0x00000001,0x00050085,0x00000006,0x00000edc,0x00000ed9,0x00000702, -+ 0x00050081,0x00000006,0x00000edd,0x00000ed7,0x00000edc,0x00060052,0x0000000c,0x00001210, -+ 0x00000edd,0x0000129d,0x00000000,0x00050085,0x00000006,0x00000ee4,0x00000ed4,0x00000c8b, -+ 0x00050085,0x00000006,0x00000ee9,0x00000ed9,0x000006fd,0x00050081,0x00000006,0x00000eea, -+ 0x00000ee4,0x00000ee9,0x00060052,0x0000000c,0x00001216,0x00000eea,0x00001210,0x00000001, -+ 0x00050085,0x0000000c,0x00000eee,0x00001216,0x0000071c,0x00050051,0x00000006,0x00000ef0, -+ 0x00000eee,0x00000000,0x00050085,0x00000006,0x00000ef3,0x00000ef0,0x00000ef0,0x00050051, -+ 0x00000006,0x00000ef5,0x00000eee,0x00000001,0x00050085,0x00000006,0x00000ef8,0x00000ef5, -+ 0x00000ef5,0x00050081,0x00000006,0x00000ef9,0x00000ef3,0x00000ef8,0x0007000c,0x00000006, -+ 0x00000efc,0x00000001,0x00000025,0x00000ef9,0x00000c55,0x00050085,0x00000006,0x00000eff, -+ 0x0000010d,0x00000efc,0x00050081,0x00000006,0x00000f01,0x00000eff,0x00000112,0x00050085, -+ 0x00000006,0x00000f04,0x00000721,0x00000efc,0x00050081,0x00000006,0x00000f06,0x00000f04, -+ 0x00000112,0x00050085,0x00000006,0x00000f09,0x00000f01,0x00000f01,0x00050085,0x00000006, -+ 0x00000f0c,0x00000f06,0x00000f06,0x00050085,0x00000006,0x00000f0f,0x00000123,0x00000f09, -+ 0x00050081,0x00000006,0x00000f11,0x00000f0f,0x00000128,0x00050085,0x00000006,0x00000f14, -+ 0x00000f11,0x00000f0c,0x0005008e,0x00000011,0x00000f17,0x00000740,0x00000f14,0x00050081, -+ 0x00000011,0x00000f19,0x00000eb5,0x00000f17,0x00050081,0x00000006,0x00000f1c,0x00000eb8, -+ 0x00000f14,0x00050083,0x0000000c,0x000007e1,0x0000045a,0x0000062b,0x00050051,0x00000006, -+ 0x000007e3,0x00000883,0x00000001,0x00050051,0x00000006,0x000007e5,0x0000088d,0x00000001, -+ 0x00050051,0x00000006,0x000007e7,0x00000897,0x00000001,0x00060050,0x00000011,0x000007e8, -+ 0x000007e3,0x000007e5,0x000007e7,0x00050051,0x00000006,0x00000f38,0x000007e1,0x00000000, -+ 0x00050085,0x00000006,0x00000f3b,0x00000f38,0x000006fd,0x00050051,0x00000006,0x00000f3d, -+ 0x000007e1,0x00000001,0x00050085,0x00000006,0x00000f40,0x00000f3d,0x00000702,0x00050081, -+ 0x00000006,0x00000f41,0x00000f3b,0x00000f40,0x00060052,0x0000000c,0x00001223,0x00000f41, -+ 0x0000129d,0x00000000,0x00050085,0x00000006,0x00000f48,0x00000f38,0x00000c8b,0x00050085, -+ 0x00000006,0x00000f4d,0x00000f3d,0x000006fd,0x00050081,0x00000006,0x00000f4e,0x00000f48, -+ 0x00000f4d,0x00060052,0x0000000c,0x00001229,0x00000f4e,0x00001223,0x00000001,0x00050085, -+ 0x0000000c,0x00000f52,0x00001229,0x0000071c,0x00050051,0x00000006,0x00000f54,0x00000f52, -+ 0x00000000,0x00050085,0x00000006,0x00000f57,0x00000f54,0x00000f54,0x00050051,0x00000006, -+ 0x00000f59,0x00000f52,0x00000001,0x00050085,0x00000006,0x00000f5c,0x00000f59,0x00000f59, -+ 0x00050081,0x00000006,0x00000f5d,0x00000f57,0x00000f5c,0x0007000c,0x00000006,0x00000f60, -+ 0x00000001,0x00000025,0x00000f5d,0x00000c55,0x00050085,0x00000006,0x00000f63,0x0000010d, -+ 0x00000f60,0x00050081,0x00000006,0x00000f65,0x00000f63,0x00000112,0x00050085,0x00000006, -+ 0x00000f68,0x00000721,0x00000f60,0x00050081,0x00000006,0x00000f6a,0x00000f68,0x00000112, -+ 0x00050085,0x00000006,0x00000f6d,0x00000f65,0x00000f65,0x00050085,0x00000006,0x00000f70, -+ 0x00000f6a,0x00000f6a,0x00050085,0x00000006,0x00000f73,0x00000123,0x00000f6d,0x00050081, -+ 0x00000006,0x00000f75,0x00000f73,0x00000128,0x00050085,0x00000006,0x00000f78,0x00000f75, -+ 0x00000f70,0x0005008e,0x00000011,0x00000f7b,0x000007e8,0x00000f78,0x00050081,0x00000011, -+ 0x00000f7d,0x00000f19,0x00000f7b,0x00050081,0x00000006,0x00000f80,0x00000f1c,0x00000f78, -+ 0x00050083,0x0000000c,0x000007f3,0x00000475,0x0000062b,0x00050051,0x00000006,0x000007f5, -+ 0x00000883,0x00000002,0x00050051,0x00000006,0x000007f7,0x0000088d,0x00000002,0x00050051, -+ 0x00000006,0x000007f9,0x00000897,0x00000002,0x00060050,0x00000011,0x000007fa,0x000007f5, -+ 0x000007f7,0x000007f9,0x00050051,0x00000006,0x00000f9c,0x000007f3,0x00000000,0x00050085, -+ 0x00000006,0x00000f9f,0x00000f9c,0x000006fd,0x00050051,0x00000006,0x00000fa1,0x000007f3, -+ 0x00000001,0x00050085,0x00000006,0x00000fa4,0x00000fa1,0x00000702,0x00050081,0x00000006, -+ 0x00000fa5,0x00000f9f,0x00000fa4,0x00060052,0x0000000c,0x00001236,0x00000fa5,0x0000129d, -+ 0x00000000,0x00050085,0x00000006,0x00000fac,0x00000f9c,0x00000c8b,0x00050085,0x00000006, -+ 0x00000fb1,0x00000fa1,0x000006fd,0x00050081,0x00000006,0x00000fb2,0x00000fac,0x00000fb1, -+ 0x00060052,0x0000000c,0x0000123c,0x00000fb2,0x00001236,0x00000001,0x00050085,0x0000000c, -+ 0x00000fb6,0x0000123c,0x0000071c,0x00050051,0x00000006,0x00000fb8,0x00000fb6,0x00000000, -+ 0x00050085,0x00000006,0x00000fbb,0x00000fb8,0x00000fb8,0x00050051,0x00000006,0x00000fbd, -+ 0x00000fb6,0x00000001,0x00050085,0x00000006,0x00000fc0,0x00000fbd,0x00000fbd,0x00050081, -+ 0x00000006,0x00000fc1,0x00000fbb,0x00000fc0,0x0007000c,0x00000006,0x00000fc4,0x00000001, -+ 0x00000025,0x00000fc1,0x00000c55,0x00050085,0x00000006,0x00000fc7,0x0000010d,0x00000fc4, -+ 0x00050081,0x00000006,0x00000fc9,0x00000fc7,0x00000112,0x00050085,0x00000006,0x00000fcc, -+ 0x00000721,0x00000fc4,0x00050081,0x00000006,0x00000fce,0x00000fcc,0x00000112,0x00050085, -+ 0x00000006,0x00000fd1,0x00000fc9,0x00000fc9,0x00050085,0x00000006,0x00000fd4,0x00000fce, -+ 0x00000fce,0x00050085,0x00000006,0x00000fd7,0x00000123,0x00000fd1,0x00050081,0x00000006, -+ 0x00000fd9,0x00000fd7,0x00000128,0x00050085,0x00000006,0x00000fdc,0x00000fd9,0x00000fd4, -+ 0x0005008e,0x00000011,0x00000fdf,0x000007fa,0x00000fdc,0x00050081,0x00000011,0x00000fe1, -+ 0x00000f7d,0x00000fdf,0x00050081,0x00000006,0x00000fe4,0x00000f80,0x00000fdc,0x00050083, -+ 0x0000000c,0x00000805,0x00000490,0x0000062b,0x00050051,0x00000006,0x00001000,0x00000805, -+ 0x00000000,0x00050085,0x00000006,0x00001003,0x00001000,0x000006fd,0x00050051,0x00000006, -+ 0x00001005,0x00000805,0x00000001,0x00050085,0x00000006,0x00001008,0x00001005,0x00000702, -+ 0x00050081,0x00000006,0x00001009,0x00001003,0x00001008,0x00060052,0x0000000c,0x00001249, -+ 0x00001009,0x0000129d,0x00000000,0x00050085,0x00000006,0x00001010,0x00001000,0x00000c8b, -+ 0x00050085,0x00000006,0x00001015,0x00001005,0x000006fd,0x00050081,0x00000006,0x00001016, -+ 0x00001010,0x00001015,0x00060052,0x0000000c,0x0000124f,0x00001016,0x00001249,0x00000001, -+ 0x00050085,0x0000000c,0x0000101a,0x0000124f,0x0000071c,0x00050051,0x00000006,0x0000101c, -+ 0x0000101a,0x00000000,0x00050085,0x00000006,0x0000101f,0x0000101c,0x0000101c,0x00050051, -+ 0x00000006,0x00001021,0x0000101a,0x00000001,0x00050085,0x00000006,0x00001024,0x00001021, -+ 0x00001021,0x00050081,0x00000006,0x00001025,0x0000101f,0x00001024,0x0007000c,0x00000006, -+ 0x00001028,0x00000001,0x00000025,0x00001025,0x00000c55,0x00050085,0x00000006,0x0000102b, -+ 0x0000010d,0x00001028,0x00050081,0x00000006,0x0000102d,0x0000102b,0x00000112,0x00050085, -+ 0x00000006,0x00001030,0x00000721,0x00001028,0x00050081,0x00000006,0x00001032,0x00001030, -+ 0x00000112,0x00050085,0x00000006,0x00001035,0x0000102d,0x0000102d,0x00050085,0x00000006, -+ 0x00001038,0x00001032,0x00001032,0x00050085,0x00000006,0x0000103b,0x00000123,0x00001035, -+ 0x00050081,0x00000006,0x0000103d,0x0000103b,0x00000128,0x00050085,0x00000006,0x00001040, -+ 0x0000103d,0x00001038,0x0005008e,0x00000011,0x00001043,0x00000731,0x00001040,0x00050081, -+ 0x00000011,0x00001045,0x00000fe1,0x00001043,0x00050081,0x00000006,0x00001048,0x00000fe4, -+ 0x00001040,0x00050083,0x0000000c,0x00000817,0x000004ab,0x0000062b,0x00050051,0x00000006, -+ 0x00000819,0x000008a1,0x00000002,0x00050051,0x00000006,0x0000081b,0x000008ab,0x00000002, -+ 0x00050051,0x00000006,0x0000081d,0x000008b5,0x00000002,0x00060050,0x00000011,0x0000081e, -+ 0x00000819,0x0000081b,0x0000081d,0x00050051,0x00000006,0x00001064,0x00000817,0x00000000, -+ 0x00050085,0x00000006,0x00001067,0x00001064,0x000006fd,0x00050051,0x00000006,0x00001069, -+ 0x00000817,0x00000001,0x00050085,0x00000006,0x0000106c,0x00001069,0x00000702,0x00050081, -+ 0x00000006,0x0000106d,0x00001067,0x0000106c,0x00060052,0x0000000c,0x0000125c,0x0000106d, -+ 0x0000129d,0x00000000,0x00050085,0x00000006,0x00001074,0x00001064,0x00000c8b,0x00050085, -+ 0x00000006,0x00001079,0x00001069,0x000006fd,0x00050081,0x00000006,0x0000107a,0x00001074, -+ 0x00001079,0x00060052,0x0000000c,0x00001262,0x0000107a,0x0000125c,0x00000001,0x00050085, -+ 0x0000000c,0x0000107e,0x00001262,0x0000071c,0x00050051,0x00000006,0x00001080,0x0000107e, -+ 0x00000000,0x00050085,0x00000006,0x00001083,0x00001080,0x00001080,0x00050051,0x00000006, -+ 0x00001085,0x0000107e,0x00000001,0x00050085,0x00000006,0x00001088,0x00001085,0x00001085, -+ 0x00050081,0x00000006,0x00001089,0x00001083,0x00001088,0x0007000c,0x00000006,0x0000108c, -+ 0x00000001,0x00000025,0x00001089,0x00000c55,0x00050085,0x00000006,0x0000108f,0x0000010d, -+ 0x0000108c,0x00050081,0x00000006,0x00001091,0x0000108f,0x00000112,0x00050085,0x00000006, -+ 0x00001094,0x00000721,0x0000108c,0x00050081,0x00000006,0x00001096,0x00001094,0x00000112, -+ 0x00050085,0x00000006,0x00001099,0x00001091,0x00001091,0x00050085,0x00000006,0x0000109c, -+ 0x00001096,0x00001096,0x00050085,0x00000006,0x0000109f,0x00000123,0x00001099,0x00050081, -+ 0x00000006,0x000010a1,0x0000109f,0x00000128,0x00050085,0x00000006,0x000010a4,0x000010a1, -+ 0x0000109c,0x0005008e,0x00000011,0x000010a7,0x0000081e,0x000010a4,0x00050081,0x00000011, -+ 0x000010a9,0x00001045,0x000010a7,0x00050081,0x00000006,0x000010ac,0x00001048,0x000010a4, -+ 0x00050083,0x0000000c,0x00000829,0x000004c6,0x0000062b,0x00050051,0x00000006,0x0000082b, -+ 0x000008a1,0x00000003,0x00050051,0x00000006,0x0000082d,0x000008ab,0x00000003,0x00050051, -+ 0x00000006,0x0000082f,0x000008b5,0x00000003,0x00060050,0x00000011,0x00000830,0x0000082b, -+ 0x0000082d,0x0000082f,0x00050051,0x00000006,0x000010c8,0x00000829,0x00000000,0x00050085, -+ 0x00000006,0x000010cb,0x000010c8,0x000006fd,0x00050051,0x00000006,0x000010cd,0x00000829, -+ 0x00000001,0x00050085,0x00000006,0x000010d0,0x000010cd,0x00000702,0x00050081,0x00000006, -+ 0x000010d1,0x000010cb,0x000010d0,0x00060052,0x0000000c,0x0000126f,0x000010d1,0x0000129d, -+ 0x00000000,0x00050085,0x00000006,0x000010d8,0x000010c8,0x00000c8b,0x00050085,0x00000006, -+ 0x000010dd,0x000010cd,0x000006fd,0x00050081,0x00000006,0x000010de,0x000010d8,0x000010dd, -+ 0x00060052,0x0000000c,0x00001275,0x000010de,0x0000126f,0x00000001,0x00050085,0x0000000c, -+ 0x000010e2,0x00001275,0x0000071c,0x00050051,0x00000006,0x000010e4,0x000010e2,0x00000000, -+ 0x00050085,0x00000006,0x000010e7,0x000010e4,0x000010e4,0x00050051,0x00000006,0x000010e9, -+ 0x000010e2,0x00000001,0x00050085,0x00000006,0x000010ec,0x000010e9,0x000010e9,0x00050081, -+ 0x00000006,0x000010ed,0x000010e7,0x000010ec,0x0007000c,0x00000006,0x000010f0,0x00000001, -+ 0x00000025,0x000010ed,0x00000c55,0x00050085,0x00000006,0x000010f3,0x0000010d,0x000010f0, -+ 0x00050081,0x00000006,0x000010f5,0x000010f3,0x00000112,0x00050085,0x00000006,0x000010f8, -+ 0x00000721,0x000010f0,0x00050081,0x00000006,0x000010fa,0x000010f8,0x00000112,0x00050085, -+ 0x00000006,0x000010fd,0x000010f5,0x000010f5,0x00050085,0x00000006,0x00001100,0x000010fa, -+ 0x000010fa,0x00050085,0x00000006,0x00001103,0x00000123,0x000010fd,0x00050081,0x00000006, -+ 0x00001105,0x00001103,0x00000128,0x00050085,0x00000006,0x00001108,0x00001105,0x00001100, -+ 0x0005008e,0x00000011,0x0000110b,0x00000830,0x00001108,0x00050081,0x00000011,0x0000110d, -+ 0x000010a9,0x0000110b,0x00050081,0x00000006,0x00001110,0x000010ac,0x00001108,0x00050088, -+ 0x00000006,0x00001125,0x00000093,0x00001110,0x00060050,0x00000011,0x0000112e,0x00001125, -+ 0x00001125,0x00001125,0x00050085,0x00000011,0x00000840,0x0000110d,0x0000112e,0x0007000c, -+ 0x00000011,0x00000841,0x00000001,0x00000028,0x00000741,0x00000840,0x0007000c,0x00000011, -+ 0x00000842,0x00000001,0x00000025,0x0000075f,0x00000841,0x0004003d,0x00000515,0x00000518, -+ 0x00000517,0x0004007c,0x0000051b,0x0000051c,0x000004f0,0x00050051,0x00000006,0x0000051e, -+ 0x00000842,0x00000000,0x00050051,0x00000006,0x0000051f,0x00000842,0x00000001,0x00050051, -+ 0x00000006,0x00000520,0x00000842,0x00000002,0x00070050,0x00000016,0x00000521,0x0000051e, -+ 0x0000051f,0x00000520,0x00000093,0x00040063,0x00000518,0x0000051c,0x00000521,0x000200f9, -+ 0x00000524,0x000200f8,0x00000524,0x000100fd,0x00010038 -+}; -+ -+/* -+#version 460 -+#extension GL_GOOGLE_include_directive: require -+ -+layout(local_size_x=8, local_size_y=8, local_size_z=1) in; -+ -+layout(binding = 0) uniform sampler2D texSampler; -+layout(binding = 1) uniform writeonly image2D outImage; -+ -+layout(push_constant) uniform pushConstants { -+ uvec2 c1; -+ ivec2 extent; -+ ivec4 viewport; -+}; -+ -+#define A_GPU 1 -+#define A_GLSL 1 -+//#include "ffx_a.h" -+#define FSR_RCAS_F 1 -+vec4 FsrRcasLoadF(ivec2 p) { return texelFetch(texSampler, clamp(p, ivec2(0), extent), 0); } -+void FsrRcasInputF(inout float r, inout float g, inout float b) {} -+//#include "ffx_fsr1.h" -+ -+ -+void main() -+{ -+ vec3 color; -+ -+ if (any(lessThan(gl_GlobalInvocationID.xy, uvec2(viewport.xy))) || -+ any(greaterThan(gl_GlobalInvocationID.xy, uvec2(viewport.zw)))) -+ { -+ color = vec3(0.0, 0.0, 0.0); -+ } -+ else -+ { -+ FsrRcasF(color.r, color.g, color.b, uvec2(gl_GlobalInvocationID.xy - viewport.xy), c1.xyxx); -+ } -+ -+ imageStore(outImage, ivec2(gl_GlobalInvocationID.xy), vec4(color, 1.0)); -+} -+*/ -+const uint32_t fsr_rcas_comp_spv[] = { -+ 0x07230203,0x00010000,0x0008000a,0x0000061e,0x00000000,0x00020011,0x00000001,0x00020011, -+ 0x00000038,0x0006000b,0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e, -+ 0x00000000,0x00000001,0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000287, -+ 0x00060010,0x00000004,0x00000011,0x00000008,0x00000008,0x00000001,0x00030003,0x00000002, -+ 0x000001cc,0x000a0004,0x475f4c47,0x4c474f4f,0x70635f45,0x74735f70,0x5f656c79,0x656e696c, -+ 0x7269645f,0x69746365,0x00006576,0x00080004,0x475f4c47,0x4c474f4f,0x6e695f45,0x64756c63, -+ 0x69645f65,0x74636572,0x00657669,0x00040005,0x00000004,0x6e69616d,0x00000000,0x00050005, -+ 0x0000007b,0x53786574,0x6c706d61,0x00007265,0x00060005,0x00000081,0x68737570,0x736e6f43, -+ 0x746e6174,0x00000073,0x00040006,0x00000081,0x00000000,0x00003163,0x00050006,0x00000081, -+ 0x00000001,0x65747865,0x0000746e,0x00060006,0x00000081,0x00000002,0x77656976,0x74726f70, -+ 0x00000000,0x00030005,0x00000083,0x00000000,0x00080005,0x00000287,0x475f6c67,0x61626f6c, -+ 0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x000002c0,0x4974756f,0x6567616d, -+ 0x00000000,0x00040047,0x0000007b,0x00000022,0x00000000,0x00040047,0x0000007b,0x00000021, -+ 0x00000000,0x00050048,0x00000081,0x00000000,0x00000023,0x00000000,0x00050048,0x00000081, -+ 0x00000001,0x00000023,0x00000008,0x00050048,0x00000081,0x00000002,0x00000023,0x00000010, -+ 0x00030047,0x00000081,0x00000002,0x00040047,0x00000287,0x0000000b,0x0000001c,0x00040047, -+ 0x000002c0,0x00000022,0x00000000,0x00040047,0x000002c0,0x00000021,0x00000001,0x00030047, -+ 0x000002c0,0x00000019,0x00040047,0x000002cb,0x0000000b,0x00000019,0x00020013,0x00000002, -+ 0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,0x00000020,0x00040015,0x0000000c, -+ 0x00000020,0x00000000,0x00040015,0x00000026,0x00000020,0x00000001,0x00040017,0x00000027, -+ 0x00000026,0x00000002,0x00040017,0x00000029,0x00000006,0x00000004,0x00040017,0x00000034, -+ 0x0000000c,0x00000002,0x0004002b,0x00000006,0x00000054,0x3f800000,0x0004002b,0x00000006, -+ 0x0000005c,0x00000000,0x0004002b,0x0000000c,0x00000065,0x7ef19fff,0x0004002b,0x00000006, -+ 0x00000071,0x40000000,0x00090019,0x00000078,0x00000006,0x00000001,0x00000000,0x00000000, -+ 0x00000000,0x00000001,0x00000000,0x0003001b,0x00000079,0x00000078,0x00040020,0x0000007a, -+ 0x00000000,0x00000079,0x0004003b,0x0000007a,0x0000007b,0x00000000,0x0004002b,0x00000026, -+ 0x0000007e,0x00000000,0x0005002c,0x00000027,0x0000007f,0x0000007e,0x0000007e,0x00040017, -+ 0x00000080,0x00000026,0x00000004,0x0005001e,0x00000081,0x00000034,0x00000027,0x00000080, -+ 0x00040020,0x00000082,0x00000009,0x00000081,0x0004003b,0x00000082,0x00000083,0x00000009, -+ 0x0004002b,0x00000026,0x00000084,0x00000001,0x00040020,0x00000085,0x00000009,0x00000027, -+ 0x00040017,0x00000090,0x00000006,0x00000003,0x0004002b,0x00000026,0x00000094,0xffffffff, -+ 0x0005002c,0x00000027,0x00000095,0x0000007e,0x00000094,0x0005002c,0x00000027,0x0000009c, -+ 0x00000094,0x0000007e,0x0005002c,0x00000027,0x000000a8,0x00000084,0x0000007e,0x0005002c, -+ 0x00000027,0x000000af,0x0000007e,0x00000084,0x0004002b,0x0000000c,0x000000b9,0x00000001, -+ 0x0004002b,0x00000006,0x00000154,0x3e800000,0x0004002b,0x00000006,0x000001d3,0xc0800000, -+ 0x0004002b,0x00000006,0x000001d7,0x40800000,0x0004002b,0x00000006,0x0000022e,0xbe400000, -+ 0x00020014,0x00000284,0x00040017,0x00000285,0x0000000c,0x00000003,0x00040020,0x00000286, -+ 0x00000001,0x00000285,0x0004003b,0x00000286,0x00000287,0x00000001,0x0004002b,0x00000026, -+ 0x0000028a,0x00000002,0x00040020,0x0000028b,0x00000009,0x00000080,0x00040017,0x00000290, -+ 0x00000284,0x00000002,0x0006002c,0x00000090,0x000002a2,0x0000005c,0x0000005c,0x0000005c, -+ 0x00040020,0x000002b3,0x00000009,0x00000034,0x00090019,0x000002be,0x00000006,0x00000001, -+ 0x00000000,0x00000000,0x00000000,0x00000002,0x00000000,0x00040020,0x000002bf,0x00000000, -+ 0x000002be,0x0004003b,0x000002bf,0x000002c0,0x00000000,0x0004002b,0x0000000c,0x000002ca, -+ 0x00000008,0x0006002c,0x00000285,0x000002cb,0x000002ca,0x000002ca,0x000000b9,0x00030001, -+ 0x00000090,0x0000061d,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8, -+ 0x00000005,0x0004003d,0x00000285,0x00000288,0x00000287,0x0007004f,0x00000034,0x00000289, -+ 0x00000288,0x00000288,0x00000000,0x00000001,0x00050041,0x0000028b,0x0000028c,0x00000083, -+ 0x0000028a,0x0004003d,0x00000080,0x0000028d,0x0000028c,0x0007004f,0x00000027,0x0000028e, -+ 0x0000028d,0x0000028d,0x00000000,0x00000001,0x0004007c,0x00000034,0x0000028f,0x0000028e, -+ 0x000500b0,0x00000290,0x00000291,0x00000289,0x0000028f,0x0004009a,0x00000284,0x00000292, -+ 0x00000291,0x000400a8,0x00000284,0x00000293,0x00000292,0x000300f7,0x00000295,0x00000000, -+ 0x000400fa,0x00000293,0x00000294,0x00000295,0x000200f8,0x00000294,0x0007004f,0x00000027, -+ 0x0000029a,0x0000028d,0x0000028d,0x00000002,0x00000003,0x0004007c,0x00000034,0x0000029b, -+ 0x0000029a,0x000500ac,0x00000290,0x0000029c,0x00000289,0x0000029b,0x0004009a,0x00000284, -+ 0x0000029d,0x0000029c,0x000200f9,0x00000295,0x000200f8,0x00000295,0x000700f5,0x00000284, -+ 0x0000029e,0x00000292,0x00000005,0x0000029d,0x00000294,0x000300f7,0x000002a0,0x00000000, -+ 0x000400fa,0x0000029e,0x0000029f,0x000002a3,0x000200f8,0x0000029f,0x000200f9,0x000002a0, -+ 0x000200f8,0x000002a3,0x00050082,0x00000034,0x000002aa,0x00000289,0x0000028f,0x00050041, -+ 0x000002b3,0x000002b4,0x00000083,0x0000007e,0x0004003d,0x00000034,0x000002b5,0x000002b4, -+ 0x0004007c,0x00000027,0x00000353,0x000002aa,0x00050080,0x00000027,0x00000355,0x00000353, -+ 0x00000095,0x0004003d,0x00000079,0x000004b3,0x0000007b,0x00050041,0x00000085,0x000004b5, -+ 0x00000083,0x00000084,0x0004003d,0x00000027,0x000004b6,0x000004b5,0x0008000c,0x00000027, -+ 0x000004b7,0x00000001,0x0000002d,0x00000355,0x0000007f,0x000004b6,0x00040064,0x00000078, -+ 0x000004b8,0x000004b3,0x0007005f,0x00000029,0x000004b9,0x000004b8,0x000004b7,0x00000002, -+ 0x0000007e,0x00050080,0x00000027,0x00000359,0x00000353,0x0000009c,0x0008000c,0x00000027, -+ 0x000004c0,0x00000001,0x0000002d,0x00000359,0x0000007f,0x000004b6,0x00040064,0x00000078, -+ 0x000004c1,0x000004b3,0x0007005f,0x00000029,0x000004c2,0x000004c1,0x000004c0,0x00000002, -+ 0x0000007e,0x0008000c,0x00000027,0x000004c9,0x00000001,0x0000002d,0x00000353,0x0000007f, -+ 0x000004b6,0x00040064,0x00000078,0x000004ca,0x000004b3,0x0007005f,0x00000029,0x000004cb, -+ 0x000004ca,0x000004c9,0x00000002,0x0000007e,0x00050080,0x00000027,0x00000360,0x00000353, -+ 0x000000a8,0x0008000c,0x00000027,0x000004d2,0x00000001,0x0000002d,0x00000360,0x0000007f, -+ 0x000004b6,0x00040064,0x00000078,0x000004d3,0x000004b3,0x0007005f,0x00000029,0x000004d4, -+ 0x000004d3,0x000004d2,0x00000002,0x0000007e,0x00050080,0x00000027,0x00000364,0x00000353, -+ 0x000000af,0x0008000c,0x00000027,0x000004db,0x00000001,0x0000002d,0x00000364,0x0000007f, -+ 0x000004b6,0x00040064,0x00000078,0x000004dc,0x000004b3,0x0007005f,0x00000029,0x000004dd, -+ 0x000004dc,0x000004db,0x00000002,0x0000007e,0x00050051,0x00000006,0x00000368,0x000004b9, -+ 0x00000000,0x00050051,0x00000006,0x0000036a,0x000004b9,0x00000001,0x00050051,0x00000006, -+ 0x0000036c,0x000004b9,0x00000002,0x00050051,0x00000006,0x0000036e,0x000004c2,0x00000000, -+ 0x00050051,0x00000006,0x00000370,0x000004c2,0x00000001,0x00050051,0x00000006,0x00000372, -+ 0x000004c2,0x00000002,0x00050051,0x00000006,0x00000374,0x000004cb,0x00000000,0x00050051, -+ 0x00000006,0x00000376,0x000004cb,0x00000001,0x00050051,0x00000006,0x00000378,0x000004cb, -+ 0x00000002,0x00050051,0x00000006,0x0000037a,0x000004d4,0x00000000,0x00050051,0x00000006, -+ 0x0000037c,0x000004d4,0x00000001,0x00050051,0x00000006,0x0000037e,0x000004d4,0x00000002, -+ 0x00050051,0x00000006,0x00000380,0x000004dd,0x00000000,0x00050051,0x00000006,0x00000382, -+ 0x000004dd,0x00000001,0x00050051,0x00000006,0x00000384,0x000004dd,0x00000002,0x0007000c, -+ 0x00000006,0x0000055a,0x00000001,0x00000025,0x0000036e,0x0000037a,0x0007000c,0x00000006, -+ 0x0000055b,0x00000001,0x00000025,0x00000368,0x0000055a,0x0007000c,0x00000006,0x00000404, -+ 0x00000001,0x00000025,0x0000055b,0x00000380,0x0007000c,0x00000006,0x00000561,0x00000001, -+ 0x00000025,0x00000370,0x0000037c,0x0007000c,0x00000006,0x00000562,0x00000001,0x00000025, -+ 0x0000036a,0x00000561,0x0007000c,0x00000006,0x0000040a,0x00000001,0x00000025,0x00000562, -+ 0x00000382,0x0007000c,0x00000006,0x00000568,0x00000001,0x00000025,0x00000372,0x0000037e, -+ 0x0007000c,0x00000006,0x00000569,0x00000001,0x00000025,0x0000036c,0x00000568,0x0007000c, -+ 0x00000006,0x00000410,0x00000001,0x00000025,0x00000569,0x00000384,0x0007000c,0x00000006, -+ 0x0000056f,0x00000001,0x00000028,0x0000036e,0x0000037a,0x0007000c,0x00000006,0x00000570, -+ 0x00000001,0x00000028,0x00000368,0x0000056f,0x0007000c,0x00000006,0x00000416,0x00000001, -+ 0x00000028,0x00000570,0x00000380,0x0007000c,0x00000006,0x00000576,0x00000001,0x00000028, -+ 0x00000370,0x0000037c,0x0007000c,0x00000006,0x00000577,0x00000001,0x00000028,0x0000036a, -+ 0x00000576,0x0007000c,0x00000006,0x0000041c,0x00000001,0x00000028,0x00000577,0x00000382, -+ 0x0007000c,0x00000006,0x0000057d,0x00000001,0x00000028,0x00000372,0x0000037e,0x0007000c, -+ 0x00000006,0x0000057e,0x00000001,0x00000028,0x0000036c,0x0000057d,0x0007000c,0x00000006, -+ 0x00000422,0x00000001,0x00000028,0x0000057e,0x00000384,0x00050088,0x00000006,0x00000587, -+ 0x00000154,0x00000416,0x00050085,0x00000006,0x00000428,0x00000404,0x00000587,0x00050088, -+ 0x00000006,0x00000593,0x00000154,0x0000041c,0x00050085,0x00000006,0x0000042e,0x0000040a, -+ 0x00000593,0x00050088,0x00000006,0x0000059f,0x00000154,0x00000422,0x00050085,0x00000006, -+ 0x00000434,0x00000410,0x0000059f,0x00050083,0x00000006,0x00000438,0x00000054,0x00000416, -+ 0x00050085,0x00000006,0x0000043b,0x000001d7,0x00000404,0x00050081,0x00000006,0x0000043e, -+ 0x0000043b,0x000001d3,0x00050088,0x00000006,0x000005ab,0x00000054,0x0000043e,0x00050085, -+ 0x00000006,0x00000440,0x00000438,0x000005ab,0x00050083,0x00000006,0x00000444,0x00000054, -+ 0x0000041c,0x00050085,0x00000006,0x00000447,0x000001d7,0x0000040a,0x00050081,0x00000006, -+ 0x0000044a,0x00000447,0x000001d3,0x00050088,0x00000006,0x000005b7,0x00000054,0x0000044a, -+ 0x00050085,0x00000006,0x0000044c,0x00000444,0x000005b7,0x00050083,0x00000006,0x00000450, -+ 0x00000054,0x00000422,0x00050085,0x00000006,0x00000453,0x000001d7,0x00000410,0x00050081, -+ 0x00000006,0x00000456,0x00000453,0x000001d3,0x00050088,0x00000006,0x000005c3,0x00000054, -+ 0x00000456,0x00050085,0x00000006,0x00000458,0x00000450,0x000005c3,0x0004007f,0x00000006, -+ 0x0000045a,0x00000428,0x0007000c,0x00000006,0x0000045c,0x00000001,0x00000028,0x0000045a, -+ 0x00000440,0x0004007f,0x00000006,0x0000045e,0x0000042e,0x0007000c,0x00000006,0x00000460, -+ 0x00000001,0x00000028,0x0000045e,0x0000044c,0x0004007f,0x00000006,0x00000462,0x00000434, -+ 0x0007000c,0x00000006,0x00000464,0x00000001,0x00000028,0x00000462,0x00000458,0x0007000c, -+ 0x00000006,0x000005cf,0x00000001,0x00000028,0x00000460,0x00000464,0x0007000c,0x00000006, -+ 0x000005d0,0x00000001,0x00000028,0x0000045c,0x000005cf,0x0007000c,0x00000006,0x0000046b, -+ 0x00000001,0x00000025,0x000005d0,0x0000005c,0x0007000c,0x00000006,0x0000046c,0x00000001, -+ 0x00000028,0x0000022e,0x0000046b,0x00050051,0x0000000c,0x0000046e,0x000002b5,0x00000000, -+ 0x0004007c,0x00000006,0x0000046f,0x0000046e,0x00050085,0x00000006,0x00000470,0x0000046c, -+ 0x0000046f,0x00050085,0x00000006,0x00000473,0x000001d7,0x00000470,0x00050081,0x00000006, -+ 0x00000475,0x00000473,0x00000054,0x0004007c,0x0000000c,0x000005e1,0x00000475,0x00050082, -+ 0x0000000c,0x000005e2,0x00000065,0x000005e1,0x0004007c,0x00000006,0x000005e3,0x000005e2, -+ 0x0004007f,0x00000006,0x000005e6,0x000005e3,0x00050085,0x00000006,0x000005e8,0x000005e6, -+ 0x00000475,0x00050081,0x00000006,0x000005ea,0x000005e8,0x00000071,0x00050085,0x00000006, -+ 0x000005eb,0x000005e3,0x000005ea,0x00050081,0x00000006,0x00000611,0x00000368,0x0000036e, -+ 0x00050081,0x00000006,0x00000612,0x00000611,0x00000380,0x00050081,0x00000006,0x00000613, -+ 0x00000612,0x0000037a,0x00050085,0x00000006,0x00000485,0x00000470,0x00000613,0x00050081, -+ 0x00000006,0x00000487,0x00000485,0x00000374,0x00050085,0x00000006,0x00000489,0x00000487, -+ 0x000005eb,0x00050081,0x00000006,0x00000614,0x0000036a,0x00000370,0x00050081,0x00000006, -+ 0x00000615,0x00000614,0x00000382,0x00050081,0x00000006,0x00000616,0x00000615,0x0000037c, -+ 0x00050085,0x00000006,0x00000498,0x00000470,0x00000616,0x00050081,0x00000006,0x0000049a, -+ 0x00000498,0x00000376,0x00050085,0x00000006,0x0000049c,0x0000049a,0x000005eb,0x00050081, -+ 0x00000006,0x00000617,0x0000036c,0x00000372,0x00050081,0x00000006,0x00000618,0x00000617, -+ 0x00000384,0x00050081,0x00000006,0x00000619,0x00000618,0x0000037e,0x00050085,0x00000006, -+ 0x000004ab,0x00000470,0x00000619,0x00050081,0x00000006,0x000004ad,0x000004ab,0x00000378, -+ 0x00050085,0x00000006,0x000004af,0x000004ad,0x000005eb,0x00060052,0x00000090,0x00000609, -+ 0x00000489,0x0000061d,0x00000000,0x00060052,0x00000090,0x0000060b,0x0000049c,0x00000609, -+ 0x00000001,0x00060052,0x00000090,0x0000060d,0x000004af,0x0000060b,0x00000002,0x000200f9, -+ 0x000002a0,0x000200f8,0x000002a0,0x000700f5,0x00000090,0x0000061c,0x000002a2,0x0000029f, -+ 0x0000060d,0x000002a3,0x0004003d,0x000002be,0x000002c1,0x000002c0,0x0004007c,0x00000027, -+ 0x000002c4,0x00000289,0x00050051,0x00000006,0x000002c6,0x0000061c,0x00000000,0x00050051, -+ 0x00000006,0x000002c7,0x0000061c,0x00000001,0x00050051,0x00000006,0x000002c8,0x0000061c, -+ 0x00000002,0x00070050,0x00000029,0x000002c9,0x000002c6,0x000002c7,0x000002c8,0x00000054, -+ 0x00040063,0x000002c1,0x000002c4,0x000002c9,0x000100fd,0x00010038 -+}; -+ -+#endif /* __FSR_SPV_H */ -diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan -index f8ac5976efe..88065b73c82 100755 ---- a/dlls/winevulkan/make_vulkan -+++ b/dlls/winevulkan/make_vulkan -@@ -3292,7 +3292,7 @@ class VkGenerator(object): - f.write(" * resolution; user_sz will contain the app's requested mode; and dst_blit\n") - f.write(" * will contain the area to blit the user image to in real coordinates.\n") - f.write(" * All parameters are optional. */\n") -- f.write(" VkBool32 (*query_fs_hack)(VkSurfaceKHR surface, VkExtent2D *real_sz, VkExtent2D *user_sz, VkRect2D *dst_blit, VkFilter *filter);\n") -+ f.write(" VkBool32 (*query_fs_hack)(VkSurfaceKHR surface, VkExtent2D *real_sz, VkExtent2D *user_sz, VkRect2D *dst_blit, VkFilter *filter, BOOL *fsr, float *sharpness);\n") - f.write("};\n\n") - - f.write("static inline void *get_vulkan_driver_device_proc_addr(\n") -diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c -index 27cf80ee907..0fcfee82c9a 100644 ---- a/dlls/winevulkan/vulkan.c -+++ b/dlls/winevulkan/vulkan.c -@@ -47,6 +47,8 @@ - #include "ntgdi.h" - #include "ntuser.h" - -+#include "fsr_spv.h" -+ - WINE_DEFAULT_DEBUG_CHANNEL(vulkan); - - static int debug_level; -@@ -1994,29 +1996,80 @@ const uint32_t blit_comp_spv[] = { - 0x0000005b,0x00000021,0x00040063,0x00000056,0x0000005a,0x0000005b,0x000100fd,0x00010038 - }; - --static VkResult create_pipeline(struct wine_device *device, struct wine_swapchain *swapchain, VkShaderModule shaderModule) -+static void destroy_pipeline(struct wine_device *device, struct fs_comp_pipeline *pipeline) -+{ -+ device->funcs.p_vkDestroyPipeline(device->host_device, pipeline->pipeline, NULL); -+ pipeline->pipeline = VK_NULL_HANDLE; -+ -+ device->funcs.p_vkDestroyPipelineLayout(device->host_device, pipeline->pipeline_layout, NULL); -+ pipeline->pipeline_layout = VK_NULL_HANDLE; -+} -+ -+static VkResult create_pipeline(struct wine_device *device, struct wine_swapchain *swapchain, const uint32_t *code, uint32_t code_size, uint32_t push_size, struct fs_comp_pipeline *pipeline) - { - VkComputePipelineCreateInfo pipelineInfo = {0}; -+ VkPipelineLayoutCreateInfo pipelineLayoutInfo = {0}; -+ VkShaderModuleCreateInfo shaderInfo = {0}; -+ VkPushConstantRange pushConstants; -+ VkShaderModule shaderModule = 0; - VkResult res; - -+ pipeline->push_size = push_size; -+ -+ pushConstants.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT; -+ pushConstants.offset = 0; -+ pushConstants.size = push_size; -+ -+ pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; -+ pipelineLayoutInfo.setLayoutCount = 1; -+ pipelineLayoutInfo.pSetLayouts = &swapchain->descriptor_set_layout; -+ pipelineLayoutInfo.pushConstantRangeCount = 1; -+ pipelineLayoutInfo.pPushConstantRanges = &pushConstants; -+ -+ res = device->funcs.p_vkCreatePipelineLayout(device->host_device, &pipelineLayoutInfo, NULL, &pipeline->pipeline_layout); -+ if(res != VK_SUCCESS) -+ { -+ ERR("vkCreatePipelineLayout: %d\n", res); -+ goto fail; -+ } -+ -+ shaderInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; -+ shaderInfo.codeSize = code_size; -+ shaderInfo.pCode = code; -+ -+ res = device->funcs.p_vkCreateShaderModule(device->host_device, &shaderInfo, NULL, &shaderModule); -+ if(res != VK_SUCCESS) -+ { -+ ERR("vkCreateShaderModule: %d\n", res); -+ goto fail; -+ } -+ - pipelineInfo.sType = VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO; - pipelineInfo.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; - pipelineInfo.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT; - pipelineInfo.stage.module = shaderModule; - pipelineInfo.stage.pName = "main"; -- pipelineInfo.layout = swapchain->pipeline_layout; -+ pipelineInfo.layout = pipeline->pipeline_layout; - pipelineInfo.basePipelineHandle = VK_NULL_HANDLE; - pipelineInfo.basePipelineIndex = -1; - - res = device->funcs.p_vkCreateComputePipelines(device->host_device, VK_NULL_HANDLE, 1, &pipelineInfo, -- NULL, &swapchain->pipeline); -+ NULL, &pipeline->pipeline); - if (res != VK_SUCCESS) - { - ERR("vkCreateComputePipelines: %d\n", res); -- return res; -+ goto fail; - } -+ else -+ goto out; - -- return VK_SUCCESS; -+fail: -+ destroy_pipeline(device, pipeline); -+ -+out: -+ device->funcs.p_vkDestroyShaderModule(device->host_device, shaderModule, NULL); -+ -+ return res; - } - - static VkResult create_descriptor_set(struct wine_device *device, struct wine_swapchain *swapchain, -@@ -2044,7 +2097,7 @@ static VkResult create_descriptor_set(struct wine_device *device, struct wine_sw - userDescriptorImageInfo.sampler = swapchain->sampler; - - realDescriptorImageInfo.imageLayout = VK_IMAGE_LAYOUT_GENERAL; -- realDescriptorImageInfo.imageView = hack->blit_view; -+ realDescriptorImageInfo.imageView = swapchain->fsr ? hack->fsr_view : hack->swapchain_view; - - descriptorWrites[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; - descriptorWrites[0].dstSet = hack->descriptor_set; -@@ -2064,10 +2117,47 @@ static VkResult create_descriptor_set(struct wine_device *device, struct wine_sw - - device->funcs.p_vkUpdateDescriptorSets(device->host_device, 2, descriptorWrites, 0, NULL); - -+ if (swapchain->fsr) -+ { -+ res = device->funcs.p_vkAllocateDescriptorSets(device->host_device, &descriptorAllocInfo, &hack->fsr_set); -+ if (res != VK_SUCCESS) -+ { -+ ERR("vkAllocateDescriptorSets: %d\n", res); -+ return res; -+ } -+ -+ userDescriptorImageInfo.imageView = hack->fsr_view; -+ -+ realDescriptorImageInfo.imageView = hack->swapchain_view; -+ -+ descriptorWrites[0].dstSet = hack->fsr_set; -+ descriptorWrites[1].dstSet = hack->fsr_set; -+ -+ device->funcs.p_vkUpdateDescriptorSets(device->host_device, 2, descriptorWrites, 0, NULL); -+ } -+ - return VK_SUCCESS; - } - --static VkResult init_blit_images(struct wine_device *device, struct wine_swapchain *swapchain) -+static VkFormat srgb_to_unorm(VkFormat format) -+{ -+ switch (format) -+ { -+ case VK_FORMAT_R8G8B8A8_SRGB: return VK_FORMAT_R8G8B8A8_UNORM; -+ case VK_FORMAT_B8G8R8A8_SRGB: return VK_FORMAT_B8G8R8A8_UNORM; -+ case VK_FORMAT_R8G8B8_SRGB: return VK_FORMAT_R8G8B8_UNORM; -+ case VK_FORMAT_B8G8R8_SRGB: return VK_FORMAT_B8G8R8_UNORM; -+ case VK_FORMAT_A8B8G8R8_SRGB_PACK32: return VK_FORMAT_A8B8G8R8_UNORM_PACK32; -+ default: return format; -+ } -+} -+ -+static BOOL is_srgb(VkFormat format) -+{ -+ return format != srgb_to_unorm(format); -+} -+ -+static VkResult init_compute_state(struct wine_device *device, struct wine_swapchain *swapchain) - { - VkResult res; - VkSamplerCreateInfo samplerInfo = {0}; -@@ -2075,19 +2165,21 @@ static VkResult init_blit_images(struct wine_device *device, struct wine_swapcha - VkDescriptorPoolCreateInfo poolInfo = {0}; - VkDescriptorSetLayoutBinding layoutBindings[2] = {{0}, {0}}; - VkDescriptorSetLayoutCreateInfo descriptorLayoutInfo = {0}; -- VkPipelineLayoutCreateInfo pipelineLayoutInfo = {0}; -- VkPushConstantRange pushConstants; -- VkShaderModuleCreateInfo shaderInfo = {0}; -- VkShaderModule shaderModule = 0; -+ VkDeviceSize fsrMemTotal = 0, offs; -+ VkImageCreateInfo imageInfo = {0}; -+ VkMemoryRequirements fsrMemReq; -+ VkMemoryAllocateInfo allocInfo = {0}; -+ VkPhysicalDeviceMemoryProperties memProperties; - VkImageViewCreateInfo viewInfo = {0}; - uint32_t i; -+ uint32_t fsr_memory_type = -1; - - samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; - samplerInfo.magFilter = swapchain->fs_hack_filter; - samplerInfo.minFilter = swapchain->fs_hack_filter; -- samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; -- samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; -- samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; -+ samplerInfo.addressModeU = swapchain->fsr ? VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE : VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; -+ samplerInfo.addressModeV = swapchain->fsr ? VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE : VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; -+ samplerInfo.addressModeW = swapchain->fsr ? VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE : VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; - samplerInfo.anisotropyEnable = VK_FALSE; - samplerInfo.maxAnisotropy = 1; - samplerInfo.borderColor = VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK; -@@ -2116,6 +2208,13 @@ static VkResult init_blit_images(struct wine_device *device, struct wine_swapcha - poolInfo.pPoolSizes = poolSizes; - poolInfo.maxSets = swapchain->n_images; - -+ if (swapchain->fsr) -+ { -+ poolSizes[0].descriptorCount *= 2; -+ poolSizes[1].descriptorCount *= 2; -+ poolInfo.maxSets *= 2; -+ } -+ - res = device->funcs.p_vkCreateDescriptorPool(device->host_device, &poolInfo, NULL, &swapchain->descriptor_pool); - if (res != VK_SUCCESS) - { -@@ -2147,40 +2246,131 @@ static VkResult init_blit_images(struct wine_device *device, struct wine_swapcha - goto fail; - } - -- pushConstants.stageFlags = VK_SHADER_STAGE_COMPUTE_BIT; -- pushConstants.offset = 0; -- pushConstants.size = 4 * sizeof(float); /* 2 * vec2 */ -- -- pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; -- pipelineLayoutInfo.setLayoutCount = 1; -- pipelineLayoutInfo.pSetLayouts = &swapchain->descriptor_set_layout; -- pipelineLayoutInfo.pushConstantRangeCount = 1; -- pipelineLayoutInfo.pPushConstantRanges = &pushConstants; -- -- res = device->funcs.p_vkCreatePipelineLayout(device->host_device, &pipelineLayoutInfo, NULL, -- &swapchain->pipeline_layout); -+ res = create_pipeline(device, swapchain, blit_comp_spv, sizeof(blit_comp_spv), 4 * sizeof(float) /* 2 * vec2 */, &swapchain->blit_pipeline); - if (res != VK_SUCCESS) -- { -- ERR("vkCreatePipelineLayout: %d\n", res); - goto fail; -- } -- -- shaderInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; -- shaderInfo.codeSize = sizeof(blit_comp_spv); -- shaderInfo.pCode = blit_comp_spv; - -- res = device->funcs.p_vkCreateShaderModule(device->host_device, &shaderInfo, NULL, &shaderModule); -- if (res != VK_SUCCESS) -+ if (swapchain->fsr) - { -- ERR("vkCreateShaderModule: %d\n", res); -- goto fail; -- } -+ res = create_pipeline(device, swapchain, fsr_easu_comp_spv, sizeof(fsr_easu_comp_spv), 16 * sizeof(uint32_t) /* 4 * uvec4 */, &swapchain->fsr_easu_pipeline); -+ if (res != VK_SUCCESS) -+ goto fail; -+ res = create_pipeline(device, swapchain, fsr_rcas_comp_spv, sizeof(fsr_rcas_comp_spv), 8 * sizeof(uint32_t) /* uvec4 + ivec4 */, &swapchain->fsr_rcas_pipeline); -+ if (res != VK_SUCCESS) -+ goto fail; - -- res = create_pipeline(device, swapchain, shaderModule); -- if (res != VK_SUCCESS) -- goto fail; -+ /* create intermediate fsr images */ -+ for (i = 0; i < swapchain->n_images; ++i) -+ { -+ struct fs_hack_image *hack = &swapchain->fs_hack_images[i]; -+ -+ imageInfo.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO; -+ imageInfo.imageType = VK_IMAGE_TYPE_2D; -+ imageInfo.extent.width = swapchain->blit_dst.extent.width; -+ imageInfo.extent.height = swapchain->blit_dst.extent.height; -+ imageInfo.extent.depth = 1; -+ imageInfo.mipLevels = 1; -+ imageInfo.arrayLayers = 1; -+ imageInfo.format = VK_FORMAT_A2B10G10R10_UNORM_PACK32; -+ imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL; -+ imageInfo.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; -+ imageInfo.usage = VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_SAMPLED_BIT; -+ imageInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE; -+ imageInfo.samples = VK_SAMPLE_COUNT_1_BIT; -+ res = device->funcs.p_vkCreateImage(device->host_device, &imageInfo, NULL, &hack->fsr_image); -+ if (res != VK_SUCCESS) -+ { -+ ERR("vkCreateImage failed: %d\n", res); -+ goto fail; -+ } - -- device->funcs.p_vkDestroyShaderModule(device->host_device, shaderModule, NULL); -+ device->funcs.p_vkGetImageMemoryRequirements(device->host_device, hack->fsr_image, &fsrMemReq); -+ -+ offs = fsrMemTotal % fsrMemReq.alignment; -+ if(offs) -+ fsrMemTotal += fsrMemReq.alignment - offs; -+ -+ fsrMemTotal += fsrMemReq.size; -+ } -+ -+ /* allocate backing memory */ -+ device->phys_dev->instance->funcs.p_vkGetPhysicalDeviceMemoryProperties(device->phys_dev->host_physical_device, &memProperties); -+ -+ for (i = 0; i < memProperties.memoryTypeCount; i++) -+ { -+ if ((memProperties.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) == VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) -+ { -+ if (fsrMemReq.memoryTypeBits & (1 << i)) -+ { -+ fsr_memory_type = i; -+ break; -+ } -+ } -+ } -+ -+ if (fsr_memory_type == -1) -+ { -+ ERR("unable to find suitable memory type\n"); -+ res = VK_ERROR_OUT_OF_HOST_MEMORY; -+ goto fail; -+ } -+ -+ allocInfo.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; -+ allocInfo.allocationSize = fsrMemTotal; -+ allocInfo.memoryTypeIndex = fsr_memory_type; -+ -+ res = device->funcs.p_vkAllocateMemory(device->host_device, &allocInfo, NULL, &swapchain->fsr_image_memory); -+ if (res != VK_SUCCESS) -+ { -+ ERR("vkAllocateMemory: %d\n", res); -+ goto fail; -+ } -+ -+ /* bind backing memory and create imageviews */ -+ fsrMemTotal = 0; -+ for (i = 0; i < swapchain->n_images; ++i) -+ { -+ struct fs_hack_image *hack = &swapchain->fs_hack_images[i]; -+ -+ device->funcs.p_vkGetImageMemoryRequirements(device->host_device, hack->fsr_image, &fsrMemReq); -+ -+ offs = fsrMemTotal % fsrMemReq.alignment; -+ if(offs) -+ fsrMemTotal += fsrMemReq.alignment - offs; -+ -+ res = device->funcs.p_vkBindImageMemory(device->host_device, hack->fsr_image, swapchain->fsr_image_memory, fsrMemTotal); -+ if(res != VK_SUCCESS) -+ { -+ ERR("vkBindImageMemory: %d\n", res); -+ goto fail; -+ } -+ -+ fsrMemTotal += fsrMemReq.size; -+ } -+ -+ /* create imageviews */ -+ for (i = 0; i < swapchain->n_images; ++i) -+ { -+ struct fs_hack_image *hack = &swapchain->fs_hack_images[i]; -+ -+ viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; -+ viewInfo.image = hack->fsr_image; -+ viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; -+ viewInfo.format = VK_FORMAT_A2B10G10R10_UNORM_PACK32; -+ viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -+ viewInfo.subresourceRange.baseMipLevel = 0; -+ viewInfo.subresourceRange.levelCount = 1; -+ viewInfo.subresourceRange.baseArrayLayer = 0; -+ viewInfo.subresourceRange.layerCount = 1; -+ -+ res = device->funcs.p_vkCreateImageView(device->host_device, &viewInfo, NULL, &hack->fsr_view); -+ if(res != VK_SUCCESS) -+ { -+ ERR("vkCreateImageView(blit): %d\n", res); -+ goto fail; -+ } -+ } -+ } - - /* create imageviews */ - for (i = 0; i < swapchain->n_images; ++i) -@@ -2190,14 +2380,14 @@ static VkResult init_blit_images(struct wine_device *device, struct wine_swapcha - viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - viewInfo.image = hack->swapchain_image; - viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; -- viewInfo.format = VK_FORMAT_B8G8R8A8_UNORM; -+ viewInfo.format = swapchain->fsr ? srgb_to_unorm(swapchain->format) : VK_FORMAT_B8G8R8A8_UNORM; - viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - viewInfo.subresourceRange.baseMipLevel = 0; - viewInfo.subresourceRange.levelCount = 1; - viewInfo.subresourceRange.baseArrayLayer = 0; - viewInfo.subresourceRange.layerCount = 1; - -- res = device->funcs.p_vkCreateImageView(device->host_device, &viewInfo, NULL, &hack->blit_view); -+ res = device->funcs.p_vkCreateImageView(device->host_device, &viewInfo, NULL, &hack->swapchain_view); - if (res != VK_SUCCESS) - { - ERR("vkCreateImageView(blit): %d\n", res); -@@ -2216,17 +2406,19 @@ fail: - { - struct fs_hack_image *hack = &swapchain->fs_hack_images[i]; - -- device->funcs.p_vkDestroyImageView(device->host_device, hack->blit_view, NULL); -- hack->blit_view = VK_NULL_HANDLE; -- } -+ device->funcs.p_vkDestroyImageView(device->host_device, hack->fsr_view, NULL); -+ hack->fsr_view = VK_NULL_HANDLE; - -- device->funcs.p_vkDestroyShaderModule(device->host_device, shaderModule, NULL); -+ device->funcs.p_vkDestroyImageView(device->host_device, hack->swapchain_view, NULL); -+ hack->swapchain_view = VK_NULL_HANDLE; - -- device->funcs.p_vkDestroyPipeline(device->host_device, swapchain->pipeline, NULL); -- swapchain->pipeline = VK_NULL_HANDLE; -+ device->funcs.p_vkDestroyImage(device->host_device, hack->fsr_image, NULL); -+ hack->fsr_image = VK_NULL_HANDLE; -+ } - -- device->funcs.p_vkDestroyPipelineLayout(device->host_device, swapchain->pipeline_layout, NULL); -- swapchain->pipeline_layout = VK_NULL_HANDLE; -+ destroy_pipeline(device, &swapchain->blit_pipeline); -+ destroy_pipeline(device, &swapchain->fsr_easu_pipeline); -+ destroy_pipeline(device, &swapchain->fsr_rcas_pipeline); - - device->funcs.p_vkDestroyDescriptorSetLayout(device->host_device, swapchain->descriptor_set_layout, NULL); - swapchain->descriptor_set_layout = VK_NULL_HANDLE; -@@ -2234,6 +2426,9 @@ fail: - device->funcs.p_vkDestroyDescriptorPool(device->host_device, swapchain->descriptor_pool, NULL); - swapchain->descriptor_pool = VK_NULL_HANDLE; - -+ device->funcs.p_vkFreeMemory(device->host_device, swapchain->fsr_image_memory, NULL); -+ swapchain->fsr_image_memory = VK_NULL_HANDLE; -+ - device->funcs.p_vkDestroySampler(device->host_device, swapchain->sampler, NULL); - swapchain->sampler = VK_NULL_HANDLE; - -@@ -2244,8 +2439,10 @@ static void destroy_fs_hack_image(struct wine_device *device, struct wine_swapch - struct fs_hack_image *hack) - { - device->funcs.p_vkDestroyImageView(device->host_device, hack->user_view, NULL); -- device->funcs.p_vkDestroyImageView(device->host_device, hack->blit_view, NULL); -+ device->funcs.p_vkDestroyImageView(device->host_device, hack->swapchain_view, NULL); -+ device->funcs.p_vkDestroyImageView(device->host_device, hack->fsr_view, NULL); - device->funcs.p_vkDestroyImage(device->host_device, hack->user_image, NULL); -+ device->funcs.p_vkDestroyImage(device->host_device, hack->fsr_image, NULL); - if (hack->cmd) - device->funcs.p_vkFreeCommandBuffers(device->host_device, swapchain->cmd_pools[hack->cmd_queue_idx], - 1, &hack->cmd); -@@ -2317,10 +2514,11 @@ static VkResult init_fs_hack_images(struct wine_device *device, struct wine_swap - imageInfo.queueFamilyIndexCount = createinfo->queueFamilyIndexCount; - imageInfo.pQueueFamilyIndices = createinfo->pQueueFamilyIndices; - -+ if (is_srgb(createinfo->imageFormat)) -+ imageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; -+ - if (createinfo->flags & VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR) - imageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT | VK_IMAGE_CREATE_EXTENDED_USAGE_BIT; -- else if (createinfo->imageFormat != VK_FORMAT_B8G8R8A8_SRGB) -- imageInfo.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; - - res = device->funcs.p_vkCreateImage(device->host_device, &imageInfo, NULL, &hack->user_image); - if (res != VK_SUCCESS) -@@ -2397,7 +2595,7 @@ static VkResult init_fs_hack_images(struct wine_device *device, struct wine_swap - viewInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; - viewInfo.image = swapchain->fs_hack_images[i].user_image; - viewInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; -- viewInfo.format = VK_FORMAT_B8G8R8A8_SRGB; -+ viewInfo.format = swapchain->fsr ? srgb_to_unorm(createinfo->imageFormat) : VK_FORMAT_B8G8R8A8_SRGB; - viewInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - viewInfo.subresourceRange.baseMipLevel = 0; - viewInfo.subresourceRange.levelCount = 1; -@@ -2447,7 +2645,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea - - if (vk_funcs->query_fs_hack && - vk_funcs->query_fs_hack(create_info_host.surface, &object->real_extent, &user_sz, -- &object->blit_dst, &object->fs_hack_filter) && -+ &object->blit_dst, &object->fs_hack_filter, &object->fsr, &object->sharpness) && - create_info_host.imageExtent.width == user_sz.width && - create_info_host.imageExtent.height == user_sz.height) - { -@@ -2472,9 +2670,17 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea - FIXME("Swapchain does not support required VK_IMAGE_USAGE_STORAGE_BIT\n"); - - create_info_host.imageExtent = object->real_extent; -- create_info_host.imageFormat = VK_FORMAT_B8G8R8A8_UNORM; -+ create_info_host.imageFormat = object->fsr ? VK_FORMAT_B8G8R8A8_SRGB: VK_FORMAT_B8G8R8A8_UNORM; - create_info_host.imageUsage = VK_IMAGE_USAGE_STORAGE_BIT; - -+ object->format = create_info_host.imageFormat; -+ -+ if (object->fsr) { -+ object->format = srgb_to_unorm(object->format); -+ create_info_host.imageFormat = srgb_to_unorm(create_info_host.imageFormat); -+ create_info_host.imageUsage |= VK_IMAGE_USAGE_TRANSFER_DST_BIT; /* XXX: check if supported by surface */ -+ } -+ - if (info->imageFormat != VK_FORMAT_B8G8R8A8_UNORM && info->imageFormat != VK_FORMAT_B8G8R8A8_SRGB) - FIXME("swapchain image format is not BGRA8 UNORM/SRGB. Things may go badly. %d\n", create_info_host.imageFormat); - -@@ -2503,7 +2709,7 @@ VkResult wine_vkCreateSwapchainKHR(VkDevice device_handle, const VkSwapchainCrea - return res; - } - -- res = init_blit_images(device, object); -+ res = init_compute_state(device, object); - if (res != VK_SUCCESS) - { - ERR("creating blit images failed: %d\n", res); -@@ -3443,7 +3649,7 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice handle, - adjust_max_image_count(phys_dev, capabilities); - - if (res == VK_SUCCESS && vk_funcs->query_fs_hack && -- vk_funcs->query_fs_hack(surface->driver_surface, NULL, &user_res, NULL, NULL)) -+ vk_funcs->query_fs_hack(surface->driver_surface, NULL, &user_res, NULL, NULL, NULL, NULL)) - { - capabilities->currentExtent = user_res; - capabilities->minImageExtent = user_res; -@@ -3473,7 +3679,7 @@ VkResult wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice handle - adjust_max_image_count(phys_dev, &capabilities->surfaceCapabilities); - - if (res == VK_SUCCESS && vk_funcs->query_fs_hack && -- vk_funcs->query_fs_hack(wine_surface_from_handle(surface_info->surface)->driver_surface, NULL, &user_res, NULL, NULL)) -+ vk_funcs->query_fs_hack(wine_surface_from_handle(surface_info->surface)->driver_surface, NULL, &user_res, NULL, NULL, NULL, NULL)) - { - capabilities->surfaceCapabilities.currentExtent = user_res; - capabilities->surfaceCapabilities.minImageExtent = user_res; -@@ -3617,12 +3823,14 @@ void wine_vkDestroySwapchainKHR(VkDevice device_handle, VkSwapchainKHR handle, c - if (swapchain->cmd_pools[i]) - device->funcs.p_vkDestroyCommandPool(device->host_device, swapchain->cmd_pools[i], NULL); - -- device->funcs.p_vkDestroyPipeline(device->host_device, swapchain->pipeline, NULL); -- device->funcs.p_vkDestroyPipelineLayout(device->host_device, swapchain->pipeline_layout, NULL); -+ destroy_pipeline(device, &swapchain->blit_pipeline); -+ destroy_pipeline(device, &swapchain->fsr_easu_pipeline); -+ destroy_pipeline(device, &swapchain->fsr_rcas_pipeline); - device->funcs.p_vkDestroyDescriptorSetLayout(device->host_device, swapchain->descriptor_set_layout, NULL); - device->funcs.p_vkDestroyDescriptorPool(device->host_device, swapchain->descriptor_pool, NULL); - device->funcs.p_vkDestroySampler(device->host_device, swapchain->sampler, NULL); - device->funcs.p_vkFreeMemory(device->host_device, swapchain->user_image_memory, NULL); -+ device->funcs.p_vkFreeMemory(device->host_device, swapchain->fsr_image_memory, NULL); - free(swapchain->cmd_pools); - free(swapchain->fs_hack_images); - } -@@ -3689,6 +3897,30 @@ static VkCommandBuffer create_hack_cmd(struct wine_queue *queue, struct wine_swa - return cmd; - } - -+static void bind_pipeline(struct wine_device *device, VkCommandBuffer cmd, struct fs_comp_pipeline *pipeline, VkDescriptorSet set, void *push_data) -+{ -+ device->funcs.p_vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline->pipeline); -+ -+ device->funcs.p_vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_COMPUTE, -+ pipeline->pipeline_layout, 0, 1, &set, 0, NULL); -+ -+ device->funcs.p_vkCmdPushConstants(cmd, pipeline->pipeline_layout, -+ VK_SHADER_STAGE_COMPUTE_BIT, 0, pipeline->push_size, push_data); -+} -+ -+static void init_barrier(VkImageMemoryBarrier *barrier) -+{ -+ barrier->sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; -+ barrier->pNext = NULL; -+ barrier->srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -+ barrier->dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -+ barrier->subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -+ barrier->subresourceRange.baseMipLevel = 0; -+ barrier->subresourceRange.levelCount = 1; -+ barrier->subresourceRange.baseArrayLayer = 0; -+ barrier->subresourceRange.layerCount = 1; -+} -+ - static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapchain *swapchain, - struct fs_hack_image *hack) - { -@@ -3699,6 +3931,9 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc - - TRACE("recording compute command\n"); - -+ init_barrier(&barriers[0]); -+ init_barrier(&barriers[1]); -+ - beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; - beginInfo.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; - -@@ -3706,33 +3941,17 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc - - /* for the cs we run... */ - /* transition user image from PRESENT_SRC to SHADER_READ */ -- barriers[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - barriers[0].oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; - barriers[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; -- barriers[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -- barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barriers[0].image = hack->user_image; -- barriers[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -- barriers[0].subresourceRange.baseMipLevel = 0; -- barriers[0].subresourceRange.levelCount = 1; -- barriers[0].subresourceRange.baseArrayLayer = 0; -- barriers[0].subresourceRange.layerCount = 1; - barriers[0].srcAccessMask = 0; - barriers[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT; - - /* storage image... */ - /* transition swapchain image from whatever to GENERAL */ -- barriers[1].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - barriers[1].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; - barriers[1].newLayout = VK_IMAGE_LAYOUT_GENERAL; -- barriers[1].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -- barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barriers[1].image = hack->swapchain_image; -- barriers[1].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -- barriers[1].subresourceRange.baseMipLevel = 0; -- barriers[1].subresourceRange.levelCount = 1; -- barriers[1].subresourceRange.baseArrayLayer = 0; -- barriers[1].subresourceRange.layerCount = 1; - barriers[1].srcAccessMask = 0; - barriers[1].dstAccessMask = VK_ACCESS_SHADER_WRITE_BIT; - -@@ -3740,10 +3959,6 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc - VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, NULL, 0, NULL, 2, barriers); - - /* perform blit shader */ -- device->funcs.p_vkCmdBindPipeline(hack->cmd, VK_PIPELINE_BIND_POINT_COMPUTE, swapchain->pipeline); -- -- device->funcs.p_vkCmdBindDescriptorSets(hack->cmd, VK_PIPELINE_BIND_POINT_COMPUTE, -- swapchain->pipeline_layout, 0, 1, &hack->descriptor_set, 0, NULL); - - /* vec2: blit dst offset in real coords */ - constants[0] = swapchain->blit_dst.offset.x; -@@ -3756,40 +3971,24 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc - /* vec2: blit dst extents in real coords */ - constants[2] = swapchain->blit_dst.extent.width; - constants[3] = swapchain->blit_dst.extent.height; -- device->funcs.p_vkCmdPushConstants(hack->cmd, swapchain->pipeline_layout, -- VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(constants), constants); -+ -+ bind_pipeline(device, hack->cmd, &swapchain->blit_pipeline, hack->descriptor_set, constants); - - /* local sizes in shader are 8 */ - device->funcs.p_vkCmdDispatch(hack->cmd, ceil(swapchain->real_extent.width / 8.), - ceil(swapchain->real_extent.height / 8.), 1); - - /* transition user image from SHADER_READ back to PRESENT_SRC */ -- barriers[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - barriers[0].oldLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; - barriers[0].newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; -- barriers[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -- barriers[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barriers[0].image = hack->user_image; -- barriers[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -- barriers[0].subresourceRange.baseMipLevel = 0; -- barriers[0].subresourceRange.levelCount = 1; -- barriers[0].subresourceRange.baseArrayLayer = 0; -- barriers[0].subresourceRange.layerCount = 1; - barriers[0].srcAccessMask = VK_ACCESS_SHADER_READ_BIT; - barriers[0].dstAccessMask = 0; - - /* transition swapchain image from GENERAL to PRESENT_SRC */ -- barriers[1].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; - barriers[1].oldLayout = VK_IMAGE_LAYOUT_GENERAL; - barriers[1].newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; -- barriers[1].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; -- barriers[1].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barriers[1].image = hack->swapchain_image; -- barriers[1].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; -- barriers[1].subresourceRange.baseMipLevel = 0; -- barriers[1].subresourceRange.levelCount = 1; -- barriers[1].subresourceRange.baseArrayLayer = 0; -- barriers[1].subresourceRange.layerCount = 1; - barriers[1].srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT; - barriers[1].dstAccessMask = 0; - -@@ -3806,6 +4005,149 @@ static VkResult record_compute_cmd(struct wine_device *device, struct wine_swapc - return VK_SUCCESS; - } - -+static VkResult record_fsr_cmd(struct wine_device *device, struct wine_swapchain *swapchain, struct fs_hack_image *hack) -+{ -+ VkImageMemoryBarrier barriers[3] = {{0}}; -+ VkCommandBufferBeginInfo beginInfo = {0}; -+ union -+ { -+ uint32_t uint[16]; -+ float fp[16]; -+ } c; -+ VkResult result; -+ -+ TRACE("recording compute command\n"); -+ -+ init_barrier(&barriers[0]); -+ init_barrier(&barriers[1]); -+ init_barrier(&barriers[2]); -+ -+ beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; -+ beginInfo.flags = VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT; -+ -+ device->funcs.p_vkBeginCommandBuffer(hack->cmd, &beginInfo); -+ -+ /* 1st pass (easu) */ -+ /* transition user image from PRESENT_SRC to SHADER_READ */ -+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; -+ barriers[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; -+ barriers[0].image = hack->user_image; -+ barriers[0].srcAccessMask = 0; -+ barriers[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT; -+ -+ /* storage image... */ -+ /* transition fsr image from whatever to GENERAL */ -+ barriers[1].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; -+ barriers[1].newLayout = VK_IMAGE_LAYOUT_GENERAL; -+ barriers[1].image = hack->swapchain_image; -+ barriers[1].srcAccessMask = 0; -+ barriers[1].dstAccessMask = 0; -+ -+ device->funcs.p_vkCmdPipelineBarrier(hack->cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, -+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, NULL, 0, NULL, 2, barriers); -+ -+ /* perform easu shader */ -+ -+ c.fp[0] = swapchain->user_extent.width * (1.0f / swapchain->blit_dst.extent.width); -+ c.fp[1] = swapchain->user_extent.height * (1.0f / swapchain->blit_dst.extent.height); -+ c.fp[2] = 0.5f * c.fp[0] - 0.5f; -+ c.fp[3] = 0.5f * c.fp[1] - 0.5f; -+ // Viewport pixel position to normalized image space. -+ // This is used to get upper-left of 'F' tap. -+ c.fp[4] = 1.0f / swapchain->user_extent.width; -+ c.fp[5] = 1.0f / swapchain->user_extent.height; -+ // Centers of gather4, first offset from upper-left of 'F'. -+ // +---+---+ -+ // | | | -+ // +--(0)--+ -+ // | b | c | -+ // +---F---+---+---+ -+ // | e | f | g | h | -+ // +--(1)--+--(2)--+ -+ // | i | j | k | l | -+ // +---+---+---+---+ -+ // | n | o | -+ // +--(3)--+ -+ // | | | -+ // +---+---+ -+ c.fp[6] = 1.0f * c.fp[4]; -+ c.fp[7] = -1.0f * c.fp[5]; -+ // These are from (0) instead of 'F'. -+ c.fp[8] = -1.0f * c.fp[4]; -+ c.fp[9] = 2.0f * c.fp[5]; -+ c.fp[10] = 1.0f * c.fp[4]; -+ c.fp[11] = 2.0f * c.fp[5]; -+ c.fp[12] = 0.0f * c.fp[4]; -+ c.fp[13] = 4.0f * c.fp[5]; -+ c.uint[14] = swapchain->blit_dst.extent.width; -+ c.uint[15] = swapchain->blit_dst.extent.height; -+ -+ bind_pipeline(device, hack->cmd, &swapchain->fsr_easu_pipeline, hack->descriptor_set, c.uint); -+ -+ /* local sizes in shader are 8 */ -+ device->funcs.p_vkCmdDispatch(hack->cmd, ceil(swapchain->blit_dst.extent.width / 8.), -+ ceil(swapchain->blit_dst.extent.height / 8.), 1); -+ -+ /* transition user image from SHADER_READ back to PRESENT_SRC */ -+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; -+ barriers[0].newLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; -+ barriers[0].image = hack->user_image; -+ barriers[0].srcAccessMask = 0; -+ barriers[0].dstAccessMask = 0; -+ -+ /* transition fsr image from GENERAL to SHADER_READ */ -+ barriers[1].oldLayout = VK_IMAGE_LAYOUT_GENERAL; -+ barriers[1].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; -+ barriers[1].image = hack->swapchain_image; -+ barriers[1].srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT; -+ barriers[1].dstAccessMask = VK_ACCESS_SHADER_READ_BIT; -+ -+ /* transition swapchain image from whatever to GENERAL */ -+ barriers[2].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; -+ barriers[2].newLayout = VK_IMAGE_LAYOUT_GENERAL; -+ barriers[2].image = hack->swapchain_image; -+ barriers[2].srcAccessMask = 0; -+ barriers[2].dstAccessMask = 0; -+ -+ device->funcs.p_vkCmdPipelineBarrier(hack->cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, -+ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0, NULL, 3, barriers); -+ -+ /* 2nd pass (rcas) */ -+ -+ c.fp[0] = exp2f(-swapchain->sharpness); -+ c.uint[2] = swapchain->blit_dst.extent.width; -+ c.uint[3] = swapchain->blit_dst.extent.height; -+ c.uint[4] = swapchain->blit_dst.offset.x; -+ c.uint[5] = swapchain->blit_dst.offset.y; -+ c.uint[6] = swapchain->blit_dst.offset.x + swapchain->blit_dst.extent.width; -+ c.uint[7] = swapchain->blit_dst.offset.y + swapchain->blit_dst.extent.height; -+ -+ bind_pipeline(device, hack->cmd, &swapchain->fsr_rcas_pipeline, hack->fsr_set, c.uint); -+ -+ /* local sizes in shader are 8 */ -+ device->funcs.p_vkCmdDispatch(hack->cmd, ceil(swapchain->real_extent.width / 8.), -+ ceil(swapchain->real_extent.height / 8.), 1); -+ -+ /* transition swapchain image from GENERAL to PRESENT_SRC */ -+ barriers[0].oldLayout = VK_IMAGE_LAYOUT_GENERAL; -+ barriers[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; -+ barriers[0].image = hack->swapchain_image; -+ barriers[0].srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT; -+ barriers[0].dstAccessMask = 0; -+ -+ device->funcs.p_vkCmdPipelineBarrier(hack->cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, -+ VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, 0, 0, NULL, 0, NULL, 1, barriers); -+ -+ result = device->funcs.p_vkEndCommandBuffer(hack->cmd); -+ if (result != VK_SUCCESS) -+ { -+ ERR("vkEndCommandBuffer: %d\n", result); -+ return result; -+ } -+ -+ return VK_SUCCESS; -+} -+ - VkResult fshack_vk_queue_present(VkQueue queue_handle, const VkPresentInfoKHR *pPresentInfo) - { - struct wine_queue *queue = wine_queue_from_handle(queue_handle); -@@ -3854,7 +4196,7 @@ VkResult fshack_vk_queue_present(VkQueue queue_handle, const VkPresentInfoKHR *p - } - - if (queue->device->queue_props[queue_idx].queueFlags & VK_QUEUE_COMPUTE_BIT) /* TODO */ -- res = record_compute_cmd(queue->device, swapchain, hack); -+ res = swapchain->fsr ? record_fsr_cmd(queue->device, swapchain, hack) : record_compute_cmd(queue->device, swapchain, hack); - else - { - ERR("Present queue does not support compute!\n"); -diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h -index ffae94adbe4..e5405486c44 100644 ---- a/dlls/winevulkan/vulkan_private.h -+++ b/dlls/winevulkan/vulkan_private.h -@@ -111,10 +111,18 @@ struct fs_hack_image - uint32_t cmd_queue_idx; - VkCommandBuffer cmd; - VkImage swapchain_image; -+ VkImage fsr_image; - VkImage user_image; - VkSemaphore blit_finished; -- VkImageView user_view, blit_view; -- VkDescriptorSet descriptor_set; -+ VkImageView user_view, swapchain_view, fsr_view; -+ VkDescriptorSet descriptor_set, fsr_set; -+}; -+ -+struct fs_comp_pipeline -+{ -+ VkPipelineLayout pipeline_layout; -+ VkPipeline pipeline; -+ uint32_t push_size; - }; - - struct wine_swapchain -@@ -127,15 +135,20 @@ struct wine_swapchain - VkExtent2D real_extent; - VkRect2D blit_dst; - VkCommandPool *cmd_pools; /* VkCommandPool[device->queue_count] */ -- VkDeviceMemory user_image_memory; -+ VkDeviceMemory user_image_memory, fsr_image_memory; - uint32_t n_images; - struct fs_hack_image *fs_hack_images; /* struct fs_hack_image[n_images] */ - VkFilter fs_hack_filter; - VkSampler sampler; - VkDescriptorPool descriptor_pool; - VkDescriptorSetLayout descriptor_set_layout; -- VkPipelineLayout pipeline_layout; -- VkPipeline pipeline; -+ VkFormat format; -+ BOOL fsr; -+ float sharpness; -+ -+ struct fs_comp_pipeline blit_pipeline; -+ struct fs_comp_pipeline fsr_easu_pipeline; -+ struct fs_comp_pipeline fsr_rcas_pipeline; - - struct wine_vk_mapping mapping; - }; -diff --git a/dlls/winex11.drv/fs.c b/dlls/winex11.drv/fs.c -index bda79419c69..6a1cd03b5ae 100644 ---- a/dlls/winex11.drv/fs.c -+++ b/dlls/winex11.drv/fs.c -@@ -42,12 +42,12 @@ static struct x11drv_settings_handler real_settings_handler; - static BOOL initialized; - - /* A table of resolutions some games expect but host system may not report */ --static const struct -+struct fs_monitor_size - { - SIZE size; - BOOL additional; --} --fs_monitor_sizes[] = -+}; -+static struct fs_monitor_size fs_monitor_sizes_base[] = - { - {{640, 480}}, /* 4:3 */ - {{800, 600}}, /* 4:3 */ -@@ -60,6 +60,7 @@ fs_monitor_sizes[] = - {{2560, 1440}}, /* 16:9 */ - {{2880, 1620}}, /* 16:9 */ - {{3200, 1800}}, /* 16:9 */ -+ {{1280, 800}}, /* 8:5 */ - {{1440, 900}}, /* 8:5 */ - {{1680, 1050}}, /* 8:5 */ - {{1920, 1200}}, /* 8:5 */ -@@ -73,6 +74,14 @@ fs_monitor_sizes[] = - {{1280, 768}, TRUE }, - }; - -+/* The order should be in sync with the values in 'fs_hack_is_fsr_single_mode'*/ -+static float fsr_ratios[] = { -+ 2.0f, /* FSR Performance */ -+ 1.7f, /* FSR Balanced */ -+ 1.5f, /* FSR Quality */ -+ 1.3f, /* FSR Ultra Quality */ -+}; -+ - /* A fake monitor for the fullscreen hack */ - struct fs_monitor - { -@@ -281,6 +290,55 @@ static void modes_append( DEVMODEW *modes, UINT *mode_count, UINT *resolutions, - *mode_count = *mode_count + 1; - } - -+static BOOL fs_hack_is_fsr_single_mode(UINT *mode) -+{ -+ const char *e; -+ -+ e = getenv("WINE_FULLSCREEN_FSR_MODE"); -+ if (e) -+ { -+ /* If empty or zero don't apply a mode */ -+ if (*e == '\0' || *e == '0') -+ return FALSE; -+ /* The 'mode' values should be in sync with the order in 'fsr_ratios' */ -+ if (!strcmp(e, "Ultra") || !strcmp(e, "ultra")) -+ *mode = 3; -+ else if (!strcmp(e, "Quality") || !strcmp(e, "quality")) -+ *mode = 2; -+ else if (!strcmp(e, "Balanced") || !strcmp(e, "balanced")) -+ *mode = 1; -+ else if (!strcmp(e, "Performance") || !strcmp(e, "performance")) -+ *mode = 0; -+ /* If the user mistyped the mode, return 'balanced' */ -+ else -+ *mode = 1; -+ return TRUE; -+ } -+ return FALSE; -+} -+ -+static BOOL fs_hack_is_fsr_custom_mode(struct fs_monitor_size *fsr_custom_size) -+{ -+ DWORD width, height; -+ const char *e; -+ -+ width = 0; -+ height = 0; -+ e = getenv("WINE_FULLSCREEN_FSR_CUSTOM_MODE"); -+ if (e) -+ { -+ const int n = sscanf(e, "%ux%u", &width, &height); -+ if (n==2) -+ { -+ fsr_custom_size->size.cx = width; -+ fsr_custom_size->size.cy = height; -+ TRACE("found custom resolution: %ux%u\n", fsr_custom_size->size.cx, fsr_custom_size->size.cy); -+ return TRUE; -+ } -+ } -+ return FALSE; -+} -+ - static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UINT *mode_count ) - { - UINT i, j, max_count, real_mode_count, resolutions = 0; -@@ -288,6 +346,14 @@ static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UIN - BOOL additional_modes = FALSE, center_modes = FALSE, landscape; - const char *env; - -+ /* Default resolutions + FSR resolutions + Custom resolution */ -+ struct fs_monitor_size fs_monitor_sizes[ARRAY_SIZE(fs_monitor_sizes_base) + ARRAY_SIZE(fsr_ratios) + 1] = {0}; -+ struct fs_monitor_size fs_monitor_sizes_fsr[ARRAY_SIZE(fsr_ratios)] = {0}; -+ struct fs_monitor_size fsr_custom_size = {0}; -+ UINT fs_monitor_sizes_count, fsr_mode; -+ float sharpness, real_w_ratio, h_ratio, h_factor; -+ BOOL is_fsr, is_fsr_single_mode, is_fsr_custom_mode; -+ - *mode_count = 0; - *modes = NULL; - -@@ -305,6 +371,102 @@ static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UIN - else if ((env = getenv( "SteamAppId" ))) - center_modes = !strcmp( env, "359870" ); - -+ is_fsr = fs_hack_is_fsr(&sharpness); -+ is_fsr_single_mode = FALSE; -+ is_fsr_custom_mode = FALSE; -+ -+ fs_monitor_sizes_count = 0; -+ -+ /* If FSR is enabled, generate and add FSR resolutions */ -+ if (is_fsr) -+ { -+ if (mode_host.dmPelsWidth / 16.0f == mode_host.dmPelsHeight / 9.0f) -+ { -+ /* 16:9 resolutions */ -+ h_ratio = 9.0f; -+ } -+ else if ((DWORD)(mode_host.dmPelsWidth / 210.0f) == (DWORD)(mode_host.dmPelsHeight / 90.0f)) -+ { -+ /* 21:9 ultra-wide resolutions */ -+ h_ratio = 9.0f; -+ } -+ else if (mode_host.dmPelsWidth / 32.0f == mode_host.dmPelsHeight / 9.0f) -+ { -+ /* 32:9 "duper-ultra-wide" resolutions */ -+ h_ratio = 9.0f; -+ } -+ else if (mode_host.dmPelsWidth / 8.0f == mode_host.dmPelsHeight / 5.0f) -+ { -+ /* 16:10 resolutions */ -+ h_ratio = 10.0f; -+ } -+ else if (mode_host.dmPelsWidth / 12.0f == mode_host.dmPelsHeight / 5.0f) -+ { -+ /* 24:10 resolutions */ -+ h_ratio = 10.0f; -+ } -+ else -+ { -+ /* In case of unknown ratio, naively create FSR resolutions */ -+ h_ratio = 1.0f; -+ } -+ -+ /* All inconsistent resolutions have correct height ratio, so compute the width ratio */ -+ real_w_ratio = mode_host.dmPelsWidth / (mode_host.dmPelsHeight / h_ratio); -+ for (i = 0; i < ARRAY_SIZE(fs_monitor_sizes_fsr); ++i) -+ { -+ if (h_ratio == 1.0f) -+ { -+ /* Naive generation (matches AMD mode documentation but not sample code) */ -+ /* AMD's sample rounds down, which doesn't match their published list of resolutions */ -+ fs_monitor_sizes_fsr[i].size.cy = (DWORD)(mode_host.dmPelsHeight / fsr_ratios[i] + 0.5f); -+ fs_monitor_sizes_fsr[i].size.cx = (DWORD)(fs_monitor_sizes_fsr[i].size.cy -+ * ((float)mode_host.dmPelsWidth / (float)mode_host.dmPelsHeight) + 0.5f); -+ } -+ else -+ { -+ /* Round to nearest integer (our way) */ -+ h_factor = (DWORD)((mode_host.dmPelsHeight / h_ratio) / fsr_ratios[i] + 0.5f); -+ fs_monitor_sizes_fsr[i].size.cx = (DWORD)(real_w_ratio * h_factor + 0.5f); -+ fs_monitor_sizes_fsr[i].size.cy = (DWORD)(h_ratio * h_factor + 0.5f); -+ } -+ TRACE("created fsr resolution: %ux%u, ratio: %1.1f\n", -+ fs_monitor_sizes_fsr[i].size.cx, -+ fs_monitor_sizes_fsr[i].size.cy, -+ fsr_ratios[i]); -+ } -+ -+ is_fsr_single_mode = fs_hack_is_fsr_single_mode(&fsr_mode); -+ /* If the user requested a single mode, only add that to the list */ -+ if (is_fsr_single_mode) -+ { -+ memcpy(fs_monitor_sizes+fs_monitor_sizes_count, &fs_monitor_sizes_fsr[fsr_mode], sizeof(fs_monitor_sizes_fsr[fsr_mode])); -+ fs_monitor_sizes_count += 1; -+ /* Also place it in the custom resolution container, so we can limit resolutions later on */ -+ fsr_custom_size.size.cx = fs_monitor_sizes_fsr[fsr_mode].size.cx; -+ fsr_custom_size.size.cy = fs_monitor_sizes_fsr[fsr_mode].size.cy; -+ } -+ /* If a single mode was not specified, add all FSR resolutions */ -+ else -+ { -+ memcpy(fs_monitor_sizes+fs_monitor_sizes_count, fs_monitor_sizes_fsr, sizeof(fs_monitor_sizes_fsr)); -+ fs_monitor_sizes_count += ARRAY_SIZE(fs_monitor_sizes_fsr); -+ } -+ -+ /* Add the custom resolution to the list */ -+ is_fsr_custom_mode = fs_hack_is_fsr_custom_mode(&fsr_custom_size); -+ if (is_fsr_custom_mode) -+ { -+ memcpy(fs_monitor_sizes + fs_monitor_sizes_count, &fsr_custom_size, sizeof(fsr_custom_size)); -+ fs_monitor_sizes_count += 1; -+ TRACE("added custom resolution: %ux%u\n", fsr_custom_size.size.cx, fsr_custom_size.size.cy); -+ } -+ } -+ -+ /* Copy the default list */ -+ memcpy(fs_monitor_sizes+fs_monitor_sizes_count, fs_monitor_sizes_base, sizeof(fs_monitor_sizes_base)); -+ fs_monitor_sizes_count += ARRAY_SIZE(fs_monitor_sizes_base); -+ - max_count = ARRAY_SIZE(fs_monitor_sizes) * DEPTH_COUNT + real_mode_count; - if (center_modes) max_count += ARRAY_SIZE(fs_monitor_sizes) + real_mode_count; - -@@ -328,7 +490,7 @@ static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UIN - additional_modes = !strcmp( env, "979400" ); - - /* Linux reports far fewer resolutions than Windows. Add modes that some games may expect. */ -- for (i = 0; i < ARRAY_SIZE(fs_monitor_sizes); ++i) -+ for (i = 0; i < fs_monitor_sizes_count; ++i) - { - DEVMODEW mode = mode_host; - -@@ -349,6 +511,12 @@ static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UIN - if (mode.dmPelsWidth > mode_host.dmPelsWidth) continue; - if (mode.dmPelsHeight > mode_host.dmPelsHeight) continue; - -+ /* Don't report modes that are larger than the requested fsr mode or the custom mode */ -+ if(is_fsr && (is_fsr_custom_mode || is_fsr_single_mode)) { -+ if (mode.dmPelsWidth > fsr_custom_size.size.cx) continue; -+ if (mode.dmPelsHeight > fsr_custom_size.size.cy) continue; -+ } -+ - for (j = 0; j < DEPTH_COUNT; ++j) - { - mode.dmBitsPerPel = depths[j]; -@@ -368,6 +536,12 @@ static void monitor_get_modes( struct fs_monitor *monitor, DEVMODEW **modes, UIN - { - DEVMODEW mode = *real_mode; - -+ /* Don't report modes that are larger than the requested fsr mode or the custom mode */ -+ if(is_fsr && (is_fsr_custom_mode || is_fsr_single_mode)) { -+ if (mode.dmPelsWidth > fsr_custom_size.size.cx) continue; -+ if (mode.dmPelsHeight > fsr_custom_size.size.cy) continue; -+ } -+ - /* Don't report modes that are larger than the current mode */ - if (mode.dmPelsWidth <= mode_host.dmPelsWidth && mode.dmPelsHeight <= mode_host.dmPelsHeight) - { -@@ -652,6 +826,28 @@ BOOL fs_hack_is_integer(void) - return is_int; - } - -+BOOL fs_hack_is_fsr(float *sharpness) -+{ -+ static int is_fsr = -1; -+ int sharpness_int = 2; -+ if (is_fsr < 0) -+ { -+ const char *e = getenv("WINE_FULLSCREEN_FSR"); -+ is_fsr = e && strcmp(e, "0"); -+ } -+ if (sharpness) -+ { -+ const char *e = getenv("WINE_FULLSCREEN_FSR_STRENGTH"); -+ if (e) -+ { -+ sharpness_int = atoi(e); -+ } -+ *sharpness = (float) sharpness_int / 10.0f; -+ } -+ TRACE("is_fsr: %s, sharpness: %2.4f\n", is_fsr ? "TRUE" : "FALSE", sharpness ? *sharpness : 0.0f); -+ return is_fsr; -+} -+ - HMONITOR fs_hack_monitor_from_rect( const RECT *in_rect ) - { - RECT rect = *in_rect; -diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c -index 33761764c74..dba60e0c4e0 100644 ---- a/dlls/winex11.drv/vulkan.c -+++ b/dlls/winex11.drv/vulkan.c -@@ -1112,7 +1112,7 @@ static VkSurfaceKHR X11DRV_wine_get_host_surface( VkSurfaceKHR surface ) - } - - static VkBool32 X11DRV_query_fs_hack( VkSurfaceKHR surface, VkExtent2D *real_sz, -- VkExtent2D *user_sz, VkRect2D *dst_blit, VkFilter *filter ) -+ VkExtent2D *user_sz, VkRect2D *dst_blit, VkFilter *filter , BOOL *fsr, float *sharpness) - { - struct wine_vk_surface *x11_surface = surface_from_handle( surface ); - HMONITOR monitor; -@@ -1170,6 +1170,9 @@ static VkBool32 X11DRV_query_fs_hack( VkSurfaceKHR surface, VkExtent2D *real_sz, - - if (filter) *filter = fs_hack_is_integer() ? VK_FILTER_NEAREST : VK_FILTER_LINEAR; - -+ if (fsr) -+ *fsr = fs_hack_is_fsr(sharpness); -+ - return VK_TRUE; - } - else if (fs_hack_enabled( monitor )) -@@ -1201,6 +1204,9 @@ static VkBool32 X11DRV_query_fs_hack( VkSurfaceKHR surface, VkExtent2D *real_sz, - - if (filter) *filter = fs_hack_is_integer() ? VK_FILTER_NEAREST : VK_FILTER_LINEAR; - -+ if (fsr) -+ *fsr = fs_hack_is_fsr(sharpness); -+ - return VK_TRUE; - } - -diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h -index 9d3f742cbad..a56498ef613 100644 ---- a/dlls/winex11.drv/x11drv.h -+++ b/dlls/winex11.drv/x11drv.h -@@ -706,6 +706,7 @@ extern void *uri_list_to_drop_files( const void *data, size_t size, size_t *ret_ - extern BOOL fs_hack_enabled( HMONITOR monitor ); - extern BOOL fs_hack_mapping_required( HMONITOR monitor ); - extern BOOL fs_hack_is_integer(void); -+extern BOOL fs_hack_is_fsr(float *sharpness); - extern HMONITOR fs_hack_monitor_from_hwnd( HWND hwnd ); - extern HMONITOR fs_hack_monitor_from_rect( const RECT *rect ); - extern BOOL fs_hack_matches_current_mode( HMONITOR monitor, INT width, INT height ); --- -2.44.0 - diff --git a/4947.patch b/4947.patch deleted file mode 100644 index db17ead5d5a5..000000000000 --- a/4947.patch +++ /dev/null @@ -1,1017 +0,0 @@ -From ee42a8156180a15b24efc9e5c2a14935befb9d1d Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Tue, 16 Jan 2024 10:40:15 +0200 -Subject: [PATCH 1/7] winewayland.drv: Advertise common display modes. - -The reporting of non-current wl_output modes is deprecated, and most -compositors now report only the current display mode. - -Since Wayland doesn't allow clients to directly change the hardware -display mode, we can safely make some common display modes available to -applications. ---- - dlls/winewayland.drv/wayland_output.c | 94 ++++++++++++++++++++++++--- - 1 file changed, 85 insertions(+), 9 deletions(-) - -diff --git a/dlls/winewayland.drv/wayland_output.c b/dlls/winewayland.drv/wayland_output.c -index f5941c10f6f..0dfc1d974e4 100644 ---- a/dlls/winewayland.drv/wayland_output.c -+++ b/dlls/winewayland.drv/wayland_output.c -@@ -40,6 +40,54 @@ static uint32_t next_output_id = 0; - #define WAYLAND_OUTPUT_CHANGED_LOGICAL_XY 0x04 - #define WAYLAND_OUTPUT_CHANGED_LOGICAL_WH 0x08 - -+static const struct { int32_t width; int32_t height; } common_modes[] = { -+ { 320, 200}, /* CGA 16:10 */ -+ { 320, 240}, /* QVGA 4:3 */ -+ { 400, 300}, /* qSVGA 4:3 */ -+ { 480, 320}, /* HVGA 3:2 */ -+ { 512, 384}, /* MAC 4:3 */ -+ { 640, 360}, /* nHD 16:9 */ -+ { 640, 400}, /* VESA-0100h 16:10 */ -+ { 640, 480}, /* VGA 4:3 */ -+ { 720, 480}, /* WVGA 3:2 */ -+ { 720, 576}, /* PAL 5:4 */ -+ { 768, 480}, /* WVGA 16:10 */ -+ { 768, 576}, /* PAL* 4:3 */ -+ { 800, 600}, /* SVGA 4:3 */ -+ { 854, 480}, /* FWVGA 16:9 */ -+ { 960, 540}, /* qHD 16:9 */ -+ { 960, 640}, /* DVGA 3:2 */ -+ {1024, 576}, /* WSVGA 16:9 */ -+ {1024, 640}, /* WSVGA 16:10 */ -+ {1024, 768}, /* XGA 4:3 */ -+ {1152, 864}, /* XGA+ 4:3 */ -+ {1280, 720}, /* HD 16:9 */ -+ {1280, 768}, /* WXGA 5:3 */ -+ {1280, 800}, /* WXGA 16:10 */ -+ {1280, 960}, /* SXGA- 4:3 */ -+ {1280, 1024}, /* SXGA 5:4 */ -+ {1366, 768}, /* FWXGA 16:9 */ -+ {1400, 1050}, /* SXGA+ 4:3 */ -+ {1440, 900}, /* WSXGA 16:10 */ -+ {1600, 900}, /* HD+ 16:9 */ -+ {1600, 1200}, /* UXGA 4:3 */ -+ {1680, 1050}, /* WSXGA+ 16:10 */ -+ {1920, 1080}, /* FHD 16:9 */ -+ {1920, 1200}, /* WUXGA 16:10 */ -+ {2048, 1152}, /* QWXGA 16:9 */ -+ {2048, 1536}, /* QXGA 4:3 */ -+ {2560, 1440}, /* QHD 16:9 */ -+ {2560, 1600}, /* WQXGA 16:10 */ -+ {2560, 2048}, /* QSXGA 5:4 */ -+ {2880, 1620}, /* 3K 16:9 */ -+ {3200, 1800}, /* QHD+ 16:9 */ -+ {3200, 2400}, /* QUXGA 4:3 */ -+ {3840, 2160}, /* 4K 16:9 */ -+ {3840, 2400}, /* WQUXGA 16:10 */ -+ {5120, 2880}, /* 5K 16:9 */ -+ {7680, 4320}, /* 8K 16:9 */ -+}; -+ - /********************************************************************** - * Output handling - */ -@@ -102,6 +150,31 @@ static void wayland_output_state_add_mode(struct wayland_output_state *state, - if (current) state->current_mode = mode; - } - -+static void wayland_output_state_add_common_modes(struct wayland_output_state *state) -+{ -+ int i; -+ -+ for (i = 0; i < ARRAY_SIZE(common_modes); i++) -+ { -+ int32_t width = common_modes[i].width; -+ int32_t height = common_modes[i].height; -+ -+ /* Skip if this mode is larger than the current (native) mode. */ -+ if (width > state->current_mode->width || -+ height > state->current_mode->height) -+ { -+ TRACE("Skipping mode %dx%d (current: %dx%d)\n", -+ width, height, state->current_mode->width, -+ state->current_mode->height); -+ continue; -+ } -+ -+ wayland_output_state_add_mode(state, width, height, -+ state->current_mode->refresh, -+ FALSE); -+ } -+} -+ - static void maybe_init_display_devices(void) - { - DWORD desktop_pid = 0; -@@ -136,14 +209,15 @@ static void wayland_output_done(struct wayland_output *output) - - if (output->pending_flags & WAYLAND_OUTPUT_CHANGED_MODES) - { -- RB_FOR_EACH_ENTRY(mode, &output->pending.modes, struct wayland_output_mode, entry) -- { -- wayland_output_state_add_mode(&output->current, -- mode->width, mode->height, mode->refresh, -- mode == output->pending.current_mode); -- } -- rb_destroy(&output->pending.modes, wayland_output_mode_free_rb, NULL); -+ rb_destroy(&output->current.modes, wayland_output_mode_free_rb, NULL); -+ output->current.modes = output->pending.modes; -+ output->current.current_mode = output->pending.current_mode; -+ if (!output->current.current_mode) -+ WARN("No current mode reported by compositor\n"); -+ else -+ wayland_output_state_add_common_modes(&output->current); - rb_init(&output->pending.modes, wayland_output_mode_cmp_rb); -+ output->pending.current_mode = NULL; - } - - if (output->pending_flags & WAYLAND_OUTPUT_CHANGED_NAME) -@@ -206,11 +280,13 @@ static void output_handle_mode(void *data, struct wl_output *wl_output, - { - struct wayland_output *output = data; - -+ /* Non-current mode information is deprecated. */ -+ if (!(flags & WL_OUTPUT_MODE_CURRENT)) return; -+ - /* Windows apps don't expect a zero refresh rate, so use a default value. */ - if (refresh == 0) refresh = default_refresh; - -- wayland_output_state_add_mode(&output->pending, width, height, refresh, -- (flags & WL_OUTPUT_MODE_CURRENT)); -+ wayland_output_state_add_mode(&output->pending, width, height, refresh, TRUE); - - output->pending_flags |= WAYLAND_OUTPUT_CHANGED_MODES; - } --- -GitLab - - -From a5deba20bed30dcbace5d234def95fdcd17e79ec Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Thu, 25 Jan 2024 10:41:45 +0200 -Subject: [PATCH 2/7] winewayland.drv: Advertise display modes for 8 bpp and 16 - bpp. - ---- - dlls/winewayland.drv/display.c | 28 ++++++++++++++++++---------- - 1 file changed, 18 insertions(+), 10 deletions(-) - -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index ebe151ffab0..a8fcaf2a2f5 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -246,13 +246,14 @@ static void wayland_add_device_monitor(const struct gdi_device_manager *device_m - device_manager->add_monitor(&monitor, param); - } - --static void populate_devmode(struct wayland_output_mode *output_mode, DEVMODEW *mode) -+static void populate_devmode(struct wayland_output_mode *output_mode, DWORD bpp, -+ DEVMODEW *mode) - { - mode->dmFields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | - DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY; - mode->dmDisplayOrientation = DMDO_DEFAULT; - mode->dmDisplayFlags = 0; -- mode->dmBitsPerPel = 32; -+ mode->dmBitsPerPel = bpp; - mode->dmPelsWidth = output_mode->width; - mode->dmPelsHeight = output_mode->height; - mode->dmDisplayFrequency = output_mode->refresh / 1000; -@@ -261,21 +262,28 @@ static void populate_devmode(struct wayland_output_mode *output_mode, DEVMODEW * - static void wayland_add_device_modes(const struct gdi_device_manager *device_manager, - void *param, struct output_info *output_info) - { -+ static const DWORD bpps[] = {32, 16, 8}; - struct wayland_output_mode *output_mode; -+ int i; - - RB_FOR_EACH_ENTRY(output_mode, &output_info->output->modes, - struct wayland_output_mode, entry) - { -- DEVMODEW mode = {.dmSize = sizeof(mode)}; -- BOOL mode_is_current = output_mode == output_info->output->current_mode; -- populate_devmode(output_mode, &mode); -- if (mode_is_current) -+ for (i = 0; i < ARRAY_SIZE(bpps); i++) - { -- mode.dmFields |= DM_POSITION; -- mode.dmPosition.x = output_info->x; -- mode.dmPosition.y = output_info->y; -+ DEVMODEW mode = {.dmSize = sizeof(mode)}; -+ BOOL mode_is_current = output_mode == output_info->output->current_mode && -+ bpps[i] == 32; -+ -+ populate_devmode(output_mode, bpps[i], &mode); -+ if (mode_is_current) -+ { -+ mode.dmFields |= DM_POSITION; -+ mode.dmPosition.x = output_info->x; -+ mode.dmPosition.y = output_info->y; -+ } -+ device_manager->add_mode(&mode, mode_is_current, param); - } -- device_manager->add_mode(&mode, mode_is_current, param); - } - } - --- -GitLab - - -From bac33e2f0f91891cc508905b61c23538e224c633 Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Fri, 26 Jan 2024 11:19:11 +0200 -Subject: [PATCH 3/7] winewayland.drv: Dissociate current display mode from - Wayland native mode. - -Refactor output_info to dissociate the current display mode from the -Wayland native display mode, in preparation for handling display mode changes. ---- - dlls/winewayland.drv/display.c | 36 ++++++++++++++++++++++------------ - 1 file changed, 23 insertions(+), 13 deletions(-) - -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index a8fcaf2a2f5..888c6e5aabb 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -51,6 +51,8 @@ struct output_info - { - int x, y; - struct wayland_output_state *output; -+ struct wayland_output_mode *mode; -+ UINT bpp; - }; - - static int output_info_cmp_primary_x_y(const void *va, const void *vb) -@@ -71,10 +73,10 @@ static int output_info_cmp_primary_x_y(const void *va, const void *vb) - - static inline BOOL output_info_overlap(struct output_info *a, struct output_info *b) - { -- return b->x < a->x + a->output->current_mode->width && -- b->x + b->output->current_mode->width > a->x && -- b->y < a->y + a->output->current_mode->height && -- b->y + b->output->current_mode->height > a->y; -+ return b->x < a->x + a->mode->width && -+ b->x + b->mode->width > a->x && -+ b->y < a->y + a->mode->height && -+ b->y + b->mode->height > a->y; - } - - /* Map a point to one of the four quadrants of our 2d coordinate space: -@@ -156,16 +158,16 @@ static BOOL output_info_array_resolve_overlaps(struct wl_array *output_info_arra - rel_x = (move->output->logical_x - anchor->output->logical_x + - (x_use_end ? move->output->logical_w : 0)) / - (double)anchor->output->logical_w; -- move->x = anchor->x + anchor->output->current_mode->width * rel_x - -- (x_use_end ? move->output->current_mode->width : 0); -+ move->x = anchor->x + anchor->mode->width * rel_x - -+ (x_use_end ? move->mode->width : 0); - - /* Similarly for the Y axis. */ - y_use_end = move->output->logical_y < anchor->output->logical_y; - rel_y = (move->output->logical_y - anchor->output->logical_y + - (y_use_end ? move->output->logical_h : 0)) / - (double)anchor->output->logical_h; -- move->y = anchor->y + anchor->output->current_mode->height * rel_y - -- (y_use_end ? move->output->current_mode->height : 0); -+ move->y = anchor->y + anchor->mode->height * rel_y - -+ (y_use_end ? move->mode->height : 0); - } - } - -@@ -231,8 +233,8 @@ static void wayland_add_device_monitor(const struct gdi_device_manager *device_m - struct gdi_monitor monitor = {0}; - - SetRect(&monitor.rc_monitor, output_info->x, output_info->y, -- output_info->x + output_info->output->current_mode->width, -- output_info->y + output_info->output->current_mode->height); -+ output_info->x + output_info->mode->width, -+ output_info->y + output_info->mode->height); - - /* We don't have a direct way to get the work area in Wayland. */ - monitor.rc_work = monitor.rc_monitor; -@@ -272,8 +274,8 @@ static void wayland_add_device_modes(const struct gdi_device_manager *device_man - for (i = 0; i < ARRAY_SIZE(bpps); i++) - { - DEVMODEW mode = {.dmSize = sizeof(mode)}; -- BOOL mode_is_current = output_mode == output_info->output->current_mode && -- bpps[i] == 32; -+ BOOL mode_is_current = output_mode == output_info->mode && -+ bpps[i] == output_info->bpp; - - populate_devmode(output_mode, bpps[i], &mode); - if (mode_is_current) -@@ -287,6 +289,14 @@ static void wayland_add_device_modes(const struct gdi_device_manager *device_man - } - } - -+static void output_info_init(struct output_info *output_info, -+ struct wayland_output *output) -+{ -+ output_info->output = &output->current; -+ output_info->mode = output->current.current_mode; -+ output_info->bpp = 32; -+} -+ - /*********************************************************************** - * UpdateDisplayDevices (WAYLAND.@) - */ -@@ -312,7 +322,7 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - { - if (!output->current.current_mode) continue; - output_info = wl_array_add(&output_info_array, sizeof(*output_info)); -- if (output_info) output_info->output = &output->current; -+ if (output_info) output_info_init(output_info, output); - else ERR("Failed to allocate space for output_info\n"); - } - --- -GitLab - - -From 8b38be18592fb0538efee64a46e4de9a7321d34b Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Thu, 25 Jan 2024 12:06:54 +0200 -Subject: [PATCH 4/7] winewayland.drv: Respect current device mode on display - device updates. - -Since Wayland doesn't support mode changes, we let win32u handle them by -just recording them in the registry, and we use that information as the -authoritative source for the current mode when updating the devices. ---- - dlls/win32u/sysparams.c | 29 ++++++++++++++++++++- - dlls/winewayland.drv/display.c | 47 +++++++++++++++++++++++++++++++--- - include/wine/gdi_driver.h | 1 + - 3 files changed, 72 insertions(+), 5 deletions(-) - -diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c -index e2c5b10da9e..694c41cb317 100644 ---- a/dlls/win32u/sysparams.c -+++ b/dlls/win32u/sysparams.c -@@ -1253,8 +1253,8 @@ static void add_gpu( const struct gdi_gpu *gpu, void *param ) - { - ctx->mutex = get_display_device_init_mutex(); - pthread_mutex_lock( &display_lock ); -- prepare_devices(); - } -+ if (gpu_index == 0) prepare_devices(); - - sprintf( buffer, "PCI\\VEN_%04X&DEV_%04X&SUBSYS_%08X&REV_%02X\\%08X", - gpu->vendor_id, gpu->device_id, gpu->subsys_id, gpu->revision_id, gpu_index ); -@@ -1634,12 +1634,33 @@ static void add_mode( const DEVMODEW *mode, BOOL current, void *param ) - } - } - -+static struct display_device *find_adapter_device_by_id( UINT index ); -+ -+static BOOL get_adapter( UINT adapter_idx, DEVMODEW *mode, void *param ) -+{ -+ struct device_manager_ctx *ctx = param; -+ struct display_device *device; -+ struct adapter *adapter = NULL; -+ -+ if (!ctx->mutex) -+ { -+ ctx->mutex = get_display_device_init_mutex(); -+ pthread_mutex_lock( &display_lock ); -+ } -+ -+ if (!(device = find_adapter_device_by_id( adapter_idx ))) return FALSE; -+ adapter = CONTAINING_RECORD( device, struct adapter, dev ); -+ -+ return adapter_get_current_settings( adapter, mode ); -+} -+ - static const struct gdi_device_manager device_manager = - { - add_gpu, - add_adapter, - add_monitor, - add_mode, -+ get_adapter, - }; - - static void reset_display_manager_ctx( struct device_manager_ctx *ctx ) -@@ -1899,12 +1920,18 @@ static void desktop_add_mode( const DEVMODEW *mode, BOOL current, void *param ) - } - } - -+static BOOL desktop_get_adapter( UINT id, DEVMODEW *mode, void *param ) -+{ -+ return FALSE; -+} -+ - static const struct gdi_device_manager desktop_device_manager = - { - desktop_add_gpu, - desktop_add_adapter, - desktop_add_monitor, - desktop_add_mode, -+ desktop_get_adapter, - }; - - static BOOL desktop_update_display_devices( BOOL force, struct device_manager_ctx *ctx ) -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index 888c6e5aabb..584732a73db 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -289,12 +289,47 @@ static void wayland_add_device_modes(const struct gdi_device_manager *device_man - } - } - -+static struct wayland_output_mode *get_matching_output_mode(struct wayland_output *output, -+ DEVMODEW *devmode) -+{ -+ struct wayland_output_mode *output_mode; -+ -+ RB_FOR_EACH_ENTRY(output_mode, &output->current.modes, -+ struct wayland_output_mode, entry) -+ { -+ if (devmode->dmPelsWidth == output_mode->width && -+ devmode->dmPelsHeight == output_mode->height && -+ output_mode->refresh / 1000 == devmode->dmDisplayFrequency) -+ { -+ return output_mode; -+ } -+ } -+ -+ return NULL; -+} -+ - static void output_info_init(struct output_info *output_info, -- struct wayland_output *output) -+ struct wayland_output *output, -+ int adapter_id, -+ const struct gdi_device_manager *device_manager, -+ void *param) - { -+ DEVMODEW devmode = {.dmSize = sizeof(devmode)}; -+ struct wayland_output_mode *mode; -+ - output_info->output = &output->current; -- output_info->mode = output->current.current_mode; -- output_info->bpp = 32; -+ -+ if (device_manager->get_adapter(adapter_id, &devmode, param) && -+ (mode = get_matching_output_mode(output, &devmode))) -+ { -+ output_info->mode = mode; -+ output_info->bpp = devmode.dmBitsPerPel; -+ } -+ else -+ { -+ output_info->mode = output->current.current_mode; -+ output_info->bpp = 32; -+ } - } - - /*********************************************************************** -@@ -322,8 +357,11 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - { - if (!output->current.current_mode) continue; - output_info = wl_array_add(&output_info_array, sizeof(*output_info)); -- if (output_info) output_info_init(output_info, output); -+ /* TODO: Don't assume that the order of devices matches the order -+ * of the outputs in the list. */ -+ if (output_info) output_info_init(output_info, output, output_id, device_manager, param); - else ERR("Failed to allocate space for output_info\n"); -+ output_id++; - } - - output_info_array_arrange_physical_coords(&output_info_array); -@@ -331,6 +369,7 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - /* Populate GDI devices. */ - wayland_add_device_gpu(device_manager, param); - -+ output_id = 0; - wl_array_for_each(output_info, &output_info_array) - { - wayland_add_device_adapter(device_manager, param, output_id); -diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h -index bd827c31cb1..d3679377344 100644 ---- a/include/wine/gdi_driver.h -+++ b/include/wine/gdi_driver.h -@@ -275,6 +275,7 @@ struct gdi_device_manager - void (*add_adapter)( const struct gdi_adapter *adapter, void *param ); - void (*add_monitor)( const struct gdi_monitor *monitor, void *param ); - void (*add_mode)( const DEVMODEW *mode, BOOL current, void *param ); -+ BOOL (*get_adapter)( UINT id, DEVMODEW *mode, void *param ); - }; - - #define WINE_DM_UNSUPPORTED 0x80000000 --- -GitLab - - -From 9252671be93e24ab266ee7b1f996748b1e34b0b9 Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Tue, 16 Jan 2024 10:36:58 +0200 -Subject: [PATCH 5/7] winewayland.drv: Associate each GDI adapter with its - Wayland output. - -Introduce and use driver data for GDI adapters to associate each -adapter with its corresponding Wayland output. - -Use this association to ensure we get the proper current display -mode for each output, when updating the display devices. ---- - dlls/win32u/sysparams.c | 36 +++++++++++++++++++++++--- - dlls/winewayland.drv/display.c | 47 +++++++++++++++++++++++----------- - include/wine/gdi_driver.h | 4 ++- - 3 files changed, 68 insertions(+), 19 deletions(-) - -diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c -index 694c41cb317..9b01c3c1513 100644 ---- a/dlls/win32u/sysparams.c -+++ b/dlls/win32u/sysparams.c -@@ -183,6 +183,7 @@ static const WCHAR linkedW[] = {'L','i','n','k','e','d',0}; - static const WCHAR symbolic_link_valueW[] = - {'S','y','m','b','o','l','i','c','L','i','n','k','V','a','l','u','e',0}; - static const WCHAR state_flagsW[] = {'S','t','a','t','e','F','l','a','g','s',0}; -+static const WCHAR driver_dataW[] = {'D','r','i','v','e','r','D','a','t','a',0}; - static const WCHAR gpu_idW[] = {'G','P','U','I','D',0}; - static const WCHAR hardware_idW[] = {'H','a','r','d','w','a','r','e','I','D',0}; - static const WCHAR device_descW[] = {'D','e','v','i','c','e','D','e','s','c',0}; -@@ -243,6 +244,8 @@ struct adapter - const WCHAR *config_key; - unsigned int mode_count; - DEVMODEW *modes; -+ unsigned char *driver_data; -+ UINT driver_data_len; - }; - - #define MONITOR_INFO_HAS_MONITOR_ID 0x00000001 -@@ -476,6 +479,7 @@ static void adapter_release( struct adapter *adapter ) - if (!InterlockedDecrement( &adapter->refcount )) - { - free( adapter->modes ); -+ free( adapter->driver_data ); - free( adapter ); - } - } -@@ -760,6 +764,21 @@ static BOOL read_display_adapter_settings( unsigned int index, struct adapter *i - if (query_reg_value( hkey, state_flagsW, value, sizeof(buffer) ) && value->Type == REG_DWORD) - info->dev.state_flags = *(const DWORD *)value->Data; - -+ /* DriverData */ -+ if (query_reg_value( hkey, driver_dataW, value, sizeof(buffer) ) && value->Type == REG_BINARY) -+ { -+ info->driver_data = malloc( value->DataLength ); -+ if (info->driver_data) -+ { -+ memcpy( info->driver_data, value->Data, value->DataLength ); -+ info->driver_data_len = value->DataLength; -+ } -+ else -+ { -+ info->driver_data_len = 0; -+ } -+ } -+ - /* Interface name */ - info->dev.interface_name[0] = 0; - -@@ -1479,6 +1498,11 @@ static void add_adapter( const struct gdi_adapter *adapter, void *param ) - (lstrlenW( ctx->gpuid ) + 1) * sizeof(WCHAR) ); - set_reg_value( ctx->adapter_key, state_flagsW, REG_DWORD, &adapter->state_flags, - sizeof(adapter->state_flags) ); -+ if (adapter->driver_data && adapter->driver_data_len) -+ { -+ set_reg_value( ctx->adapter_key, driver_dataW, REG_BINARY, -+ adapter->driver_data, adapter->driver_data_len ); -+ } - } - - static void add_monitor( const struct gdi_monitor *monitor, void *param ) -@@ -1636,7 +1660,7 @@ static void add_mode( const DEVMODEW *mode, BOOL current, void *param ) - - static struct display_device *find_adapter_device_by_id( UINT index ); - --static BOOL get_adapter( UINT adapter_idx, DEVMODEW *mode, void *param ) -+static BOOL get_adapter( UINT adapter_idx, DEVMODEW *mode, void *data, UINT *data_len, void *param ) - { - struct device_manager_ctx *ctx = param; - struct display_device *device; -@@ -1651,7 +1675,13 @@ static BOOL get_adapter( UINT adapter_idx, DEVMODEW *mode, void *param ) - if (!(device = find_adapter_device_by_id( adapter_idx ))) return FALSE; - adapter = CONTAINING_RECORD( device, struct adapter, dev ); - -- return adapter_get_current_settings( adapter, mode ); -+ if (!adapter_get_current_settings( adapter, mode )) return FALSE; -+ -+ *data_len = min( *data_len, adapter->driver_data_len ); -+ if (data && adapter->driver_data) -+ memcpy( data, adapter->driver_data, *data_len ); -+ -+ return TRUE; - } - - static const struct gdi_device_manager device_manager = -@@ -1920,7 +1950,7 @@ static void desktop_add_mode( const DEVMODEW *mode, BOOL current, void *param ) - } - } - --static BOOL desktop_get_adapter( UINT id, DEVMODEW *mode, void *param ) -+static BOOL desktop_get_adapter( UINT id, DEVMODEW *mode, void *data, UINT *data_len, void *param ) - { - return FALSE; - } -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index 584732a73db..ab7f7599659 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -47,6 +47,11 @@ void wayland_init_display_devices(BOOL force) - NtUserGetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &num_path, &num_mode); - } - -+struct wayland_adapter_data -+{ -+ char output_name[64]; -+}; -+ - struct output_info - { - int x, y; -@@ -213,14 +218,21 @@ static void wayland_add_device_gpu(const struct gdi_device_manager *device_manag - } - - static void wayland_add_device_adapter(const struct gdi_device_manager *device_manager, -- void *param, INT output_id) -+ void *param, INT output_id, -+ struct output_info *output_info) - { - struct gdi_adapter adapter; -+ struct wayland_adapter_data data; -+ - adapter.id = output_id; - adapter.state_flags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP; - if (output_id == 0) - adapter.state_flags |= DISPLAY_DEVICE_PRIMARY_DEVICE; - -+ lstrcpynA(data.output_name, output_info->output->name, sizeof(data.output_name)); -+ adapter.driver_data = &data; -+ adapter.driver_data_len = sizeof(data); -+ - TRACE("id=0x%s state_flags=0x%x\n", - wine_dbgstr_longlong(adapter.id), (UINT)adapter.state_flags); - -@@ -310,25 +322,32 @@ static struct wayland_output_mode *get_matching_output_mode(struct wayland_outpu - - static void output_info_init(struct output_info *output_info, - struct wayland_output *output, -- int adapter_id, - const struct gdi_device_manager *device_manager, - void *param) - { - DEVMODEW devmode = {.dmSize = sizeof(devmode)}; - struct wayland_output_mode *mode; -+ struct wayland_adapter_data data; -+ UINT data_len = sizeof(data); -+ UINT id = 0; - - output_info->output = &output->current; -+ output_info->mode = output->current.current_mode; -+ output_info->bpp = 32; - -- if (device_manager->get_adapter(adapter_id, &devmode, param) && -- (mode = get_matching_output_mode(output, &devmode))) -- { -- output_info->mode = mode; -- output_info->bpp = devmode.dmBitsPerPel; -- } -- else -+ while (device_manager->get_adapter(id, &devmode, &data, &data_len, param)) - { -- output_info->mode = output->current.current_mode; -- output_info->bpp = 32; -+ if (data_len == sizeof(data) && -+ !strcmp(output->current.name, data.output_name)) -+ { -+ if ((mode = get_matching_output_mode(output, &devmode))) -+ { -+ output_info->mode = mode; -+ output_info->bpp = devmode.dmBitsPerPel; -+ } -+ } -+ data_len = sizeof(data); -+ ++id; - } - } - -@@ -359,9 +378,8 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - output_info = wl_array_add(&output_info_array, sizeof(*output_info)); - /* TODO: Don't assume that the order of devices matches the order - * of the outputs in the list. */ -- if (output_info) output_info_init(output_info, output, output_id, device_manager, param); -+ if (output_info) output_info_init(output_info, output, device_manager, param); - else ERR("Failed to allocate space for output_info\n"); -- output_id++; - } - - output_info_array_arrange_physical_coords(&output_info_array); -@@ -369,10 +387,9 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - /* Populate GDI devices. */ - wayland_add_device_gpu(device_manager, param); - -- output_id = 0; - wl_array_for_each(output_info, &output_info_array) - { -- wayland_add_device_adapter(device_manager, param, output_id); -+ wayland_add_device_adapter(device_manager, param, output_id, output_info); - wayland_add_device_monitor(device_manager, param, output_info); - wayland_add_device_modes(device_manager, param, output_info); - output_id++; -diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h -index d3679377344..202a164d070 100644 ---- a/include/wine/gdi_driver.h -+++ b/include/wine/gdi_driver.h -@@ -258,6 +258,8 @@ struct gdi_adapter - { - ULONG_PTR id; - DWORD state_flags; -+ void *driver_data; -+ UINT driver_data_len; - }; - - struct gdi_monitor -@@ -275,7 +277,7 @@ struct gdi_device_manager - void (*add_adapter)( const struct gdi_adapter *adapter, void *param ); - void (*add_monitor)( const struct gdi_monitor *monitor, void *param ); - void (*add_mode)( const DEVMODEW *mode, BOOL current, void *param ); -- BOOL (*get_adapter)( UINT id, DEVMODEW *mode, void *param ); -+ BOOL (*get_adapter)( UINT id, DEVMODEW *mode, void *data, UINT *data_len, void *param ); - }; - - #define WINE_DM_UNSUPPORTED 0x80000000 --- -GitLab - - -From 0bd3a469e4745ce1c9474b63b2c5d5e68e4a4634 Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Thu, 25 Jan 2024 15:21:22 +0200 -Subject: [PATCH 6/7] winewayland.drv: Adjust window scaling based on the - monitor display mode. - -Emulate the visual effect of a display mode change, by scaling the window according -to the ratios of the native vs current mode. - -We provide the adapter scaling information to the driver as part of the adapter -driver data so it's consistent across all processes. ---- - dlls/win32u/main.c | 6 ++++++ - dlls/win32u/sysparams.c | 17 +++++++++++++++++ - dlls/win32u/win32syscalls.h | 14 ++++++++------ - dlls/win32u/win32u.spec | 1 + - dlls/winewayland.drv/display.c | 9 ++++----- - dlls/winewayland.drv/waylanddrv.h | 7 +++++++ - dlls/winewayland.drv/window.c | 17 +++++++++++++++++ - dlls/wow64win/user.c | 6 ++++++ - include/ntuser.h | 1 + - 9 files changed, 67 insertions(+), 11 deletions(-) - -diff --git a/dlls/win32u/main.c b/dlls/win32u/main.c -index 2dc66e5df11..432f3fa892a 100644 ---- a/dlls/win32u/main.c -+++ b/dlls/win32u/main.c -@@ -2140,6 +2140,12 @@ HWND SYSCALL_API NtUserWindowFromPoint( LONG x, LONG y ) - __ASM_SYSCALL_FUNC( __id_NtUserWindowFromPoint ); - } - -+BOOL SYSCALL_API __wine_get_adapter_driver_data( UNICODE_STRING *devname, -+ void *data, UINT *data_len ) -+{ -+ __ASM_SYSCALL_FUNC( __id___wine_get_adapter_driver_data ); -+} -+ - BOOL SYSCALL_API __wine_get_file_outline_text_metric( const WCHAR *path, TEXTMETRICW *otm, - UINT *em_square, WCHAR *face_name ) - { -diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c -index 9b01c3c1513..65437801970 100644 ---- a/dlls/win32u/sysparams.c -+++ b/dlls/win32u/sysparams.c -@@ -6631,3 +6631,20 @@ NTSTATUS WINAPI NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEAD - return STATUS_INVALID_PARAMETER; - } - } -+ -+void WINAPI __wine_get_adapter_driver_data( UNICODE_STRING *devname, void *data, UINT *data_len ) -+{ -+ struct adapter *adapter; -+ -+ if ((adapter = find_adapter( devname ))) -+ { -+ *data_len = min( *data_len, adapter->driver_data_len ); -+ if (data && adapter->driver_data) -+ memcpy( data, adapter->driver_data, *data_len ); -+ adapter_release( adapter ); -+ } -+ else -+ { -+ *data_len = 0; -+ } -+} -diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec -index 24dccb6ec1d..18c973941e1 100644 ---- a/dlls/win32u/win32u.spec -+++ b/dlls/win32u/win32u.spec -@@ -1323,3 +1323,4 @@ - @ stdcall -syscall __wine_get_icm_profile(long long ptr ptr) - @ stdcall -syscall __wine_get_file_outline_text_metric(wstr ptr ptr ptr) - @ stdcall -syscall __wine_send_input(long ptr ptr) -+@ stdcall -syscall __wine_get_adapter_driver_data(ptr ptr ptr) -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index ab7f7599659..eba592a585e 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -47,11 +47,6 @@ void wayland_init_display_devices(BOOL force) - NtUserGetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS, &num_path, &num_mode); - } - --struct wayland_adapter_data --{ -- char output_name[64]; --}; -- - struct output_info - { - int x, y; -@@ -230,6 +225,10 @@ static void wayland_add_device_adapter(const struct gdi_device_manager *device_m - adapter.state_flags |= DISPLAY_DEVICE_PRIMARY_DEVICE; - - lstrcpynA(data.output_name, output_info->output->name, sizeof(data.output_name)); -+ data.scale_width = ((double)output_info->output->current_mode->width) / -+ output_info->mode->width; -+ data.scale_height = ((double)output_info->output->current_mode->height) / -+ output_info->mode->height; - adapter.driver_data = &data; - adapter.driver_data_len = sizeof(data); - -diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h -index 0883c43f1ff..48de2fb8c3f 100644 ---- a/dlls/winewayland.drv/waylanddrv.h -+++ b/dlls/winewayland.drv/waylanddrv.h -@@ -215,6 +215,13 @@ struct wayland_shm_buffer - HRGN damage_region; - }; - -+struct wayland_adapter_data -+{ -+ char output_name[64]; -+ /* How much larger the native mode is compared to current mode. */ -+ double scale_width, scale_height; -+}; -+ - /********************************************************************** - * Wayland initialization - */ -diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c -index ac5da371e5c..ae63b66b83e 100644 ---- a/dlls/winewayland.drv/window.c -+++ b/dlls/winewayland.drv/window.c -@@ -162,6 +162,8 @@ static void wayland_win_data_get_config(struct wayland_win_data *data, - struct wayland_window_config *conf) - { - enum wayland_surface_config_state window_state = 0; -+ MONITORINFOEXW mi = {.cbSize = sizeof(mi)}; -+ HMONITOR hmon; - DWORD style; - - conf->rect = data->window_rect; -@@ -187,6 +189,21 @@ static void wayland_win_data_get_config(struct wayland_win_data *data, - conf->scale = NtUserGetDpiForWindow(data->hwnd) / 96.0; - conf->visible = (style & WS_VISIBLE) == WS_VISIBLE; - conf->managed = data->managed; -+ -+ /* Adjust the window scale for the current display mode. */ -+ if ((hmon = NtUserMonitorFromWindow(data->hwnd, MONITOR_DEFAULTTOPRIMARY)) && -+ NtUserGetMonitorInfo(hmon, (MONITORINFO *)&mi)) -+ { -+ struct wayland_adapter_data adapter_data; -+ UINT adapter_data_len = sizeof(adapter_data); -+ UNICODE_STRING dev; -+ -+ RtlInitUnicodeString(&dev, mi.szDevice); -+ __wine_get_adapter_driver_data(&dev, &adapter_data, &adapter_data_len); -+ -+ if (adapter_data_len == sizeof(adapter_data)) -+ conf->scale /= min(adapter_data.scale_width, adapter_data.scale_height); -+ } - } - - static void wayland_win_data_update_wayland_surface(struct wayland_win_data *data) -diff --git a/dlls/wow64win/user.c b/dlls/wow64win/user.c -index 2dd811578f5..446856eecce 100644 ---- a/dlls/wow64win/user.c -+++ b/dlls/wow64win/user.c -@@ -4874,3 +4874,9 @@ NTSTATUS WINAPI wow64___wine_send_input( UINT *args ) - ERR( "not supported\n" ); - return 0; - } -+ -+NTSTATUS WINAPI wow64___wine_get_adapter_driver_data( UINT *args ) -+{ -+ ERR( "not supported\n" ); -+ return 0; -+} -diff --git a/include/ntuser.h b/include/ntuser.h -index 31b93ef36e9..70f46bf14b6 100644 ---- a/include/ntuser.h -+++ b/include/ntuser.h -@@ -1406,5 +1406,6 @@ static inline BOOL NtUserShowOwnedPopups( HWND hwnd, BOOL show ) - - /* Wine extensions */ - W32KAPI BOOL WINAPI __wine_send_input( HWND hwnd, const INPUT *input, const RAWINPUT *rawinput ); -+W32KAPI void WINAPI __wine_get_adapter_driver_data( UNICODE_STRING *devname, void *data, UINT *data_len ); - - #endif /* _NTUSER_ */ --- -GitLab - - -From 1aaeaeaac9a66ea5aaa66e5782d7d25fdfb1c7be Mon Sep 17 00:00:00 2001 -From: Alexandros Frantzis <alexandros.frantzis@collabora.com> -Date: Fri, 26 Jan 2024 16:04:15 +0200 -Subject: [PATCH 7/7] winewayland.drv: Refresh surfaces after display - configuration. - -Since a display reconfiguration may affect the compositor side scaling -which we apply to a surface, instruct all surfaces to refresh themselves -by committing an updated state based on the latest window state. ---- - dlls/winewayland.drv/display.c | 5 +++++ - dlls/winewayland.drv/waylanddrv.h | 1 + - dlls/winewayland.drv/window.c | 21 +++++++++++++++++++++ - 3 files changed, 27 insertions(+) - -diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c -index eba592a585e..3eb60354081 100644 ---- a/dlls/winewayland.drv/display.c -+++ b/dlls/winewayland.drv/display.c -@@ -398,5 +398,10 @@ BOOL WAYLAND_UpdateDisplayDevices(const struct gdi_device_manager *device_manage - - pthread_mutex_unlock(&process_wayland.output_mutex); - -+ /* Refresh all windows to ensure they have been committed with proper -+ * scaling applied. */ -+ if (process_wayland.initialized) -+ NtUserPostMessage(HWND_BROADCAST, WM_WAYLAND_REFRESH, 0, 0); -+ - return TRUE; - } -diff --git a/dlls/winewayland.drv/waylanddrv.h b/dlls/winewayland.drv/waylanddrv.h -index 48de2fb8c3f..ae423047240 100644 ---- a/dlls/winewayland.drv/waylanddrv.h -+++ b/dlls/winewayland.drv/waylanddrv.h -@@ -62,6 +62,7 @@ enum wayland_window_message - WM_WAYLAND_INIT_DISPLAY_DEVICES = WM_WINE_FIRST_DRIVER_MSG, - WM_WAYLAND_CONFIGURE, - WM_WAYLAND_SET_FOREGROUND, -+ WM_WAYLAND_REFRESH, - }; - - enum wayland_surface_config_state -diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c -index ae63b66b83e..6695e3e3830 100644 ---- a/dlls/winewayland.drv/window.c -+++ b/dlls/winewayland.drv/window.c -@@ -631,6 +631,24 @@ static void wayland_configure_window(HWND hwnd) - NtUserSetWindowPos(hwnd, 0, 0, 0, window_width, window_height, flags); - } - -+static void wayland_refresh_window(HWND hwnd) -+{ -+ struct wayland_win_data *data; -+ -+ if (!(data = wayland_win_data_get(hwnd))) return; -+ -+ if (data->wayland_surface) -+ { -+ pthread_mutex_lock(&data->wayland_surface->mutex); -+ wayland_win_data_get_config(data, &data->wayland_surface->window); -+ if (wayland_surface_reconfigure(data->wayland_surface)) -+ wl_surface_commit(data->wayland_surface->wl_surface); -+ pthread_mutex_unlock(&data->wayland_surface->mutex); -+ } -+ -+ wayland_win_data_release(data); -+} -+ - /********************************************************************** - * WAYLAND_WindowMessage - */ -@@ -648,6 +666,9 @@ LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) - case WM_WAYLAND_SET_FOREGROUND: - NtUserSetForegroundWindow(hwnd); - return 0; -+ case WM_WAYLAND_REFRESH: -+ wayland_refresh_window(hwnd); -+ return 0; - default: - FIXME("got window msg %x hwnd %p wp %lx lp %lx\n", msg, hwnd, (long)wp, lp); - return 0; --- -GitLab - @@ -6,7 +6,7 @@ _commit= pkgver=${_srctag//-/.} _geckover=2.47.4 _monover=9.0.0 -pkgrel=6 +pkgrel=7 epoch=1 pkgdesc="Compatibility tool for Steam Play based on Wine and additional components, experimental branch" url="https://github.com/ValveSoftware/Proton" @@ -95,11 +95,6 @@ source=( 0005-AUR-Strip-binaries-early.patch 0006-AUR-Fix-hwnd-redefinition.patch ) -source+=( - 0007-AUR-Enable-winewayland.patch - 0001-fshack-AMD-FSR-complete.patch - 4947.patch -) noextract=( wine-gecko-${_geckover}-{x86,x86_64}.tar.xz wine-mono-${_monover}-x86.tar.xz @@ -170,13 +165,6 @@ prepare() { patch -p1 -i "$srcdir"/0004-AUR-Copy-DLL-dependencies-of-32bit-libvkd3d-dlls-int.patch patch -p1 -i "$srcdir"/0005-AUR-Strip-binaries-early.patch patch -p1 -i "$srcdir"/0006-AUR-Fix-hwnd-redefinition.patch - - # Wine wayland is disabled, use at your own risk - patch -p1 -i "$srcdir"/0007-AUR-Enable-winewayland.patch - pushd wine - patch -p1 -i "$srcdir"/0001-fshack-AMD-FSR-complete.patch - patch -p1 -i "$srcdir"/4947.patch - popd } build() { @@ -202,6 +190,7 @@ build() { # AVX is "hard" disabled for 32bit in any case. # AVX/AVX2 for 64bit is disabled below. + # Seems unnecessery for 64bit if -mtune=generic is used #CFLAGS+=" -mno-avx2 -mno-avx" #CXXFLAGS+=" -mno-avx2 -mno-avx" @@ -273,7 +262,4 @@ sha256sums=('SKIP' '4af57781b6e81f0ac5ed1b1ab1a0fdaea92e1992e67d69d37a92334962921f5b' 'a3667c3fe517ea856dc7a5ab73fb5e10b20e5743f66f72d35b9a42394ed31701' 'fce16c5db9950068a3c965fd87e9194bbe13ead8a2c02d4710884c3669e236e5' - '89baf181f197a6156507841c018fd81c8f934f77161ba90f5ee6466677428235' - 'b7297cabb316eb9621ec1abade892143392eba5fdbd3bd496df7992a7c9d7358' - '3d308f8e87361669267fa52b986c24f1dea1913156a045f43ea04e02f7444b18' - '0f9ddda17319e3ef23ee847c0a740bf74847796d4b3cf61b05feb9aa3141b7c7') + '89baf181f197a6156507841c018fd81c8f934f77161ba90f5ee6466677428235') |