[Mesa-dev] [Mesa-stable] [PATCH 2/2] st/mesa: require RGBA2, RGB4, and RGBA4 to be renderable

Marek Olšák maraeo at gmail.com
Thu Feb 7 02:41:59 UTC 2019


For the series:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Tue, Feb 5, 2019 at 9:14 PM Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> From: Karol Herbst <kherbst at redhat.com>
>
> If the driver does not support rendering to these formats but does
> support texturing, we can end up in incompatibilities between textures
> and renderbuffers that are then copied to.
>
> Fixes KHR-GL45.copy_image.functional on nvc0
>
> Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: 19.0 <mesa-stable at lists.freedesktop.org>
> ---
>
> I think in practice, any drivers that don't support RGBA4 for rendering
> but do for texturing would run into a lot of the same problems that
> nouveau has run into. I suspect nouveau was the only one crazy enough to
> do that.
>
>  src/mesa/state_tracker/st_format.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_format.c
> b/src/mesa/state_tracker/st_format.c
> index aacb8788287..febde1a5e97 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -2356,6 +2356,8 @@ st_ChooseTextureFormat(struct gl_context *ctx,
> GLenum target,
>        bindings |= PIPE_BIND_DEPTH_STENCIL;
>     else if (is_renderbuffer || internalFormat == 3 || internalFormat == 4
> ||
>              internalFormat == GL_RGB || internalFormat == GL_RGBA ||
> +            internalFormat == GL_RGBA2 ||
> +            internalFormat == GL_RGB4 || internalFormat == GL_RGBA4 ||
>              internalFormat == GL_RGB8 || internalFormat == GL_RGBA8 ||
>              internalFormat == GL_BGRA ||
>              internalFormat == GL_RGB16F ||
> --
> 2.19.2
>
> _______________________________________________
> mesa-stable mailing list
> mesa-stable at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-stable
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190206/82f88fce/attachment.html>


More information about the mesa-dev mailing list