AaronGhost/glslsmith-bugs-tracker

Vulkan-Intel miscompiles a division with a multiplication at the previous step (possible duplicate)

AaronGhost opened this issue · 1 comments

Description

#version 450

layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;

layout(std430, binding = 0) buffer buffer_0 {
 int ext_4; // 7
 int ext_5[1]; // 4
};

void main()
{
 ext_4 *= (- 1); // -7
 ext_4 /= (ext_5[0]); // -1
}

Intel-Vulkan output:

buffer_0 1

Expected output:

buffer_0 -1

Code link

For the related code in the shadertrap test format, see: Vulkan-Mesa/miscompilation/shader19.shadertrap

It's a possible duplicate of #8.
The error was broad and affected many divisions by -ext_i. As the pattern looks similar, I wait for the next Mesa version to be released to check I can still reproduce the issue..