Module: Mesa
Branch: staging/18.2
Commit: d7a7fd28e5b8c5a1be8004840f7b3869836baa5e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7a7fd28e5b8c5a1be8004840f7b3869836baa5e

Author: Marek Olšák <[email protected]>
Date:   Fri Nov  2 20:56:42 2018 -0400

st/va: fix incorrect use of resource_destroy

Fixes: 4373dd32154 ("st/va: Support YUV formats in vaCreateSurfaces")
Cc: Drew Davenport <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
(cherry picked from commit 04298a2f24455541f28ccffd2f0f73b831833d57)

---

 src/gallium/state_trackers/va/surface.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index cc26efe1c1..d69313932c 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -598,10 +598,8 @@ surface_from_external_memory(VADriverContextP ctx, 
vlVaSurface *surface,
    return VA_STATUS_SUCCESS;
 
 fail:
-   for (i = 0; i < VL_NUM_COMPONENTS; i++) {
-      if (resources[i])
-         pscreen->resource_destroy(pscreen, resources[i]);
-   }
+   for (i = 0; i < VL_NUM_COMPONENTS; i++)
+      pipe_resource_reference(&resources[i], NULL);
    return result;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to