1 |
From 432a95b65f29c068bd33d548f1bef271694e4231 Mon Sep 17 00:00:00 2001 |
2 |
From: Jason Ekstrand <jason.ekstrand@intel.com> |
3 |
Date: Tue, 4 Sep 2018 13:58:01 -0500 |
4 |
Subject: [PATCH 04/20] anv/pipeline: Only consider double elements which |
5 |
actually exist |
6 |
|
7 |
The brw_vs_prog_data::double_inputs_read field comes directly from |
8 |
shader_info::double_inputs which may contain inputs which are not |
9 |
actually read. Instead of using it directly, AND it with inputs_read |
10 |
which is only things which are read. Otherwise, we may end up |
11 |
subtracting too many elements when computing elem_count. |
12 |
|
13 |
Cc: mesa-stable@lists.freedesktop.org |
14 |
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103241 |
15 |
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> |
16 |
(cherry picked from commit 7b26741806c521279a1b83f2eae40a277d806626) |
17 |
--- |
18 |
src/intel/vulkan/genX_pipeline.c | 3 ++- |
19 |
1 file changed, 2 insertions(+), 1 deletion(-) |
20 |
|
21 |
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c |
22 |
index 8817c38301..92e4b968d7 100644 |
23 |
--- a/src/intel/vulkan/genX_pipeline.c |
24 |
+++ b/src/intel/vulkan/genX_pipeline.c |
25 |
@@ -91,7 +91,8 @@ emit_vertex_input(struct anv_pipeline *pipeline, |
26 |
|
27 |
/* Pull inputs_read out of the VS prog data */ |
28 |
const uint64_t inputs_read = vs_prog_data->inputs_read; |
29 |
- const uint64_t double_inputs_read = vs_prog_data->double_inputs_read; |
30 |
+ const uint64_t double_inputs_read = |
31 |
+ vs_prog_data->double_inputs_read & inputs_read; |
32 |
assert((inputs_read & ((1 << VERT_ATTRIB_GENERIC0) - 1)) == 0); |
33 |
const uint32_t elements = inputs_read >> VERT_ATTRIB_GENERIC0; |
34 |
const uint32_t elements_double = double_inputs_read >> VERT_ATTRIB_GENERIC0; |
35 |
-- |
36 |
2.18.0 |
37 |
|