freedreno: Fix warning about uninit size for the size==0 special case.
The size==0 query case would have just used uninitialized stack data for
sizing its BOs.
Fixes: 536ec9d7f5 ("freedreno: Refactor fd_resource_create_with_modifiers() into a helper")
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7664>
This commit is contained in:
@@ -977,6 +977,7 @@ fd_resource_allocate_and_resolve(struct pipe_screen *pscreen,
|
||||
if (size == 0) {
|
||||
/* note, semi-intention == instead of & */
|
||||
debug_assert(prsc->bind == PIPE_BIND_QUERY_BUFFER);
|
||||
*psize = 0;
|
||||
return prsc;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user