diff options
author | Jason Ekstrand <[email protected]> | 2016-07-22 19:53:59 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-07-26 07:58:44 -0700 |
commit | d16dc8e9638e35f77972e697f39b1ddb7c675c56 (patch) | |
tree | 5b0678bc5feecd9d9019566249d669a4348b2166 | |
parent | 126bd159409f61cb58e208dfc615c957d3d35a30 (diff) |
i965/blorp/gen8: Stop multiplying depth by 6 for cubes
intel_mipmap_tree::logical_depth0 is now in 2-D slices so there is no need
for us to multiply by 6 when we go to fill out a blorp surface state.
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_blorp.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_blorp.c b/src/mesa/drivers/dri/i965/gen8_blorp.c index 870b67ff0b9..ab9b7472eaf 100644 --- a/src/mesa/drivers/dri/i965/gen8_blorp.c +++ b/src/mesa/drivers/dri/i965/gen8_blorp.c @@ -526,9 +526,6 @@ gen8_blorp_emit_surface_states(struct brw_context *brw, mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS) ? MAX2(mt->num_samples, 1) : 1; - const bool is_cube = mt->target == GL_TEXTURE_CUBE_MAP_ARRAY || - mt->target == GL_TEXTURE_CUBE_MAP; - const unsigned depth = (is_cube ? 6 : 1) * mt->logical_depth0; const unsigned layer = mt->target != GL_TEXTURE_3D ? surface->layer / layer_divider : 0; @@ -537,7 +534,7 @@ gen8_blorp_emit_surface_states(struct brw_context *brw, .base_level = surface->level, .levels = mt->last_level - surface->level + 1, .base_array_layer = layer, - .array_len = depth - layer, + .array_len = mt->logical_depth0 - layer, .channel_select = { swizzle_to_scs(GET_SWZ(surface->swizzle, 0)), swizzle_to_scs(GET_SWZ(surface->swizzle, 1)), |