[Mesa-dev] [PATCH 2/2] u_vbuf: Add a few more format fallbacks.
Marek Olšák
maraeo at gmail.com
Sat Aug 23 10:14:24 PDT 2014
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Fri, Aug 22, 2014 at 10:54 PM, Eric Anholt <eric at anholt.net> wrote:
> Fixes piglit draw-vertices and gl-2.0-vertexattribpointer on vc4, where
> I'm only advertising R32F to RGBA32F support so far.
>
> Note: regresses gl-1.5-normal3b3s-invariance due to introduced flushes and
> missing depth buffer load/store support in the driver.
> ---
> src/gallium/auxiliary/util/u_vbuf.c | 32 ++++++++++++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
> index 42f5915..a372d69 100644
> --- a/src/gallium/auxiliary/util/u_vbuf.c
> +++ b/src/gallium/auxiliary/util/u_vbuf.c
> @@ -222,6 +222,38 @@ static const struct {
> { PIPE_FORMAT_R32G32_SSCALED, PIPE_FORMAT_R32G32_FLOAT },
> { PIPE_FORMAT_R32G32B32_SSCALED, PIPE_FORMAT_R32G32B32_FLOAT },
> { PIPE_FORMAT_R32G32B32A32_SSCALED, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R16_UNORM, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R16G16_UNORM, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R16G16B16_UNORM, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R16G16B16A16_UNORM, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R16_SNORM, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R16G16_SNORM, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R16G16B16_SNORM, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R16G16B16A16_SNORM, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R16_USCALED, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R16G16_USCALED, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R16G16B16_USCALED, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R16G16B16A16_USCALED, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R16_SSCALED, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R16G16_SSCALED, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R16G16B16_SSCALED, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R16G16B16A16_SSCALED, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R8_UNORM, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R8G8_UNORM, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R8G8B8_UNORM, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R8G8B8A8_UNORM, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R8_SNORM, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R8G8_SNORM, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R8G8B8_SNORM, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R8G8B8A8_SNORM, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R8_USCALED, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R8G8_USCALED, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R8G8B8_USCALED, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R8G8B8A8_USCALED, PIPE_FORMAT_R32G32B32A32_FLOAT },
> + { PIPE_FORMAT_R8_SSCALED, PIPE_FORMAT_R32_FLOAT },
> + { PIPE_FORMAT_R8G8_SSCALED, PIPE_FORMAT_R32G32_FLOAT },
> + { PIPE_FORMAT_R8G8B8_SSCALED, PIPE_FORMAT_R32G32B32_FLOAT },
> + { PIPE_FORMAT_R8G8B8A8_SSCALED, PIPE_FORMAT_R32G32B32A32_FLOAT },
> };
>
> boolean u_vbuf_get_caps(struct pipe_screen *screen, struct u_vbuf_caps *caps)
> --
> 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