mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 10:10:23 +01:00
i965: Fix fast depth clears for surfaces with a dimension of 16384.
I hadn't bothered to set this bit because I figured it would just
paper over us getting the rectangle wrong. But it turns out that
there is a legitimate reason to use it, so let's do so.
The alternative would be to chop up 16k clears to multiple 8k clears,
which is pointlessly painful.
Cc: "17.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
(cherry picked from commit 5106df85da)
This commit is contained in:
parent
5a806f7def
commit
dcb3b24b86
1 changed files with 12 additions and 0 deletions
|
|
@ -477,6 +477,18 @@ gen8_hiz_exec(struct brw_context *brw, struct intel_mipmap_tree *mt,
|
|||
break;
|
||||
case BLORP_HIZ_OP_DEPTH_CLEAR:
|
||||
dw1 |= GEN8_WM_HZ_DEPTH_CLEAR;
|
||||
|
||||
/* The "Clear Rectangle X Max" (and Y Max) fields are exclusive,
|
||||
* rather than inclusive, and limited to 16383. This means that
|
||||
* for a 16384x16384 render target, we would miss the last row
|
||||
* or column of pixels along the edge.
|
||||
*
|
||||
* To work around this, we have to set the "Full Surface Depth
|
||||
* and Stencil Clear" bit. We can do this in all cases because
|
||||
* we always clear the full rectangle anyway. We'll need to
|
||||
* change this if we ever add scissored clear support.
|
||||
*/
|
||||
dw1 |= GEN8_WM_HZ_FULL_SURFACE_DEPTH_CLEAR;
|
||||
break;
|
||||
case BLORP_HIZ_OP_NONE:
|
||||
unreachable("Should not get here.");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue