2023-05-03 16:25:24 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 5.0
|
|
|
|
|
2024-01-31 22:01:45 -08:00
|
|
|
[uav 2]
|
|
|
|
stride 16
|
|
|
|
size (buffer, 2)
|
|
|
|
|
|
|
|
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
|
|
|
|
|
2023-05-03 16:25:24 -07:00
|
|
|
[pixel shader todo]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
float3 a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct s2
|
|
|
|
{
|
|
|
|
float4x4 f1, f2, f3;
|
|
|
|
};
|
|
|
|
|
|
|
|
RWStructuredBuffer<float4> u : register(u2);
|
|
|
|
RWStructuredBuffer<float> u1;
|
|
|
|
RWStructuredBuffer<float2x2> u2;
|
|
|
|
RWStructuredBuffer<struct s> u3;
|
|
|
|
RWStructuredBuffer<float4x4> u4;
|
|
|
|
RWStructuredBuffer<struct s2> u5;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = float4(11.1, 12.2, 13.3, 14.4);
|
2024-01-31 22:01:45 -08:00
|
|
|
u[1] = float4(15.5, 16.6, 17.7, 18.8);
|
2023-05-03 16:25:24 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2024-01-31 22:01:45 -08:00
|
|
|
[test]
|
2024-01-31 22:04:28 -08:00
|
|
|
todo(sm<6) draw quad
|
2024-01-31 22:05:35 -08:00
|
|
|
probe uav 2 (0) rgba (11.1, 12.2, 13.3, 14.4)
|
|
|
|
probe uav 2 (1) rgba (15.5, 16.6, 17.7, 18.8)
|
2024-01-31 22:01:45 -08:00
|
|
|
|
2023-10-13 14:35:12 -07:00
|
|
|
[pixel shader todo]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
float3 a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct s2
|
|
|
|
{
|
|
|
|
float4x4 f1, f2, f3;
|
|
|
|
};
|
|
|
|
|
|
|
|
RasterizerOrderedStructuredBuffer<float4> u : register(u2);
|
|
|
|
RasterizerOrderedStructuredBuffer<float> u1;
|
|
|
|
RasterizerOrderedStructuredBuffer<float2x2> u2;
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s> u3;
|
|
|
|
RasterizerOrderedStructuredBuffer<float4x4> u4;
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s2> u5;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = float4(11.1, 12.2, 13.3, 14.4);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-05-03 16:25:24 -07:00
|
|
|
% Array type
|
|
|
|
[pixel shader]
|
|
|
|
typedef float arr[2];
|
|
|
|
RWStructuredBuffer<arr> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-10-12 10:32:02 -07:00
|
|
|
[pixel shader]
|
2023-10-13 14:35:12 -07:00
|
|
|
typedef float arr[2];
|
|
|
|
RasterizerOrderedStructuredBuffer<arr> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2023-05-03 16:25:24 -07:00
|
|
|
% Object types
|
2023-09-14 02:29:24 -07:00
|
|
|
[pixel shader fail(sm<6)]
|
2023-05-03 16:25:24 -07:00
|
|
|
RWStructuredBuffer<Texture2D> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
Texture2D t;
|
|
|
|
};
|
|
|
|
RWStructuredBuffer<struct s> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2023-10-13 14:35:12 -07:00
|
|
|
|
|
|
|
[pixel shader fail(sm<6)]
|
|
|
|
RasterizerOrderedStructuredBuffer<Texture2D> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[pixel shader fail]
|
|
|
|
struct s
|
|
|
|
{
|
|
|
|
Texture2D t;
|
|
|
|
};
|
|
|
|
RasterizerOrderedStructuredBuffer<struct s> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
2024-02-16 12:05:49 -08:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
struct apple
|
|
|
|
{
|
|
|
|
float3 a, x;
|
|
|
|
};
|
|
|
|
|
|
|
|
RWStructuredBuffer<apple> u;
|
|
|
|
|
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
u[0].x = float3(30.0, 40.0, 50.0);
|
|
|
|
return 0;
|
|
|
|
}
|
2024-02-11 17:44:36 -08:00
|
|
|
|
|
|
|
[uav 2]
|
|
|
|
stride 16
|
|
|
|
size (buffer, 2)
|
|
|
|
|
|
|
|
1 2 3 4 5 6 7 8
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
RWStructuredBuffer<int4> u : register(u2);
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = int4(11, -12, 13, -14);
|
|
|
|
u[1] = int4(-15, 16, -17, 18);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-01-31 22:04:28 -08:00
|
|
|
todo(sm<6) draw quad
|
2024-01-31 22:05:35 -08:00
|
|
|
probe uav 2 (0) rgbai (11, -12, 13, -14)
|
|
|
|
probe uav 2 (1) rgbai (-15, 16, -17, 18)
|
2024-03-03 21:22:24 -08:00
|
|
|
|
|
|
|
[uav 2]
|
|
|
|
stride 4
|
|
|
|
size (buffer, 2)
|
|
|
|
|
|
|
|
1 2
|
|
|
|
|
|
|
|
% Test scalar store
|
|
|
|
[pixel shader todo]
|
|
|
|
RWStructuredBuffer<uint> u : register(u2);
|
|
|
|
|
|
|
|
float4 main() : sv_target1
|
|
|
|
{
|
|
|
|
u[0] = 11;
|
|
|
|
u[1] = 12;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
|
|
|
todo(sm<6) draw quad
|
|
|
|
probe uav 2 (0) ri (11)
|
|
|
|
probe uav 2 (1) ri (12)
|