bfa76ee2ab
Fixes cases where discard and demote are called in pure functions and the function result is not consumed.
23 lines
334 B
Plaintext
23 lines
334 B
Plaintext
#version 450
|
|
#extension GL_EXT_demote_to_helper_invocation : require
|
|
|
|
layout(location = 0) flat in int vA;
|
|
layout(location = 0) out vec4 FragColor;
|
|
|
|
vec4 foobar(int a)
|
|
{
|
|
if (a < 0)
|
|
{
|
|
demote;
|
|
}
|
|
return vec4(10.0);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
int param = vA;
|
|
vec4 _25 = foobar(param);
|
|
FragColor = vec4(10.0);
|
|
}
|
|
|