isl: Delete redundant "use separate stencil?" check
This code, since the dawn of time, has had a redundant check for gen5-6
separate stencil in the final else clause:
} else if (doing separate stencil on gen5-6) {
return compact
} else {
if (doing separate stencil on gen5-6)
return compact
...
}
We can eliminate that one. The else clause then has a single if, so it
can be folded into the "else if" ladder alongside the others.
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33764>
This commit is contained in:
+5
-21
@@ -1856,28 +1856,12 @@ isl_choose_array_pitch_span(const struct isl_device *dev,
|
||||
*/
|
||||
assert(info->levels == 1);
|
||||
return ISL_ARRAY_PITCH_SPAN_COMPACT;
|
||||
} else if (phys_level0_sa->array_len == 1) {
|
||||
/* The hardware will never use the QPitch. So choose the most
|
||||
* compact QPitch possible in order to conserve memory.
|
||||
*/
|
||||
return ISL_ARRAY_PITCH_SPAN_COMPACT;
|
||||
} else {
|
||||
if ((ISL_GFX_VER(dev) == 5 || ISL_GFX_VER(dev) == 6) &&
|
||||
ISL_DEV_USE_SEPARATE_STENCIL(dev) &&
|
||||
isl_surf_usage_is_stencil(info->usage)) {
|
||||
/* [ILK-SNB] Errata from the Sandy Bridge PRM >> Volume 4 Part 1:
|
||||
* Graphics Core >> Section 7.18.3.7: Surface Arrays:
|
||||
*
|
||||
* The separate stencil buffer does not support mip mapping,
|
||||
* thus the storage for LODs other than LOD 0 is not needed.
|
||||
*/
|
||||
assert(info->levels == 1);
|
||||
assert(phys_level0_sa->array_len == 1);
|
||||
return ISL_ARRAY_PITCH_SPAN_COMPACT;
|
||||
}
|
||||
|
||||
if (phys_level0_sa->array_len == 1) {
|
||||
/* The hardware will never use the QPitch. So choose the most
|
||||
* compact QPitch possible in order to conserve memory.
|
||||
*/
|
||||
return ISL_ARRAY_PITCH_SPAN_COMPACT;
|
||||
}
|
||||
|
||||
return ISL_ARRAY_PITCH_SPAN_FULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user