radeonsi: consider PIPE_BIND_LINEAR when filtering modifiers
If PIPE_BIND_LINEAR is set the only valid modifier we can use is DRM_FORMAT_MOD_LINEAR. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30257>
This commit is contained in:

committed by
Marge Bot

parent
f12ccea6c7
commit
94f2b3f7bc
@@ -1610,6 +1610,9 @@ si_modifier_supports_resource(struct pipe_screen *screen,
|
||||
struct si_screen *sscreen = (struct si_screen *)screen;
|
||||
uint32_t max_width, max_height;
|
||||
|
||||
if (templ->bind & PIPE_BIND_LINEAR && modifier != DRM_FORMAT_MOD_LINEAR)
|
||||
return false;
|
||||
|
||||
ac_modifier_max_extent(&sscreen->info, modifier, &max_width, &max_height);
|
||||
return templ->width0 <= max_width && templ->height0 <= max_height;
|
||||
}
|
||||
|
Reference in New Issue
Block a user