<div dir="ltr">Tested-by: Alex Smith <<a href="mailto:asmith@feralinteractive.com">asmith@feralinteractive.com</a>><div><br></div><div>Confirmed it fixes both the testcase and the in-game bug it was causing. Thanks!</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 27 Nov 2018 at 08:34, Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">cc stable?<br>
<br>
Reviewed-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com" target="_blank">samuel.pitoiset@gmail.com</a>><br>
<br>
On 11/24/18 11:31 PM, Bas Nieuwenhuizen wrote:<br>
> Mirrors AMDVLK. Looks like if we go over the alignment of height<br>
> we actually start to change the addressing. Seems like the extra<br>
> miplevels actually work with this.<br>
> <br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=108245" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=108245</a><br>
> Fixes: f6cc15dccd5 "radv/gfx9: fix block compression texture views. (v2)"<br>
> ---<br>
> src/amd/vulkan/radv_image.c | 6 ++----<br>
> 1 file changed, 2 insertions(+), 4 deletions(-)<br>
> <br>
> diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c<br>
> index 7492bf48b51..ba8e28f0e23 100644<br>
> --- a/src/amd/vulkan/radv_image.c<br>
> +++ b/src/amd/vulkan/radv_image.c<br>
> @@ -1175,8 +1175,6 @@ radv_image_view_init(struct radv_image_view *iview,<br>
> if (device->physical_device->rad_info.chip_class >= GFX9 &&<br>
> vk_format_is_compressed(image->vk_format) &&<br>
> !vk_format_is_compressed(iview->vk_format)) {<br>
> - unsigned rounded_img_w = util_next_power_of_two(iview->extent.width);<br>
> - unsigned rounded_img_h = util_next_power_of_two(iview->extent.height);<br>
> unsigned lvl_width = radv_minify(image->info.width , range->baseMipLevel);<br>
> unsigned lvl_height = radv_minify(image->info.height, range->baseMipLevel);<br>
> <br>
> @@ -1186,8 +1184,8 @@ radv_image_view_init(struct radv_image_view *iview,<br>
> lvl_width <<= range->baseMipLevel;<br>
> lvl_height <<= range->baseMipLevel;<br>
> <br>
> - iview->extent.width = CLAMP(lvl_width, iview->extent.width, rounded_img_w);<br>
> - iview->extent.height = CLAMP(lvl_height, iview->extent.height, rounded_img_h);<br>
> + iview->extent.width = CLAMP(lvl_width, iview->extent.width, iview->image->surface.u.gfx9.surf_pitch);<br>
> + iview->extent.height = CLAMP(lvl_height, iview->extent.height, iview->image->surface.u.gfx9.surf_height);<br>
> }<br>
> }<br>
> <br>
> <br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>