diff options
author | Paul Berry <[email protected]> | 2013-12-05 04:34:42 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2013-12-09 10:51:00 -0800 |
commit | 3a2925bfa9537c202574eba0e2537b08939081ac (patch) | |
tree | db1047e8029493790ea6a7a3275851c244c20bdc /src/mesa | |
parent | 9a5ce0c4c971a8511574e10dd3ef37eebbe65ce7 (diff) |
i965/blorp: Improve fast color clear comment.
Clarify the fact that we only optimize full buffer clears using fast
color clear, and why.
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp index 1904bde1726..3af22b6075e 100644 --- a/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp +++ b/src/mesa/drivers/dri/i965/brw_blorp_clear.cpp @@ -238,7 +238,18 @@ brw_blorp_clear_params::brw_blorp_clear_params(struct brw_context *brw, } } - /* If we can do this as a fast color clear, do so. */ + /* If we can do this as a fast color clear, do so. + * + * Note that the condition "!partial_clear" means we only try to do full + * buffer clears using fast color clear logic. This is necessary because + * the fast color clear alignment requirements mean that we typically have + * to clear a larger rectangle than (x0, y0) to (x1, y1). Restricting fast + * color clears to the full-buffer condition guarantees that the extra + * memory locations that get written to are outside the image boundary (and + * hence irrelevant). Note that the rectangle alignment requirements are + * never larger than the size of a tile, so there is no danger of + * overflowing beyond the memory belonging to the region. + */ if (irb->mt->mcs_state != INTEL_MCS_STATE_NONE && !partial_clear && wm_prog_key.use_simd16_replicated_data && is_color_fast_clear_compatible(brw, format, &ctx->Color.ClearColor)) { |