[Mesa-dev] [PATCH] st/mesa: align cube map arrays layers
Marek Olšák
maraeo at gmail.com
Thu Apr 9 05:54:28 PDT 2015
This will prevent similar bugs in the future. It should be a candidate
for stable.
Whether the alignment is done unconditionally (like Ilia suggested) or not:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Apr 8, 2015 at 2:02 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> We create textures internally for texsubimage, and we use
> the values from sub image to create a new texture, however
> we don't align these to valid sizes, and cube map arrays
> must have an array size aligned to 6.
>
> This fixes texsubimage cube_map_array on CAYMAN at least,
> (it was causing GPU hang and bad values), it probably
> also fixes it on radeonsi and evergreen.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/state_tracker/st_texture.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
> index ca7c83c..5c9a09c 100644
> --- a/src/mesa/state_tracker/st_texture.c
> +++ b/src/mesa/state_tracker/st_texture.c
> @@ -177,6 +177,8 @@ st_gl_texture_dims_to_pipe_dims(GLenum texture,
> *widthOut = widthIn;
> *heightOut = heightIn;
> *depthOut = 1;
> + if (depthIn % 6)
> + depthIn = util_align_npot(depthIn, 6);
> *layersOut = depthIn;
> break;
> default:
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list