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

Brian Paul brianp at vmware.com
Tue Dec 11 15:50:18 UTC 2018


On 12/10/2018 02:36 PM, 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:
> 


Reviewed-by: Brian Paul <brianp at vmware.com>


More information about the mesa-dev mailing list