The array was tied to our old queue API, which meant that if users set it, it was never set.
Unified · Split
| @@ -1759,7 +1759,6 @@ FF_DISABLE_DEPRECATION_WARNINGS · 1758 unmodified lines | |||
| 1759 | tx_index = (ctx_qf == tx_index) ? -1 : tx_index; \ | 1759 | tx_index = (ctx_qf == tx_index) ? -1 : tx_index; \ |
| 1760 | enc_index = (ctx_qf == enc_index) ? -1 : enc_index; \ | 1760 | enc_index = (ctx_qf == enc_index) ? -1 : enc_index; \ |
| 1761 | dec_index = (ctx_qf == dec_index) ? -1 : dec_index; \ | 1761 | dec_index = (ctx_qf == dec_index) ? -1 : dec_index; \ |
| 1762 | p->img_qfs[p->nb_img_qfs++] = ctx_qf; \ | ||
| 1763 | } while (0) | 1762 | } while (0) |
| 1764 | 1763 | ||
| 1765 | CHECK_QUEUE("graphics", 0, graph_index, hwctx->queue_family_index, hwctx->nb_graphics_queues); | 1764 | CHECK_QUEUE("graphics", 0, graph_index, hwctx->queue_family_index, hwctx->nb_graphics_queues); |
| @@ -1802,6 +1801,22 @@ FF_ENABLE_DEPRECATION_WARNINGS · 36 unmodified lines | |||
| 1802 | } | 1801 | } |
| 1803 | } | 1802 | } |
| 1804 | 1803 | ||
| 1804 | /* Setup array for pQueueFamilyIndices with used queue families */ | ||
| 1805 | p->nb_img_qfs = 0; | ||
| 1806 | for (int i = 0; i < hwctx->nb_qf; i++) { | ||
| 1807 | int seen = 0; | ||
| 1808 | /* Make sure each entry is unique | ||
| 1809 | * (VUID-VkBufferCreateInfo-sharingMode-01419) */ | ||
| 1810 | for (int j = (i - 1); j >= 0; j--) { | ||
| 1811 | if (hwctx->qf[i].idx == hwctx->qf[j].idx) { | ||
| 1812 | seen = 1; | ||
| 1813 | break; | ||
| 1814 | } | ||
| 1815 | } | ||
| 1816 | if (!seen) | ||
| 1817 | p->img_qfs[p->nb_img_qfs++] = hwctx->qf[i].idx; | ||
| 1818 | } | ||
| 1819 | |||
| 1805 | if (!hwctx->lock_queue) | 1820 | if (!hwctx->lock_queue) |
| 1806 | hwctx->lock_queue = lock_queue; | 1821 | hwctx->lock_queue = lock_queue; |
| 1807 | if (!hwctx->unlock_queue) | 1822 | if (!hwctx->unlock_queue) |