Fix #141781: EEVEE: IBL broken on Intel Iris 580
The shader was missing barriers compared to the old code. Candidate for 4.5 LTS backport. Co-authored-by: Clément Foucault <fclem@noreply.localhost> Pull Request: https://projects.blender.org/blender/blender/pulls/141971
This commit is contained in:
@@ -137,13 +137,15 @@ void main()
|
||||
/* OpenGL/Intel drivers have known issues where it isn't able to compile barriers inside for
|
||||
* loops. Unroll is needed as driver might decide to not unroll in shaders with more
|
||||
* complexity. */
|
||||
[[gpu::unroll(10)]] for (uint stride = group_size / 2; stride > 0; stride /= 2)
|
||||
[[gpu::unroll]] for (uint i = 0; i < 10; i++)
|
||||
{
|
||||
barrier();
|
||||
uint stride = group_size >> (i + 1u);
|
||||
if (local_index < stride) {
|
||||
local_radiance[local_index] += local_radiance[local_index + stride];
|
||||
}
|
||||
}
|
||||
barrier();
|
||||
|
||||
if (gl_LocalInvocationIndex == 0u) {
|
||||
out_sun[work_group_index].radiance = local_radiance[0].xyz;
|
||||
@@ -158,9 +160,10 @@ void main()
|
||||
/* OpenGL/Intel drivers have known issues where it isn't able to compile barriers inside for
|
||||
* loops. Unroll is needed as driver might decide to not unroll in shaders with more
|
||||
* complexity. */
|
||||
[[gpu::unroll(10)]] for (uint stride = group_size / 2; stride > 0; stride /= 2)
|
||||
[[gpu::unroll]] for (uint i = 0; i < 10; i++)
|
||||
{
|
||||
barrier();
|
||||
uint stride = group_size >> (i + 1u);
|
||||
if (local_index < stride) {
|
||||
local_direction[local_index] += local_direction[local_index + stride];
|
||||
}
|
||||
@@ -179,13 +182,15 @@ void main()
|
||||
/* OpenGL/Intel drivers have known issues where it isn't able to compile barriers inside for
|
||||
* loops. Unroll is needed as driver might decide to not unroll in shaders with more
|
||||
* complexity. */
|
||||
[[gpu::unroll(10)]] for (uint stride = group_size / 2; stride > 0; stride /= 2)
|
||||
[[gpu::unroll]] for (uint i = 0; i < 10; i++)
|
||||
{
|
||||
barrier();
|
||||
uint stride = group_size >> (i + 1u);
|
||||
if (local_index < stride) {
|
||||
local_radiance[local_index] += local_radiance[local_index + stride];
|
||||
}
|
||||
}
|
||||
barrier();
|
||||
|
||||
if (gl_LocalInvocationIndex == 0u) {
|
||||
/* Find the middle point of the whole thread-group. Use it as light vector.
|
||||
|
||||
Reference in New Issue
Block a user