| 706 | } |
| 707 | |
| 708 | void GPUUnitTestContext::runProgram(const uint3& dimensions) |
| 709 | { |
| 710 | FALCOR_CHECK(mpVars != nullptr, "Program vars not created"); |
| 711 | for (const auto& buffer : mStructuredBuffers) |
| 712 | { |
| 713 | mpVars->setBuffer(buffer.first, buffer.second); |
| 714 | } |
| 715 | |
| 716 | uint3 groups = div_round_up(dimensions, mThreadGroupSize); |
| 717 | |
| 718 | // // Check dispatch dimensions. |
| 719 | if (any(groups > mpDevice->getLimits().maxComputeDispatchThreadGroups)) |
| 720 | { |
| 721 | throw ErrorRunningTestException("GPUUnitTestContext::runProgram() - Dispatch dimension exceeds maximum."); |
| 722 | } |
| 723 | |
| 724 | mpDevice->getRenderContext()->dispatch(mpState.get(), mpVars.get(), groups); |
| 725 | } |
| 726 | |
| 727 | } // namespace unittest |
| 728 |
no test coverage detected