On Thu, Sep 6, 2018 at 7:58 PM, Erik Faye-Lund <erik.faye-l...@collabora.com> wrote: > 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?
Mapping multisample texture doesn't make sense, since what is in the mapping is undefined, and since we can't ever directly access multisample textures on the host side, we don't bother creating a backing store. I've looked into this before but I'm not remembering quite why this fails, these patches are good enough to stop the crashing, but I'd have to redig into what would fix it properly. For the series: Reviewed-by: Dave Airlie <airl...@redhat.com> > > 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