Recover the complicated situation after my bad merge

I made a mistake merge.  Reverting it in c778945806 undid the state
on master, but now I realize it crippled the git merge mechanism.
As the merge contained a mix of commits from `master..staging-next`
and other commits from `staging-next..staging`, it got the
`staging-next` branch into a state that was difficult to recover.

I reconstructed the "desired" state of staging-next tree by:
 - checking out the last commit of the problematic range: 4effe769e2
 - `git rebase -i --preserve-merges a8a018ddc0` - dropping the mistaken
   merge commit and its revert from that range (while keeping
   reapplication from 4effe769e2)
 - merging the last unaffected staging-next commit (803ca85c20)
 - fortunately no other commits have been pushed to staging-next yet
 - applying a diff on staging-next to get it into that state
This commit is contained in:
Vladimír Čunát
2020-10-26 09:01:04 +01:00
parent 4bd836b381
commit 89023c38fc
52 changed files with 667 additions and 1750 deletions
@@ -1,4 +1,4 @@
From 46b10f2bc28fd79d561c8c49bbae3aee6a4cf0e6 Mon Sep 17 00:00:00 2001
From 980164fd92f5c2302624cd046d30ff21e6e4ba8a Mon Sep 17 00:00:00 2001
From: David McFarland <corngood@gmail.com>
Date: Mon, 6 Aug 2018 15:52:11 -0300
Subject: [PATCH] disk_cache: include dri driver path in cache key
@@ -12,10 +12,10 @@ timestamps in /nix/store are zero.
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/meson_options.txt b/meson_options.txt
index 1a2dd8ebd12..2ac741af5a6 100644
index 2d39d13b6ad..daf06480a60 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -348,6 +348,12 @@ option(
@@ -368,6 +368,12 @@ option(
value : true,
description : 'Enable direct rendering in GLX and EGL for DRI',
)
@@ -26,13 +26,13 @@ index 1a2dd8ebd12..2ac741af5a6 100644
+ description : 'Mesa cache key.'
+)
option(
'I-love-half-baked-turnips',
'prefer-iris',
type : 'boolean',
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index d1f14736725..2ed328f292e 100644
index a92d621927a..3bd65c6890c 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -402,8 +402,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
@@ -401,8 +401,10 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
/* Create driver id keys */
size_t id_size = strlen(driver_id) + 1;
@@ -43,7 +43,7 @@ index d1f14736725..2ed328f292e 100644
cache->driver_keys_blob_size += gpu_name_size;
/* We sometimes store entire structs that contains a pointers in the cache,
@@ -424,6 +426,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
@@ -423,6 +425,7 @@ disk_cache_create(const char *gpu_name, const char *driver_id,
uint8_t *drv_key_blob = cache->driver_keys_blob;
DRV_KEY_CPY(drv_key_blob, &cache_version, cv_size)
DRV_KEY_CPY(drv_key_blob, driver_id, id_size)
@@ -52,22 +52,23 @@ index d1f14736725..2ed328f292e 100644
DRV_KEY_CPY(drv_key_blob, &ptr_size, ptr_size_size)
DRV_KEY_CPY(drv_key_blob, &driver_flags, driver_flags_size)
diff --git a/src/util/meson.build b/src/util/meson.build
index 9da29cc7390..5f549bb1d99 100644
index 0893f64793b..d46ce85a85f 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -170,7 +170,12 @@ _libmesa_util = static_library(
include_directories : inc_common,
@@ -179,7 +179,12 @@ _libmesa_util = static_library(
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
dependencies : deps_for_libmesa_util,
link_with: libmesa_format,
- c_args : [c_msvc_compat_args, c_vis_args],
- c_args : [c_msvc_compat_args],
+ c_args : [
+ c_msvc_compat_args, c_vis_args,
+ c_msvc_compat_args,
+ '-DDISK_CACHE_KEY="@0@"'.format(
+ get_option('disk-cache-key')
+ ),
+ ],
gnu_symbol_visibility : 'hidden',
build_by_default : false
)
--
2.25.1
2.28.0