[Mesa-dev] [PATCH] st/mesa: convert sub image for cube map arrays to 2d arrays for upload
Marek Olšák
maraeo at gmail.com
Thu Apr 9 05:56:09 PDT 2015
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
I'd like to have both fixes in master. Either or both can be
candidates for stable.
Marek
On Wed, Apr 8, 2015 at 3:00 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Since we can subimage upload a number of cube map array layers,
> that aren't a complete cube map array, we should specify things
> as a 2D array and blit from that.
>
> Suggested by Ilia Mirkin as an alternate fix for texsubimage
> cube map array issues.
>
> seems to work just as well.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/mesa/state_tracker/st_cb_texture.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
> index 5631361..40c6677 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -738,6 +738,11 @@ st_TexSubImage(struct gl_context *ctx, GLuint dims,
> if (gl_target == GL_TEXTURE_CUBE_MAP) {
> gl_target = GL_TEXTURE_2D;
> }
> + /* TexSubImage can specify subsets of cube map array faces
> + * so we need to upload via 2D array instead */
> + if (gl_target == GL_TEXTURE_CUBE_MAP_ARRAY) {
> + gl_target = GL_TEXTURE_2D_ARRAY;
> + }
>
> /* Initialize the source texture description. */
> memset(&src_templ, 0, sizeof(src_templ));
> --
> 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