summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2023-01-31 18:10:48 +0100
committerdegasus <wickmarkus@web.de>2023-02-09 13:27:02 +0100
commit4b2aa948e662aa037ad39f5ee81a64256a4d61aa (patch)
treec6bc567e6ee91b30e4317d726f0643779f916745 /Source/Core/VideoCommon/PixelShaderGen.cpp
parentaaad0cd39fca1ad020864ad7a141052179e7feb4 (diff)
VideoBackend/OGL: Prefer KHR_subgroup over NV_shader_thread.
While the NV extension is totally fine, the KHR extension should be able to support more hardware. For NVIDIA, the hardware either supports both or neither, it just needs a driver from the last two years. For AMD, the drivers from late 2022-12 seems to bring support for the KHR extension. For Intel, the KHR is also supported for some years.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index df6f5dfab8..4dcd681185 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -457,15 +457,12 @@ void UpdateBoundingBox(float2 rawpos) {{
int2 pos_br = pos | 1; // round up to odd
#ifdef SUPPORTS_SUBGROUP_REDUCTION
- if (CAN_USE_SUBGROUP_REDUCTION) {{
- int2 min_pos = IS_HELPER_INVOCATION ? int2(2147483647, 2147483647) : pos_tl;
- int2 max_pos = IS_HELPER_INVOCATION ? int2(-2147483648, -2147483648) : pos_br;
- SUBGROUP_MIN(min_pos);
- SUBGROUP_MAX(max_pos);
+ if (!IS_HELPER_INVOCATION)
+ {{
+ SUBGROUP_MIN(pos_tl);
+ SUBGROUP_MAX(pos_br);
if (IS_FIRST_ACTIVE_INVOCATION)
- UpdateBoundingBoxBuffer(min_pos, max_pos);
- }} else {{
- UpdateBoundingBoxBuffer(pos_tl, pos_br);
+ UpdateBoundingBoxBuffer(pos_tl, pos_br);
}}
#else
UpdateBoundingBoxBuffer(pos_tl, pos_br);