mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 11:30:06 +00:00
e5921f1309
This fixes defects as follows: 1. handleLvalue could be called on a non-L-value, and it shouldn't be. 2. HLSL allows unary negation on non-bool values. TUnaryOperator::promote can now promote other types (e.g, int, float) to bool for this op. 3. HLSL allows binary logical operations (&&, ||) on arbitrary types, similar (2). 4. HLSL allows mod operation on arbitrary types, which will be promoted. E.g, int % float -> float % float.
29 lines
381 B
GLSL
29 lines
381 B
GLSL
struct PS_OUTPUT
|
|
{
|
|
float4 Color : SV_Target0;
|
|
};
|
|
|
|
uniform bool bval;
|
|
uniform bool4 bval4;
|
|
uniform int ival;
|
|
uniform int4 ival4;
|
|
uniform float fval;
|
|
uniform float4 fval4;
|
|
|
|
PS_OUTPUT main()
|
|
{
|
|
ival % fval;
|
|
ival4 % fval4;
|
|
|
|
bval % fval;
|
|
bval4 % fval4;
|
|
|
|
int l_int = 1;
|
|
l_int %= fval;
|
|
|
|
PS_OUTPUT psout;
|
|
psout.Color = 0;
|
|
return psout;
|
|
}
|
|
|