crocus: Honor scanout requirement from DRI
Translate PIPE_BIND_SCANOUT as ISL_SURF_USAGE_DISPLAY_BIT, instead of PIPE_BIND_DISPLAY_TARGET. PIPE_BIND_DISPLAY_TARGET isn't used for dri images and seem to be set only for fake winsys buffers (which aren't displayed). The trouble is that a fake buffer could be multisampled and we cannot have multisampled surface with display bit. Ported from iris82b4666783
Fixes:f3630548f1
("crocus: initial gallium driver for Intel gfx 4-7") Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Emma Anholt <emma@anholt.net> Tested-by: Jason Ekstrand <jason@jlekstrand.net> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5464 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13260>
This commit is contained in:
@@ -162,7 +162,7 @@ pipe_bind_to_isl_usage(unsigned bindings)
|
||||
if (bindings & (PIPE_BIND_SHADER_IMAGE | PIPE_BIND_SHADER_BUFFER))
|
||||
usage |= ISL_SURF_USAGE_STORAGE_BIT;
|
||||
|
||||
if (bindings & PIPE_BIND_DISPLAY_TARGET)
|
||||
if (bindings & PIPE_BIND_SCANOUT)
|
||||
usage |= ISL_SURF_USAGE_DISPLAY_BIT;
|
||||
return usage;
|
||||
}
|
||||
|
Reference in New Issue
Block a user