diff options
author | Ben Widawsky <[email protected]> | 2015-06-18 18:45:47 -0700 |
---|---|---|
committer | Ben Widawsky <[email protected]> | 2015-06-19 11:25:00 -0700 |
commit | 7c3da3592e8799059abca9cd7c92d61ebfd09f29 (patch) | |
tree | e375cfb9c8eee06f59e22c871795b9c21e8c0510 /src/mesa/drivers | |
parent | 539cb2b76efd02f14798cad0a5462ee9ed27aa83 (diff) |
i965/gen8: Use HALIGN_16 for single sample mcs buffers
The original code meant to do this, but was only checking num_samples == 1 to
figure out if a surface was fast clear capable. However, we can allocate single
sample miptrees with num_samples == 0 (when it's an internally created buffer).
This fixes a bunch of the piglit tests on gen8. Other gens should have been
fine.
Here is the order of events that allowed this to slip through:
t0: I wrote halign patches and tested them. These alignment assertions are for
gen8 fast clear surfaces, basically.
t1: I pushed bogus perf patch which made fast clears never happen
t2: Reworked halign patches based on Chad's feedback and introduced the bug this
patch fixes.
t2.5: I tested reworked patches, but assertion wasn't hit because of t1.
t3. Matt fixed issue in t1 which made fast clears happen here:
commit 22af95af8316f2888a3935cdf774ff0997b3dd42
Author: Matt Turner <[email protected]>
Date: Thu Jun 18 16:14:50 2015 -0700
i965: Add missing braces around if-statement.
This logic should match that of the v1 of my halign patch series.
Cc: Kenneth Graunke <[email protected]>
Cc: Matt Turner <[email protected]>
Reported-by: Kenneth Graunke <[email protected]>
Signed-off-by: Ben Widawsky <[email protected]>
Tested-by: Mark Janes <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c index 80c52f2feef..6aa969a4930 100644 --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c @@ -501,7 +501,7 @@ intel_miptree_create_layout(struct brw_context *brw, * 6 | ? | ? */ if (intel_miptree_is_fast_clear_capable(brw, mt)) { - if (brw->gen >= 9 || (brw->gen == 8 && num_samples == 1)) + if (brw->gen >= 9 || (brw->gen == 8 && num_samples <= 1)) layout_flags |= MIPTREE_LAYOUT_FORCE_HALIGN16; } else if (brw->gen >= 9 && num_samples > 1) { layout_flags |= MIPTREE_LAYOUT_FORCE_HALIGN16; |