/[packages]/cauldron/mesa/current/SOURCES/0021-nir-constant_folding-Fix-source-bit-size-logic.patch
ViewVC logotype

Contents of /cauldron/mesa/current/SOURCES/0021-nir-constant_folding-Fix-source-bit-size-logic.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1355920 - (show annotations) (download)
Sun Jan 13 14:22:00 2019 UTC (5 years, 3 months ago) by tmb
File size: 1781 byte(s)
add current fixes from upstream staging/18.3 branch
1 From 083f5fccb9e3849d955034ff7455e3fb60f7984f Mon Sep 17 00:00:00 2001
2 From: Jason Ekstrand <jason.ekstrand@intel.com>
3 Date: Thu, 6 Dec 2018 14:31:20 -0600
4 Subject: [PATCH 21/78] nir/constant_folding: Fix source bit size logic
5
6 Instead of looking at input_sizes[i] which contains the number of
7 components for each source, we look at the bit size of input_types[i].
8 This fixes a regression in the 1-bit boolean series though I have no
9 idea how we haven't seen it before now.
10
11 Fixes: 35baee5dce5 "nir/constant_folding: fix incorrect bit-size check"
12 Fixes: 9076c4e289d "nir: update opcode definitions for different bit sizes"
13 Reviewed-by: Eric Anholt <eric@anholt.net>
14 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
15 Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
16 (cherry picked from commit 3595a0abf43be3ce27d88f5939b257a74e90035b)
17 [Emil: resolve trivial conflicts]
18 Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
19
20 Conflicts:
21 src/compiler/nir/nir_opt_constant_folding.c
22 ---
23 src/compiler/nir/nir_opt_constant_folding.c | 3 +--
24 1 file changed, 1 insertion(+), 2 deletions(-)
25
26 diff --git a/src/compiler/nir/nir_opt_constant_folding.c b/src/compiler/nir/nir_opt_constant_folding.c
27 index 5929a60aee..be91a2a8fd 100644
28 --- a/src/compiler/nir/nir_opt_constant_folding.c
29 +++ b/src/compiler/nir/nir_opt_constant_folding.c
30 @@ -64,9 +64,8 @@ constant_fold_alu_instr(nir_alu_instr *instr, void *mem_ctx)
31 return false;
32
33 if (bit_size == 0 &&
34 - !nir_alu_type_get_type_size(nir_op_infos[instr->op].input_sizes[i])) {
35 + !nir_alu_type_get_type_size(nir_op_infos[instr->op].input_types[i]))
36 bit_size = instr->src[i].src.ssa->bit_size;
37 - }
38
39 nir_instr *src_instr = instr->src[i].src.ssa->parent_instr;
40
41 --
42 2.20.1
43

  ViewVC Help
Powered by ViewVC 1.1.30