blob: 925f2c8eb00945fc9ba8267cf21b827a2698dc48 (
plain)
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
|
From 63bcca251f093d83da7e290ab4bbd38ae69089b5 Mon Sep 17 00:00:00 2001
From: Gert Wollny <gert.wollny@collabora.com>
Date: Wed, 15 Jan 2020 13:43:58 +0100
Subject: [PATCH] vrend: Don't try launching a grid if no CS is available
Closes #155
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Upstream-Status: Backport
[https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/63bcca251f093d83da7e290ab4bbd38ae69089b5.patch]
CVE: CVE-2020-8002
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
---
src/vrend_renderer.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index a054bad8..2280fc43 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -4604,6 +4604,13 @@ void vrend_launch_grid(struct vrend_context *ctx,
}
ctx->sub->shader_dirty = true;
}
+
+ if (!ctx->sub->prog) {
+ vrend_printf("%s: Skipping compute shader execution due to missing shaders: %s\n",
+ __func__, ctx->debug_name);
+ return;
+ }
+
vrend_use_program(ctx, ctx->sub->prog->id);
vrend_draw_bind_ubo_shader(ctx, PIPE_SHADER_COMPUTE, 0);
--
2.24.1
|