OSDN Git Service

st/nine: Immediately upload user provided textures
authorAxel Davy <davyaxel0@gmail.com>
Tue, 22 Jan 2019 19:14:43 +0000 (20:14 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 29 Jan 2019 17:44:27 +0000 (17:44 +0000)
commit220490cf5f28d24626a6219ae9d9a92d552574f8
treee42cb0e065a1477eb19222e27bbb99fe2a28a7d5
parent991f9ea5536102fa2b201eb7d0eeccdc993362a5
st/nine: Immediately upload user provided textures

Fixes regression caused by
42d672fa6a766363e5703f119607f7c7975918aa
st/nine: Bind src not dst in nine_context_box_upload

Before that patch, for user provided textures,
when the texture was destroyed, the safety
check for pending uploads, which according to
the code "Following condition cannot happen currently",
was flushing the queue and thus triggering the upload.

After the patch, the texture destruction was delayed after
the upload. However the user frees the texture buffer,
as it thinks the texture released.

Instead of reverting the faulty patch,
this patch instead flushes the csmt queue right away
after queuing the upload for this type of textures.
This is more future-proof, as we may want to bind the
surface for other reasons in the future.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Cc: 18.3 <mesa-stable@lists.freedesktop.org>
(cherry picked from commit d7433c22e6c9624ca5275a3cd35be79caed9fffc)
src/gallium/state_trackers/nine/surface9.c