Merge pull request #9800 from Techjar/vulkan-subgroup-fix

Vulkan: Fix subgroup reduction
This commit is contained in:
Connor McLaughlin 2021-06-08 13:21:41 +10:00 committed by GitHub
commit 1b3977990b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ static const char SUBGROUP_HELPER_HEADER[] = R"(
#define SUPPORTS_SUBGROUP_REDUCTION 1 #define SUPPORTS_SUBGROUP_REDUCTION 1
#define CAN_USE_SUBGROUP_REDUCTION true #define CAN_USE_SUBGROUP_REDUCTION true
#define IS_HELPER_INVOCATION gl_HelperInvocation #define IS_HELPER_INVOCATION gl_HelperInvocation
#define IS_FIRST_ACTIVE_INVOCATION (gl_SubgroupInvocationID == subgroupBallotFindLSB(subgroupBallot(true))) #define IS_FIRST_ACTIVE_INVOCATION (gl_SubgroupInvocationID == subgroupBallotFindLSB(subgroupBallot(!gl_HelperInvocation)))
#define SUBGROUP_MIN(value) value = subgroupMin(value) #define SUBGROUP_MIN(value) value = subgroupMin(value)
#define SUBGROUP_MAX(value) value = subgroupMax(value) #define SUBGROUP_MAX(value) value = subgroupMax(value)
)"; )";