mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
iris: Pick the right BO in iris_resource_get_param
Pick the clear color BO if the clear color plane is being queried. This avoids picking a NULL aux BO on XeHP. When creating shared resources, we place the gallium-visible planes in the same buffer object. However, when importing them, we aren't very strict about each plane sharing the same BO. So, instead of just using res->bo, we use a couple ternaries to figure out the right one. Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14759>
This commit is contained in:
parent
ea5ffa0128
commit
2407a7e6c1
1 changed files with 2 additions and 1 deletions
|
|
@ -1589,7 +1589,8 @@ iris_resource_get_param(struct pipe_screen *pscreen,
|
|||
iris_resource_disable_aux_on_first_query(resource, handle_usage);
|
||||
iris_resource_disable_suballoc_on_first_query(pscreen, ctx, res);
|
||||
|
||||
struct iris_bo *bo = wants_aux ? res->aux.bo : res->bo;
|
||||
struct iris_bo *bo = wants_cc ? res->aux.clear_color_bo :
|
||||
wants_aux ? res->aux.bo : res->bo;
|
||||
|
||||
assert(iris_bo_is_real(bo));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue