Here's a series of patches to address a crash when mapping multisampled
textures in piglit. The crash can easily be reproduce using the
following command:

bin/copyteximage 2D -samples=2 -auto

However, it's not clear to me if this is the right fix or not; the
resource creation code and the resource mapping code is inconsistent in
dealing with backing-storage. I decided to go for the widest definition
here, but it's possible the narrower one would be more appropriate.

The first three patches are smaller cleanups that were noticed while
debugging this, and not directly related to the crash.

It's also worth mentioning that the test doesn't pass after this
either, but at least it doesn't crash. The non-multisample versions of
this test doesn't pass either, so I think the failure is unrelated to
the presence of backing-store.

Dave, what are your thoughts here? It seems you introduced this
inconsistency in the very first commit to virgl. Was there some
expectation of some third, non-depth handling case here that just didn't
get noticed until now?

Erik Faye-Lund (4):
  virgl: free trans on map-error
  virgl: drop needless return-code
  virgl: remove dead code
  virgl: do not map zero-sized resource

 src/gallium/drivers/virgl/virgl_texture.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

-- 
2.17.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to