lima: fix max sampler views
authorErico Nunes <nunes.erico@gmail.com>
Sat, 20 Feb 2021 13:24:09 +0000 (14:24 +0100)
committerMarge Bot <eric+marge@anholt.net>
Sun, 21 Feb 2021 19:21:45 +0000 (19:21 +0000)
If this is not defined, mesa may not deallocate sampler views,
which can result in memory leaks.
Just define it to the same as max texture samplers, like other
mesa drivers do.

Cc: mesa-stable
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9172>

src/gallium/drivers/lima/lima_screen.c

index 097c209..fcf27ac 100644 (file)
@@ -248,6 +248,7 @@ get_fragment_shader_param(struct lima_screen *screen,
    case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
       return 1;
 
+   case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
    case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
       return 16; /* need investigate */