Advertisement
Guest User

Untitled

a guest
Oct 13th, 2023
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.07 KB | None | 0 0
  1. diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
  2. index f2099053730..5b45bba18f0 100644
  3. --- a/src/gallium/drivers/iris/iris_resource.c
  4. +++ b/src/gallium/drivers/iris/iris_resource.c
  5. @@ -1912,9 +1912,19 @@ iris_resource_get_handle(struct pipe_screen *pscreen,
  6.     }
  7.  
  8.     whandle->format = res->external_format;
  9. -   whandle->modifier =
  10. -      res->mod_info ? res->mod_info->modifier
  11. -                    : tiling_to_modifier(isl_tiling_to_i915_tiling(res->surf.tiling));
  12. +
  13. +   if (res->mod_info) {
  14. +      whandle->modifier = res->mod_info->modifier;
  15. +   } else {
  16. +      whandle->modifier = DRM_FORMAT_MOD_INVALID;
  17. +      isl_drm_modifier_info_for_each(isl_mod_info) {
  18. +         if ((isl_mod_info->tiling == res->surf.tiling) &&
  19. +             (isl_mod_info->aux_usage == res->aux.usage) &&
  20. +             (isl_mod_info->supports_clear_color == (res->aux.clear_color_bo != NULL))) {
  21. +            whandle->modifier = isl_mod_info->modifier;
  22. +         }
  23. +      }
  24. +   }
  25.  
  26.  #ifndef NDEBUG
  27.     enum isl_aux_usage allowed_usage =
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement