Module: Mesa Branch: staging/23.0 Commit: 925f9f19dd1012a8df0068f4be7320e24dc1fb5d URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=925f9f19dd1012a8df0068f4be7320e24dc1fb5d
Author: Mike Blumenkrantz <[email protected]> Date: Tue Feb 21 09:41:37 2023 -0500 kopper: fix loop iterating for msaa texture creation the pipe_resource template values need to always be initialized or else texture creation fails and rendering is broken fixes #8331 cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21450> (cherry picked from commit b43d32b77d000d8bce560360c93cb9845af62662) --- .pick_status.json | 2 +- src/gallium/frontends/dri/kopper.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c58741cde52..ab73929d9b2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -247,7 +247,7 @@ "description": "kopper: fix loop iterating for msaa texture creation", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 9e805697515..0e7acfba5e7 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -568,6 +568,7 @@ XXX do this once swapinterval is hooked up unsigned bind; dri_drawable_get_format(drawable, statts[i], &format, &bind); + templ.format = format; /* the texture already exists or not requested */ if (!drawable->textures[statts[i]]) { @@ -579,7 +580,6 @@ XXX do this once swapinterval is hooked up if (format == PIPE_FORMAT_NONE) continue; - templ.format = format; templ.bind = bind; templ.nr_samples = 0; templ.nr_storage_samples = 0; @@ -606,7 +606,7 @@ XXX do this once swapinterval is hooked up } } if (drawable->stvis.samples > 1 && !drawable->msaa_textures[statts[i]]) { - templ.bind = templ.bind & + templ.bind = bind & ~(PIPE_BIND_SCANOUT | PIPE_BIND_SHARED | PIPE_BIND_DISPLAY_TARGET); templ.nr_samples = drawable->stvis.samples; templ.nr_storage_samples = drawable->stvis.samples;
