OSDN Git Service

freedreno: stop frob'ing pipe_resource::nr_samples
authorRob Clark <robdclark@gmail.com>
Tue, 29 Jan 2019 17:23:28 +0000 (12:23 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 12 Feb 2019 12:52:32 +0000 (12:52 +0000)
commit434f19a8dc5b24e69415e0a36ed067369ea8a8fe
tree79210ea6d9a21deee63a613566a2cae6f2dd70c1
parent7475d7727f172387ac3d069887f3095dcb884649
freedreno: stop frob'ing pipe_resource::nr_samples

Previously we tried to normalize nr_samples to MAX2(1, nr_samples) to
avoid having to deal with 0 vs 1 everywhere.  But this causes problems
in mesa/st, for example st_finalize_texture() will think there is a
nr_samples mismatch and recreate the texture.  Somehow this manifests
as corrupt x11 font rendering on generations that do not support MSAA
(but apparently works fine on a5xx and a6xx which do support MSAA.)

Fixes: cf0c7258ee0 freedreno/a5xx: MSAA
Signed-off-by: Rob Clark <robdclark@gmail.com>
(cherry picked from commit c3baa077bf6db9f9d46be62ed7cbbc3167e68c8f)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/gallium/drivers/freedreno/freedreno_batch_cache.c
src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_resource.h
src/gallium/drivers/freedreno/freedreno_texture.c