feat: EffectDrawer

This commit is contained in:
刘旭 2023-06-11 23:46:17 +08:00
commit c05720bb15
8 changed files with 508 additions and 196 deletions

View file

@ -779,8 +779,8 @@ static uint32_t ResolvePasses(
SmallVector<std::string_view>& blocks,
EffectDesc& desc
) {
// 必选项IN
// 可选项:OUT, BLOCK_SIZE, NUM_THREADS, STYLE
// 必选项IN, OUT
// 可选项:BLOCK_SIZE, NUM_THREADS, STYLE
// STYLE 为 PS 时不能有 BLOCK_SIZE 或 NUM_THREADS
std::string_view token;
@ -817,7 +817,7 @@ static uint32_t ResolvePasses(
std::sort(
passNumbers.begin(),
passNumbers.end(),
[](const auto& l, const auto& r) {return l.first < r.first; }
[](const auto& l, const auto& r) { return l.first < r.first; }
);
{
@ -1030,6 +1030,11 @@ static uint32_t ResolvePasses(
}
}
// 必须指定 INPUT 和 OUTPUT
if (!processed[0] || !processed[1]) {
return 1;
}
if (passDesc.isPSStyle) {
if (processed[2] || processed[3]) {
return 1;