diff options
author | Eric Anholt <[email protected]> | 2019-06-06 12:19:06 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-06-21 17:14:43 -0700 |
commit | 5e7c96b95df0f2d792820a27b278a95a90893e4a (patch) | |
tree | 96f7e680f8617e9b7d06e55ca250d603d91d7b13 /src/freedreno | |
parent | 23a7feda6310fa2d87ec94939c743f1aa133048b (diff) |
freedreno: Fix UBO load range detection on booleans.
NIR 1-bit bool dests will have a bit size of 1, and thus a calculated
"bytes" of 0. load_ubo is always loading from dwords in the source.
Fixes: 893425a607a6 ("freedreno/ir3: Push UBOs to constant file")
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c index 312c0644623..aaf962977b3 100644 --- a/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c +++ b/src/freedreno/ir3/ir3_nir_analyze_ubo_ranges.c @@ -32,8 +32,7 @@ get_ubo_load_range(nir_intrinsic_instr *instr) { struct ir3_ubo_range r; - const int bytes = nir_intrinsic_dest_components(instr) * - (nir_dest_bit_size(instr->dest) / 8); + const int bytes = nir_intrinsic_dest_components(instr) * 4; r.start = ROUND_DOWN_TO(nir_src_as_uint(instr->src[1]), 16 * 4); r.end = ALIGN(r.start + bytes, 16 * 4); |