[Mesa-dev] [PATCH] st/mesa: select Z16 for GL_DEPTH_COMPONENT

Nicolai Hähnle nhaehnle at gmail.com
Tue Aug 22 15:09:30 UTC 2017


Are you sure we really want this? I could well imagine badly coded 
applications that don't explicitly specify the required Z depth, but 
will have artifacts with 16 bits because they need the precision.

Cheers,
Nicolai

On 22.08.2017 16:39, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>   src/mesa/state_tracker/st_format.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
> index 348853a..7a00a3e 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -1078,23 +1078,23 @@ struct format_mapping
>         DEFAULT_RGBA_FORMATS
>   
>   #define DEFAULT_SRGBA_FORMATS \
>         PIPE_FORMAT_R8G8B8A8_SRGB, \
>         PIPE_FORMAT_B8G8R8A8_SRGB, \
>         PIPE_FORMAT_A8R8G8B8_SRGB, \
>         PIPE_FORMAT_A8B8G8R8_SRGB, \
>         0
>   
>   #define DEFAULT_DEPTH_FORMATS \
> +      PIPE_FORMAT_Z16_UNORM, \
>         PIPE_FORMAT_Z24X8_UNORM, \
>         PIPE_FORMAT_X8Z24_UNORM, \
> -      PIPE_FORMAT_Z16_UNORM, \
>         PIPE_FORMAT_Z24_UNORM_S8_UINT, \
>         PIPE_FORMAT_S8_UINT_Z24_UNORM, \
>         0
>   
>   #define DEFAULT_SNORM8_RGBA_FORMATS \
>         PIPE_FORMAT_R8G8B8A8_SNORM, \
>         0
>   
>   #define DEFAULT_UNORM16_RGBA_FORMATS \
>         PIPE_FORMAT_R16G16B16A16_UNORM, \
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the mesa-dev mailing list