mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
i965/miptree: Stop multiplying cube depth by 6 in HiZ calculations
intel_mipmap_tree::logical_depth0 is now in number of 2D slices so we no
longer need to be multiplying by 6.
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 5d76690f17)
This commit is contained in:
parent
6156d8d93e
commit
be0344f630
1 changed files with 2 additions and 17 deletions
|
|
@ -1796,14 +1796,8 @@ intel_gen7_hiz_buf_create(struct brw_context *brw,
|
|||
hz_height = DIV_ROUND_UP(hz_height, 2);
|
||||
} else {
|
||||
const unsigned hz_qpitch = h0 + h1 + (12 * vertical_align);
|
||||
if (mt->target == GL_TEXTURE_CUBE_MAP_ARRAY ||
|
||||
mt->target == GL_TEXTURE_CUBE_MAP) {
|
||||
/* HZ_Height (rows) = Ceiling ( ( Q_pitch * Z_depth * 6/2) /8 ) * 8 */
|
||||
hz_height = DIV_ROUND_UP(hz_qpitch * Z0 * 6, 2 * 8) * 8;
|
||||
} else {
|
||||
/* HZ_Height (rows) = Ceiling ( ( Q_pitch * Z_depth/2) /8 ) * 8 */
|
||||
hz_height = DIV_ROUND_UP(hz_qpitch * Z0, 2 * 8) * 8;
|
||||
}
|
||||
/* HZ_Height (rows) = Ceiling ( ( Q_pitch * Z_depth/2) /8 ) * 8 */
|
||||
hz_height = DIV_ROUND_UP(hz_qpitch * Z0, 2 * 8) * 8;
|
||||
}
|
||||
|
||||
unsigned long pitch;
|
||||
|
|
@ -1900,15 +1894,6 @@ intel_gen8_hiz_buf_create(struct brw_context *brw,
|
|||
} else {
|
||||
/* HZ_Height (rows) = ceiling( (HZ_QPitch/2)/8) *8 * Z_Depth */
|
||||
hz_height = DIV_ROUND_UP(buf->qpitch, 2 * 8) * 8 * Z0;
|
||||
if (mt->target == GL_TEXTURE_CUBE_MAP_ARRAY ||
|
||||
mt->target == GL_TEXTURE_CUBE_MAP) {
|
||||
/* HZ_Height (rows) = ceiling( (HZ_QPitch/2)/8) *8 * 6 * Z_Depth
|
||||
*
|
||||
* We can can just take our hz_height calculation from above, and
|
||||
* multiply by 6 for the cube map and cube map array types.
|
||||
*/
|
||||
hz_height *= 6;
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long pitch;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue