[Mesa-dev] [PATCH] svga: Enable rendering of float/half-float

Erik Faye-Lund erik.faye-lund at collabora.com
Tue Dec 11 10:23:21 UTC 2018


On Mon, 2018-12-10 at 16:36 -0500, Nick Kreeger wrote:
> In GLES2 - if extensions are present, float and half-float textures
> can
> be used for rendering. This change enables the svga driver to handle
> rendering these types.
> ---
>  src/gallium/drivers/svga/svga_screen.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/drivers/svga/svga_screen.c
> b/src/gallium/drivers/svga/svga_screen.c
> index 95dde8b..3dcfc6b 100644
> --- a/src/gallium/drivers/svga/svga_screen.c
> +++ b/src/gallium/drivers/svga/svga_screen.c
> @@ -351,6 +351,10 @@ svga_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
>     case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
>        return sws->have_sm4_1 ? 1 : 0; /* only single-channel
> textures */
>  
> +   case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
> +   case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
> +      return 1;
> +
>     /* Unsupported features */
>     case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
>     case PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE:
> @@ -427,8 +431,6 @@ svga_get_param(struct pipe_screen *screen, enum
> pipe_cap param)
>     case PIPE_CAP_RESOURCE_FROM_USER_MEMORY:
>     case PIPE_CAP_DEVICE_RESET_STATUS_QUERY:
>     case PIPE_CAP_MAX_SHADER_PATCH_VARYINGS:
> -   case PIPE_CAP_TEXTURE_FLOAT_LINEAR:
> -   case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
>     case PIPE_CAP_DEPTH_BOUNDS_TEST:
>     case PIPE_CAP_TGSI_TXQS:
>     case PIPE_CAP_SHAREABLE_SHADERS:

Considering I sent pretty much the exact same patch for virgl:

Reviewed-by: Erik Faye-Lunk <erik.faye-lund at collabora.com>



More information about the mesa-dev mailing list