| 2227 | } |
| 2228 | |
| 2229 | uint64_t DeviceWrapper::executeCommandLists(ICommandList* const* pCommandLists, size_t numCommandLists, CommandQueue executionQueue) |
| 2230 | { |
| 2231 | if (numCommandLists == 0) |
| 2232 | return 0; |
| 2233 | |
| 2234 | if (pCommandLists == nullptr) |
| 2235 | { |
| 2236 | error("executeCommandLists: pCommandLists is NULL"); |
| 2237 | return 0; |
| 2238 | } |
| 2239 | |
| 2240 | std::vector<ICommandList*> unwrappedCommandLists; |
| 2241 | unwrappedCommandLists.resize(numCommandLists); |
| 2242 | |
| 2243 | for(size_t i = 0; i < numCommandLists; i++) |
| 2244 | { |
| 2245 | if (pCommandLists[i] == nullptr) |
| 2246 | { |
| 2247 | std::stringstream ss; |
| 2248 | ss << "executeCommandLists: pCommandLists[" << i << "] is NULL"; |
| 2249 | error(ss.str()); |
| 2250 | return 0; |
| 2251 | } |
| 2252 | |
| 2253 | const CommandListParameters& desc = pCommandLists[i]->getDesc(); |
| 2254 | if (desc.queueType != executionQueue) |
| 2255 | { |
| 2256 | std::stringstream ss; |
| 2257 | ss << "executeCommandLists: The command list [" << i << "] type is " << utils::CommandQueueToString(desc.queueType) |
| 2258 | << ", it cannot be executed on a " << utils::CommandQueueToString(executionQueue) << " queue"; |
| 2259 | error(ss.str()); |
| 2260 | return 0; |
| 2261 | } |
| 2262 | |
| 2263 | CommandListWrapper* wrapper = dynamic_cast<CommandListWrapper*>(pCommandLists[i]); |
| 2264 | if (wrapper) |
| 2265 | { |
| 2266 | if (!wrapper->requireExecuteState()) |
| 2267 | return 0; |
| 2268 | |
| 2269 | unwrappedCommandLists[i] = wrapper->getUnderlyingCommandList(); |
| 2270 | } |
| 2271 | else |
| 2272 | unwrappedCommandLists[i] = pCommandLists[i]; |
| 2273 | } |
| 2274 | |
| 2275 | return m_Device->executeCommandLists(unwrappedCommandLists.data(), unwrappedCommandLists.size(), executionQueue); |
| 2276 | } |
| 2277 | |
| 2278 | void DeviceWrapper::queueWaitForCommandList(CommandQueue waitQueue, CommandQueue executionQueue, uint64_t instance) |
| 2279 | { |
nothing calls this directly
no test coverage detected