nvc0: Fix uninitialized width/height/depth warning.

This can happen if view->resource is false.

Fixes a warning in GCC 9+ that's been bugging me for a very long time when building Mesa.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12955>
This commit is contained in:
Joshua Ashton 2021-09-21 11:10:05 +01:00 committed by Adam Jackson
parent 8b287c3f92
commit 7d64f0dd16

View file

@ -1136,7 +1136,7 @@ nvc0_validate_suf(struct nvc0_context *nvc0, int s)
for (int i = 0; i < NVC0_MAX_IMAGES; ++i) {
struct pipe_image_view *view = &nvc0->images[s][i];
int width, height, depth;
int width = 0, height = 0, depth = 0;
uint64_t address = 0;
if (s == 5)