mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
anv: fix fence underlying primitive checks
We appear to have got lucky that the only type of temporary fence payload we could have was a syncobj and that would only happen when the type of the permanent payload was also a syncobj. This code was broken if that assumption changed and it did in commitf9a3d9738b. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ivan Briano <ivan.briano@intel.com> (cherry picked from commit52bc235f2a)
This commit is contained in:
parent
61ea855be3
commit
9e3be21a91
1 changed files with 13 additions and 3 deletions
|
|
@ -681,7 +681,11 @@ anv_wait_for_fences(struct anv_device *device,
|
|||
if (fenceCount <= 1 || waitAll) {
|
||||
for (uint32_t i = 0; i < fenceCount; i++) {
|
||||
ANV_FROM_HANDLE(anv_fence, fence, pFences[i]);
|
||||
switch (fence->permanent.type) {
|
||||
struct anv_fence_impl *impl =
|
||||
fence->temporary.type != ANV_FENCE_TYPE_NONE ?
|
||||
&fence->temporary : &fence->permanent;
|
||||
|
||||
switch (impl->type) {
|
||||
case ANV_FENCE_TYPE_BO:
|
||||
result = anv_wait_for_bo_fences(device, 1, &pFences[i],
|
||||
true, abs_timeout);
|
||||
|
|
@ -716,7 +720,10 @@ static bool anv_all_fences_syncobj(uint32_t fenceCount, const VkFence *pFences)
|
|||
{
|
||||
for (uint32_t i = 0; i < fenceCount; ++i) {
|
||||
ANV_FROM_HANDLE(anv_fence, fence, pFences[i]);
|
||||
if (fence->permanent.type != ANV_FENCE_TYPE_SYNCOBJ)
|
||||
struct anv_fence_impl *impl =
|
||||
fence->temporary.type != ANV_FENCE_TYPE_NONE ?
|
||||
&fence->temporary : &fence->permanent;
|
||||
if (impl->type != ANV_FENCE_TYPE_SYNCOBJ)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
@ -726,7 +733,10 @@ static bool anv_all_fences_bo(uint32_t fenceCount, const VkFence *pFences)
|
|||
{
|
||||
for (uint32_t i = 0; i < fenceCount; ++i) {
|
||||
ANV_FROM_HANDLE(anv_fence, fence, pFences[i]);
|
||||
if (fence->permanent.type != ANV_FENCE_TYPE_BO)
|
||||
struct anv_fence_impl *impl =
|
||||
fence->temporary.type != ANV_FENCE_TYPE_NONE ?
|
||||
&fence->temporary : &fence->permanent;
|
||||
if (impl->type != ANV_FENCE_TYPE_BO)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue