This repository was archived by the owner on Oct 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path0001-Revert-gl-renderer-Only-provide-RBC-modifiers-if-spe.patch
More file actions
105 lines (95 loc) · 3.05 KB
/
0001-Revert-gl-renderer-Only-provide-RBC-modifiers-if-spe.patch
File metadata and controls
105 lines (95 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
From 7592a0f6646b924ec3e3b36d9dbfff5102f6bf2d Mon Sep 17 00:00:00 2001
From: Kevron Rees <kevron.m.rees@intel.com>
Date: Fri, 1 Mar 2019 09:53:23 -0800
Subject: [PATCH] Revert "gl-renderer: Only provide RBC modifiers if
specifically asked for"
This reverts commit e4707ed34da3682001c8b017a02b5738c5220949.
---
libweston/compositor-ias.c | 5 -----
libweston/gl-renderer.c | 34 ++++++----------------------------
libweston/gl-renderer.h | 2 --
3 files changed, 6 insertions(+), 35 deletions(-)
diff --git a/libweston/compositor-ias.c b/libweston/compositor-ias.c
index aefad4a..732837b 100644
--- a/libweston/compositor-ias.c
+++ b/libweston/compositor-ias.c
@@ -4574,11 +4574,6 @@ ias_compositor_create(struct weston_compositor *compositor,
centre_pointer(backend);
if (backend->has_nuclear_pageflip) {
- /*
- * The renderer needs to know if it should filter out RBC modes so provide a
- * flag to it.
- */
- gl_renderer->rbc = use_rbc;
backend->rbc_supported = render_buffer_compression_supported(backend);
backend->rbc_enabled = backend->rbc_supported && use_rbc && !has_overlapping_outputs(backend);
if (backend->rbc_debug) {
diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c
index e9137b8..e8b921e 100644
--- a/libweston/gl-renderer.c
+++ b/libweston/gl-renderer.c
@@ -2021,8 +2021,7 @@ gl_renderer_query_dmabuf_modifiers(struct weston_compositor *wc, int format,
int *num_modifiers)
{
struct gl_renderer *gr = get_renderer(wc);
- int num, i, j;
- uint64_t *temp_modifiers;
+ int num;
assert(gr->has_dmabuf_import);
@@ -2033,40 +2032,19 @@ gl_renderer_query_dmabuf_modifiers(struct weston_compositor *wc, int format,
return;
}
- temp_modifiers = calloc(num, sizeof(uint64_t));
- if (temp_modifiers == NULL) {
+ *modifiers = calloc(num, sizeof(uint64_t));
+ if (*modifiers == NULL) {
*num_modifiers = 0;
return;
}
if (!gr->query_dmabuf_modifiers(gr->egl_display, format,
- num, temp_modifiers, NULL, &num)) {
+ num, *modifiers, NULL, &num)) {
*num_modifiers = 0;
- free(temp_modifiers);
+ free(*modifiers);
return;
}
- *modifiers = calloc(num, sizeof(uint64_t));
- if (*modifiers == NULL) {
- *num_modifiers = 0;
- free(temp_modifiers);
- return;
- }
-
- for(i = 0, j = 0; i < num; i++) {
- /*
- * Either the rbc flag is turned on, in which case we shouldn't filter
- * out RBC modifiers. OR if it is turned off, then we should filter
- * them out.
- */
- if(gl_renderer_interface.rbc ||
- (temp_modifiers[i] != I915_FORMAT_MOD_Y_TILED_CCS &&
- temp_modifiers[i] != I915_FORMAT_MOD_Yf_TILED_CCS)) {
- (*modifiers)[j++] = temp_modifiers[i];
- }
- }
-
- *num_modifiers = j;
- free(temp_modifiers);
+ *num_modifiers = num;
}
static bool
diff --git a/libweston/gl-renderer.h b/libweston/gl-renderer.h
index f2d1141..39315f3 100644
--- a/libweston/gl-renderer.h
+++ b/libweston/gl-renderer.h
@@ -141,8 +141,6 @@ struct gl_renderer_interface {
struct wl_resource *buffer,
EGLint attribute, EGLint *value);
- int rbc;
-
#ifdef USE_VM
int vm_exec;
int vm_dbg;
--
2.17.1