mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
i965/blorp/gen8: Use the correct max level and layer in emit_surface_states
We were adding in the base which is wrong because the values given in the
miptree are relative to zero and not the base layer/level.
Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: "11.1 11.2 12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 620f81d2ed)
This commit is contained in:
parent
1673dec65c
commit
6a6947d89a
1 changed files with 2 additions and 3 deletions
|
|
@ -627,13 +627,12 @@ gen8_blorp_emit_surface_states(struct brw_context *brw,
|
|||
mt->target == GL_TEXTURE_CUBE_MAP;
|
||||
const unsigned depth = (is_cube ? 6 : 1) * mt->logical_depth0;
|
||||
const GLenum target = is_cube ? GL_TEXTURE_2D_ARRAY : mt->target;
|
||||
const unsigned max_level = surface->level + mt->last_level + 1;
|
||||
const unsigned layer = mt->target != GL_TEXTURE_3D ?
|
||||
surface->layer / layer_divider : 0;
|
||||
|
||||
brw->vtbl.emit_texture_surface_state(brw, mt, target,
|
||||
layer, layer + depth,
|
||||
surface->level, max_level,
|
||||
layer, depth,
|
||||
surface->level, mt->last_level + 1,
|
||||
surface->brw_surfaceformat,
|
||||
surface->swizzle,
|
||||
&wm_surf_offset_texture,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue