Use git-am to apply monado patches

This commit is contained in:
Patrick Nicolas
2024-09-03 21:06:29 +02:00
parent 3f25fed6df
commit 8328fe13c7
4 changed files with 37 additions and 2 deletions
+8
View File
@@ -1,4 +1,12 @@
#!/bin/sh
if [ -d ".git" ] ; then
git config user.email > /dev/null || git config user.email "git-am@invalid"
git config user.name > /dev/null || git config user.name "no name"
git checkout .
exec git am "$@"/*
fi
# There is no reliable way to apply a patch and succeed if it was
# already applied. Just ignore errors...
for f in "$@"/* ; do
@@ -1,8 +1,28 @@
From 27ead38036b39cae803fa03008e8d08b0ff73fb8 Mon Sep 17 00:00:00 2001
From: Patrick Nicolas <patricknicolas@laposte.net>
Date: Sun, 11 Aug 2024 18:37:48 +0200
Subject: [PATCH] c/compute: Prevent moire artefacts in distortion
If distortion shrinks some areas too much, the shader will only sample a
few pixels and cause moire.
Change the shader so that it averages values between samples.
This is similar to what mipmaps would do, except that creating mipmaps
on a compute queue is not trivial, and accessing them in compute shaders
may be complex too.
---
src/xrt/compositor/main/comp_renderer.c | 3 +
src/xrt/compositor/render/render_compute.c | 6 ++
src/xrt/compositor/render/render_interface.h | 3 +
src/xrt/compositor/shaders/distortion.comp | 87 ++++++++++++++++----
src/xrt/compositor/util/comp_render.h | 2 +
src/xrt/compositor/util/comp_render_cs.c | 8 ++
6 files changed, 91 insertions(+), 18 deletions(-)
diff --git a/src/xrt/compositor/main/comp_renderer.c b/src/xrt/compositor/main/comp_renderer.c
index 1b295a324..baabd2a0c 100644
index 4716c8a71..a39e4275e 100644
--- a/src/xrt/compositor/main/comp_renderer.c
+++ b/src/xrt/compositor/main/comp_renderer.c
@@ -1037,6 +1037,9 @@ dispatch_compute(struct comp_renderer *r,
@@ -1038,6 +1038,9 @@ dispatch_compute(struct comp_renderer *r,
// Scratch image covers the whole image.
struct xrt_normalized_rect layer_norm_rect = {.x = 0.0f, .y = 0.0f, .w = 1.0f, .h = 1.0f};
@@ -277,3 +297,6 @@ index 8201407ae..ea9d1f258 100644
src_poses, //
src_fovs, //
world_poses, //
--
2.46.0
@@ -1,3 +1,7 @@
From 1f781690a7d24551c18a6696f8c6a141cc3565c0 Mon Sep 17 00:00:00 2001
From: galister <3123227-galister@users.noreply.gitlab.com>
Date: Mon, 19 Aug 2024 18:51:45 +0900
Subject: [PATCH] c/render: Add storage usage to distortion mesh
diff --git a/src/xrt/compositor/render/render_distortion.c b/src/xrt/compositor/render/render_distortion.c
index 031f74ad5..1255f2616 100644
--- a/src/xrt/compositor/render/render_distortion.c