Fix #120919: EEVEE-Next: Intel UHD support for probe remapping.

Windows/Intel UHD 600 iGPUs crash when compiling probe remapping shader.
The cause is that there is a balanced barrier inside a forloop. When removing
the barrier the compilation works. This is a driver bug and most likely not
being solved as the driver maintenance mode will only be updated for critical
fixes.

This PR works around the issue making the loop condition less complex.

Pull Request: https://projects.blender.org/blender/blender/pulls/121105
This commit is contained in:
Jeroen Bakker
2024-05-06 17:02:46 +02:00
parent 9d07f6d5a0
commit c99e7519c4
2 changed files with 4 additions and 2 deletions

View File

@@ -34,6 +34,7 @@
#define CULLING_TILE_GROUP_SIZE 256
/* Reflection Probes. */
/* When changed update parallel sum loop in `eevee_reflection_probe_remap_comp.glsl`. */
#define SPHERE_PROBE_REMAP_GROUP_SIZE 32
#define SPHERE_PROBE_GROUP_SIZE 16
#define SPHERE_PROBE_SELECT_GROUP_SIZE 64

View File

@@ -125,12 +125,13 @@ void main()
const uint group_size = gl_WorkGroupSize.x * gl_WorkGroupSize.y;
/* Parallel sum. Result is stored inside local_radiance[0]. */
local_radiance[local_index] = radiance.xyzz * sample_weight;
for (uint stride = group_size / 2; stride > 0; stride /= 2) {
uint stride = group_size / 2;
for (int i = 0; i < 10; i++) {
barrier();
if (local_index < stride) {
local_radiance[local_index] += local_radiance[local_index + stride];
}
stride /= 2;
}
barrier();