OSDN Git Service

radeonsi: Clear uninitialized variable
authorDrew Davenport <ddavenport@chromium.org>
Mon, 27 Jan 2020 18:13:19 +0000 (11:13 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Mon, 3 Feb 2020 16:31:30 +0000 (08:31 -0800)
|view| was not initialized leading to flaky test failures in SkQP
test unitTest_ES2BlendWithNoTexture.

Fixes: 029bfa3d253 "radeonsi: add ability to bind images as image buffers"

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3592>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3592>
(cherry picked from commit 0d99ff54cc3fb1dd85044f8971f6686138a5f149)

.pick_status.json
src/gallium/drivers/radeonsi/si_descriptors.c

index 1c296ad..f5ed2ec 100644 (file)
@@ -40,7 +40,7 @@
         "description": "radeonsi: Clear uninitialized variable",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "029bfa3d253ca70186e245ccf0a7e17bb40a5bab"
     },
index fa72e57..25ef0ab 100644 (file)
@@ -903,7 +903,7 @@ void si_update_ps_colorbuf0_slot(struct si_context *sctx)
 
        if (surf) {
                struct si_texture *tex = (struct si_texture*)surf->texture;
-               struct pipe_image_view view;
+               struct pipe_image_view view = {0};
 
                assert(tex);
                assert(!tex->is_depth);