Skip to content
Snippets Groups Projects
Commit e3591b03 authored by Jonathan Marek's avatar Jonathan Marek Committed by Rob Clark
Browse files

freedreno: use renderonly path for buffers allocated with modifiers


Now that freedreno has create_with_modifiers(), this "hack" is needed to
make some cases work. Copied from vc4.

Fixes: 41ddf1d1

Signed-off-by: default avatarJonathan Marek <jonathan@marek.ca>
parent 6c0fefb4
No related branches found
No related tags found
No related merge requests found
......@@ -860,7 +860,13 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
enum pipe_format format = tmpl->format;
uint32_t size;
if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT)) {
/* when using kmsro, scanout buffers are allocated on the display device
* create_with_modifiers() doesn't give us usage flags, so we have to
* assume that all calls with modifiers are scanout-possible
*/
if (screen->ro &&
((tmpl->bind & PIPE_BIND_SCANOUT) ||
!(count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID))) {
struct pipe_resource scanout_templat = *tmpl;
struct renderonly_scanout *scanout;
struct winsys_handle handle;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment