mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 23:08:18 +02:00
anv: fix a null pointer access with isl_mod_info
It is possible for isl_mod_info to be NULL if no drm modifier was
given, layout transition on external queue can hit this condition.
Fixes: 11f8f333e2 ("anv: set a private binding when the image is not externally shared")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42015>
This commit is contained in:
parent
864bee8d49
commit
93476c6299
1 changed files with 6 additions and 4 deletions
|
|
@ -1191,14 +1191,16 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
|
|||
* of acquire/release direction.
|
||||
*/
|
||||
if (private_binding_acquire) {
|
||||
initial_aux_usage = isl_drm_modifier_has_aux(isl_mod_info->modifier) ?
|
||||
initial_aux_usage = isl_mod_info &&
|
||||
isl_drm_modifier_has_aux(isl_mod_info->modifier) ?
|
||||
image->planes[plane].aux_usage : ISL_AUX_USAGE_NONE;
|
||||
initial_fast_clear = isl_mod_info->supports_clear_color ?
|
||||
initial_fast_clear = isl_mod_info && isl_mod_info->supports_clear_color ?
|
||||
initial_fast_clear : ANV_FAST_CLEAR_NONE;
|
||||
} else if (private_binding_release) {
|
||||
final_aux_usage = isl_drm_modifier_has_aux(isl_mod_info->modifier) ?
|
||||
final_aux_usage = isl_mod_info &&
|
||||
isl_drm_modifier_has_aux(isl_mod_info->modifier) ?
|
||||
image->planes[plane].aux_usage : ISL_AUX_USAGE_NONE;
|
||||
final_fast_clear = isl_mod_info->supports_clear_color ?
|
||||
final_fast_clear = isl_mod_info && isl_mod_info->supports_clear_color ?
|
||||
final_fast_clear : ANV_FAST_CLEAR_NONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue