Open chaoticbob opened 1 week ago
Since Slang supports the and and select intrinsics, it only feels right to support the or intrinsic. Shader below currently results in the following error:
and
select
or
shader.hlsl(7): error 30015: undefined identifier 'or'. c = or(a, b); ^~ shader.hlsl(13): error 30015: undefined identifier 'or'. k = or(i, j); ^~ shader.hlsl(14): error 30015: undefined identifier 'or'. n = or(m, l); ^~ shader.hlsl(15): error 30015: undefined identifier 'or'. q = or(o, p); ^~ shader.hlsl(16): error 30015: undefined identifier 'or'. t = or(r, s); ^~ shader.hlsl(18): error 30015: undefined identifier 'or'. k = or(k, true); ^~ shader.hlsl(19): error 30015: undefined identifier 'or'. n = or(n, true); ^~ shader.hlsl(20): error 30015: undefined identifier 'or'. q = or(q, true); ^~ shader.hlsl(21): error 30015: undefined identifier 'or'. t = or(t, true); ^~ shader.hlsl(23): error 30015: undefined identifier 'or'. bool2 tv = bool2(or(a, b), or(k.x, or(n.x, or(q.x, t.x)))); ^~ shader.hlsl(23): error 30015: undefined identifier 'or'. bool2 tv = bool2(or(a, b), or(k.x, or(n.x, or(q.x, t.x)))); ^~ shader.hlsl(23): error 30015: undefined identifier 'or'. bool2 tv = bool2(or(a, b), or(k.x, or(n.x, or(q.x, t.x)))); ^~ shader.hlsl(23): error 30015: undefined identifier 'or'. bool2 tv = bool2(or(a, b), or(k.x, or(n.x, or(q.x, t.x))));
Shader
float4 main() : SV_Target { bool a, b, c; c = or(a, b); bool1 i, j, k; bool2 l, m, n; bool3 o, p, q; bool4 r, s, t; k = or(i, j); n = or(m, l); q = or(o, p); t = or(r, s); k = or(k, true); n = or(n, true); q = or(q, true); t = or(t, true); bool2 tv = bool2(or(a, b), or(k.x, or(n.x, or(q.x, t.x)))); return tv.x ? float4(0, 0, 0, 0) : float4(1, 1, 1, 1); }
Since Slang supports the
and
andselect
intrinsics, it only feels right to support theor
intrinsic. Shader below currently results in the following error:Shader