tests: Add test for local root signature static samplers.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-08-27 14:47:07 +02:00
parent 08a7d7a165
commit 1ca9ec7284
2 changed files with 486 additions and 0 deletions

View File

@ -78,6 +78,218 @@ static bool init_raytracing_test_context(struct raytracing_test_context *context
return true;
}
static D3D12_SHADER_BYTECODE get_static_sampler_rt_lib(void)
{
static const BYTE rt_lib_dxil[] =
{
#if 0
RaytracingAccelerationStructure AS : register(t0);
RWStructuredBuffer<float> Buf : register(u0);
Texture2D<float> Tex : register(t1);
SamplerState ClampSampler : register(s0);
SamplerState WrapSampler : register(s1);
SamplerState ClampWrapSampler : register(s2);
struct RayPayload
{
float value;
};
[shader("closesthit")]
void RayClosest1(inout RayPayload payload, BuiltInTriangleIntersectionAttributes attrib)
{
/* Tex(1, 1) + Tex(1, 0) = 40 + 20 = 60 */
payload.value =
Tex.SampleLevel(ClampSampler, 1.25.xx, 0.0) +
Tex.SampleLevel(ClampWrapSampler, 1.25.xx, 0.0);
}
[shader("closesthit")]
void RayClosest2(inout RayPayload payload, BuiltInTriangleIntersectionAttributes attrib)
{
/* Tex(0, 0) + Tex(1, 0) = 10 + 20 = 30 */
payload.value =
Tex.SampleLevel(WrapSampler, 1.25.xx, 0.0) +
Tex.SampleLevel(ClampWrapSampler, 1.25.xx, 0.0);
}
[shader("miss")]
void RayMiss(inout RayPayload payload)
{
payload.value = -1.0;
}
[shader("raygeneration")]
void RayGen()
{
RayPayload payload;
payload.value = 0.0;
uint2 index = DispatchRaysIndex().xy;
RayDesc ray;
ray.Origin = float3(10.0 * float2(index), 1.0);
ray.Direction = float3(0.0, 0.0, -1.0);
ray.TMin = 0;
ray.TMax = 10;
TraceRay(AS, RAY_FLAG_NONE, 1, 0, 1, 0, ray, payload);
Buf[index.y * 2 + index.x] = payload.value;
}
#endif
0x44, 0x58, 0x42, 0x43, 0x23, 0xb5, 0xe2, 0x67, 0x26, 0x4b, 0xc9, 0x4f, 0x2e, 0xe6, 0xd2, 0x8f, 0x3e, 0xbb, 0x32, 0x03, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x12, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x68, 0x03, 0x00, 0x00, 0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x52, 0x44, 0x41, 0x54, 0x04, 0x03, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0xd0, 0x02, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x00, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x57, 0x72, 0x61, 0x70, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x72, 0x00, 0x43, 0x6c, 0x61, 0x6d, 0x70, 0x57, 0x72, 0x61, 0x70, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x41, 0x53, 0x00, 0x54, 0x65, 0x78, 0x00, 0x42, 0x75, 0x66, 0x00, 0x01, 0x3f,
0x52, 0x61, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x31, 0x40, 0x40, 0x59, 0x41, 0x58, 0x55, 0x52, 0x61, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x40, 0x40, 0x55, 0x42, 0x75,
0x69, 0x6c, 0x74, 0x49, 0x6e, 0x54, 0x72, 0x69, 0x61, 0x6e, 0x67, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
0x74, 0x65, 0x73, 0x40, 0x40, 0x40, 0x5a, 0x00, 0x52, 0x61, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x31, 0x00, 0x01, 0x3f, 0x52, 0x61, 0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74,
0x32, 0x40, 0x40, 0x59, 0x41, 0x58, 0x55, 0x52, 0x61, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x40, 0x40, 0x55, 0x42, 0x75, 0x69, 0x6c, 0x74, 0x49, 0x6e, 0x54, 0x72, 0x69, 0x61, 0x6e,
0x67, 0x6c, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x40, 0x40, 0x40, 0x5a, 0x00, 0x52, 0x61,
0x79, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x73, 0x74, 0x32, 0x00, 0x01, 0x3f, 0x52, 0x61, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x40, 0x40, 0x59, 0x41, 0x58, 0x55, 0x52, 0x61, 0x79, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x40, 0x40, 0x40, 0x5a, 0x00, 0x52, 0x61, 0x79, 0x4d, 0x69, 0x73, 0x73, 0x00, 0x01, 0x3f, 0x52, 0x61, 0x79, 0x47, 0x65, 0x6e, 0x40, 0x40, 0x59, 0x41, 0x58, 0x58, 0x5a, 0x00,
0x52, 0x61, 0x79, 0x47, 0x65, 0x6e, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x60, 0x00, 0x0a, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x60, 0x00, 0x0a, 0x00,
0xe2, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x60, 0x00, 0x0b, 0x00, 0x08, 0x01, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x63, 0x00, 0x07, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe6, 0x0d, 0xd0, 0x80, 0x74, 0xce, 0xca,
0xcd, 0xb1, 0xdd, 0x56, 0xbf, 0x49, 0x71, 0x36, 0x44, 0x58, 0x49, 0x4c, 0x9c, 0x0e, 0x00, 0x00, 0x63, 0x00, 0x06, 0x00, 0xa7, 0x03, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x03, 0x01, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x84, 0x0e, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x0b, 0x82, 0x20, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x07, 0x81, 0x23, 0x91, 0x41, 0xc8, 0x04, 0x49, 0x06, 0x10, 0x32, 0x39, 0x92, 0x01, 0x84, 0x0c, 0x25, 0x05, 0x08, 0x19, 0x1e, 0x04, 0x8b, 0x62, 0x80, 0x18, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42,
0xc4, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x62, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x23, 0xc4, 0x50,
0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x31, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x5d, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0x20, 0x00, 0x12, 0x60, 0xd9, 0x60, 0x08, 0x02, 0xb0, 0x00,
0xd4, 0x06, 0xf0, 0x18, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x24, 0x82, 0x1c, 0xd2, 0x61, 0x1e, 0xc2, 0x41, 0x1c, 0xd8, 0xa1, 0x1c, 0xda, 0x80, 0x1e, 0xc2, 0x21, 0x1d, 0xd8, 0xa1, 0x0d, 0xc6,
0x21, 0x1c, 0xd8, 0x81, 0x1d, 0xe6, 0x01, 0x30, 0x87, 0x70, 0x60, 0x87, 0x79, 0x28, 0x07, 0x80, 0x60, 0x87, 0x72, 0x98, 0x87, 0x79, 0x68, 0x03, 0x78, 0x90, 0x87, 0x72, 0x18, 0x87, 0x74, 0x98,
0x87, 0x72, 0x68, 0x03, 0x73, 0x80, 0x87, 0x76, 0x08, 0x07, 0x72, 0x00, 0xcc, 0x21, 0x1c, 0xd8, 0x61, 0x1e, 0xca, 0x01, 0x20, 0xdc, 0xe1, 0x1d, 0xda, 0xc0, 0x1c, 0xe4, 0x21, 0x1c, 0xda, 0xa1,
0x1c, 0xda, 0x00, 0x1e, 0xde, 0x21, 0x1d, 0xdc, 0x81, 0x1e, 0xca, 0x41, 0x1e, 0xda, 0xa0, 0x1c, 0xd8, 0x21, 0x1d, 0xda, 0x01, 0x30, 0x87, 0x70, 0x60, 0x87, 0x79, 0x28, 0x07, 0x80, 0x70, 0x87,
0x77, 0x68, 0x83, 0x74, 0x70, 0x07, 0x73, 0x98, 0x87, 0x36, 0x30, 0x07, 0x78, 0x68, 0x83, 0x76, 0x08, 0x07, 0x7a, 0x40, 0x07, 0xc0, 0x1c, 0xc2, 0x81, 0x1d, 0xe6, 0xa1, 0x1c, 0x00, 0xc2, 0x1d,
0xde, 0xa1, 0x0d, 0xdc, 0x21, 0x1c, 0xdc, 0x61, 0x1e, 0xda, 0xc0, 0x1c, 0xe0, 0xa1, 0x0d, 0xda, 0x21, 0x1c, 0xe8, 0x01, 0x1d, 0x00, 0x73, 0x08, 0x07, 0x76, 0x98, 0x87, 0x72, 0x00, 0x06, 0x77,
0x78, 0x87, 0x36, 0x90, 0x87, 0x72, 0x08, 0x07, 0x76, 0x48, 0x87, 0x73, 0x70, 0x87, 0x36, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58, 0x07, 0x80, 0x98, 0x07, 0x7a, 0x08, 0x87, 0x71, 0x58, 0x87,
0x36, 0x80, 0x07, 0x79, 0x78, 0x07, 0x7a, 0x28, 0x87, 0x71, 0xa0, 0x87, 0x77, 0x90, 0x87, 0x36, 0x10, 0x87, 0x7a, 0x30, 0x07, 0x73, 0x28, 0x07, 0x79, 0x68, 0x83, 0x79, 0x48, 0x07, 0x7d, 0x28,
0x07, 0x00, 0x0e, 0x00, 0xa2, 0x1e, 0xdc, 0x61, 0x1e, 0xc2, 0xc1, 0x1c, 0xca, 0xa1, 0x0d, 0xcc, 0x01, 0x1e, 0xda, 0xa0, 0x1d, 0xc2, 0x81, 0x1e, 0xd0, 0x01, 0x30, 0x87, 0x70, 0x60, 0x87, 0x79,
0x28, 0x07, 0x80, 0xa8, 0x87, 0x79, 0x28, 0x87, 0x36, 0x98, 0x87, 0x77, 0x30, 0x07, 0x7a, 0x68, 0x03, 0x73, 0x60, 0x87, 0x77, 0x08, 0x07, 0x7a, 0x00, 0xcc, 0x21, 0x1c, 0xd8, 0x61, 0x1e, 0xca,
0x01, 0xd8, 0x60, 0x10, 0xff, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x12, 0x50, 0x6d, 0x30, 0x8a, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa0, 0x36, 0x10, 0xc6, 0xff, 0xff, 0xff, 0xff, 0x0f, 0x80,
0xb4, 0x81, 0x38, 0x20, 0xe0, 0x0c, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x13, 0x86, 0x40, 0x18, 0x26, 0x08, 0xc1, 0x30, 0x21, 0x18, 0x26, 0x04, 0xc4, 0x84, 0xa0, 0x98,
0x10, 0x18, 0x13, 0x82, 0x03, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x69, 0x00, 0x00, 0x00, 0x32, 0x22, 0x88, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x23, 0xa4, 0x84, 0x04, 0x13, 0x23, 0xe3,
0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8c, 0x8c, 0x0b, 0x84, 0xc4, 0x4c, 0x10, 0xbc, 0xc1, 0x1c, 0x01, 0x18, 0x9c, 0x19, 0x48, 0x53, 0x44, 0x09, 0x93, 0xbf, 0x02, 0xd8, 0x14, 0x01, 0x02, 0xd2,
0x18, 0x9a, 0x20, 0x10, 0x0b, 0x11, 0x01, 0x13, 0xe2, 0x34, 0xec, 0x14, 0x51, 0xc2, 0x44, 0x45, 0x04, 0x0a, 0x00, 0x0a, 0x66, 0x00, 0x66, 0xfa, 0xc6, 0x81, 0x1d, 0xc2, 0x61, 0x1e, 0xe6, 0xc1,
0x0d, 0x64, 0xe1, 0x16, 0x66, 0x81, 0x1e, 0xe4, 0xa1, 0x1e, 0xc6, 0x81, 0x1e, 0xea, 0x41, 0x1e, 0xca, 0x81, 0x1c, 0x44, 0xa1, 0x1e, 0xcc, 0xc1, 0x1c, 0xca, 0x41, 0x1e, 0xf8, 0xc0, 0x1c, 0xd8,
0xe1, 0x1d, 0xc2, 0x81, 0x1e, 0xfc, 0x00, 0x05, 0x03, 0x11, 0x33, 0x85, 0xc1, 0x38, 0xb0, 0x43, 0x38, 0xcc, 0xc3, 0x3c, 0xb8, 0x01, 0x2d, 0x94, 0x03, 0x3e, 0xd0, 0x43, 0x3d, 0xc8, 0x43, 0x39,
0xc8, 0x01, 0x29, 0xf0, 0x81, 0x39, 0xb0, 0xc3, 0x3b, 0x84, 0x03, 0x3d, 0xf8, 0x81, 0x1e, 0xe8, 0x41, 0x3b, 0xa4, 0x03, 0x3c, 0xcc, 0xc3, 0x2f, 0xd0, 0x43, 0x3e, 0xc0, 0x43, 0x39, 0xa0, 0x00,
0x98, 0xc9, 0x1a, 0x07, 0x76, 0x08, 0x87, 0x79, 0x98, 0x07, 0x37, 0xa0, 0x85, 0x72, 0xc0, 0x07, 0x7a, 0xa8, 0x07, 0x79, 0x28, 0x07, 0x39, 0x20, 0x05, 0x3e, 0x30, 0x07, 0x76, 0x78, 0x87, 0x70,
0xa0, 0x07, 0x3f, 0x40, 0xc2, 0x60, 0xd0, 0x71, 0x93, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2c, 0xc0, 0x3c, 0x0b, 0x11, 0xb1, 0x13, 0x30, 0x11, 0x28, 0x00, 0x28, 0x19, 0x01, 0xb8, 0x48, 0x9a, 0x22,
0x4a, 0x98, 0xfc, 0x15, 0xc0, 0x52, 0x00, 0x5b, 0x1c, 0x60, 0x40, 0xc1, 0x40, 0xcc, 0x30, 0x82, 0x30, 0x1c, 0x1b, 0x48, 0x53, 0x44, 0x09, 0x93, 0xbf, 0x51, 0xc8, 0x32, 0x89, 0x4d, 0x1b, 0x21,
0x40, 0x63, 0x2c, 0x84, 0xd8, 0x4c, 0x44, 0x24, 0x11, 0xc2, 0x84, 0x38, 0x8d, 0x36, 0x4d, 0x11, 0x12, 0x50, 0x13, 0x21, 0xa1, 0xc0, 0xa1, 0xa7, 0x0c, 0x4b, 0x03, 0x51, 0x54, 0x84, 0xa5, 0xa1,
0xa9, 0x04, 0x0b, 0x55, 0x37, 0x0d, 0x97, 0x3f, 0x61, 0x0f, 0x21, 0xf9, 0x2b, 0x21, 0xad, 0xc4, 0xe4, 0x17, 0xb7, 0x8d, 0x8a, 0x61, 0x18, 0x06, 0x60, 0x8e, 0x00, 0x21, 0xec, 0x9e, 0xe1, 0xf2,
0x27, 0xec, 0x21, 0x24, 0x3f, 0x04, 0x9a, 0x61, 0x21, 0x50, 0x90, 0x15, 0xe6, 0x02, 0x34, 0x6d, 0x18, 0x86, 0x01, 0x00, 0x80, 0x81, 0xb6, 0x32, 0x00, 0x00, 0x46, 0x5d, 0x89, 0x16, 0x40, 0x03,
0x00, 0x00, 0x00, 0x86, 0x61, 0x18, 0x86, 0x61, 0x18, 0x1a, 0xfa, 0xca, 0xb2, 0x00, 0x1a, 0x00, 0x0c, 0xc3, 0x30, 0x60, 0x00, 0x85, 0x65, 0xd0, 0x80, 0x83, 0xc6, 0x32, 0x68, 0x40, 0x42, 0x65,
0x19, 0x34, 0x20, 0xa0, 0xb3, 0x0c, 0x1a, 0x40, 0x50, 0x3a, 0x10, 0x30, 0x47, 0x10, 0xcc, 0x11, 0x80, 0x02, 0x0d, 0x00, 0x13, 0x14, 0x72, 0xc0, 0x87, 0x74, 0x60, 0x87, 0x36, 0x68, 0x87, 0x79,
0x68, 0x03, 0x72, 0xc0, 0x87, 0x0d, 0xaf, 0x50, 0x0e, 0x6d, 0xd0, 0x0e, 0x7a, 0x50, 0x0e, 0x6d, 0x00, 0x0f, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0xa0,
0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x78, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x90, 0x0e, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xd0, 0x06, 0xe9, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x73,
0x20, 0x07, 0x6d, 0x90, 0x0e, 0x76, 0x40, 0x07, 0x7a, 0x60, 0x07, 0x74, 0xd0, 0x06, 0xe6, 0x10, 0x07, 0x76, 0xa0, 0x07, 0x73, 0x20, 0x07, 0x6d, 0x60, 0x0e, 0x73, 0x20, 0x07, 0x7a, 0x30, 0x07,
0x72, 0xd0, 0x06, 0xe6, 0x60, 0x07, 0x74, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x6d, 0xe0, 0x0e, 0x78, 0xa0, 0x07, 0x71, 0x60, 0x07, 0x7a, 0x30, 0x07, 0x72, 0xa0, 0x07, 0x76, 0x40, 0x07, 0x3a, 0x0f,
0x84, 0x90, 0x21, 0x23, 0x45, 0x44, 0x00, 0xc6, 0x00, 0x80, 0x49, 0x03, 0x00, 0xe6, 0x0d, 0x00, 0x98, 0x39, 0x00, 0x60, 0xe6, 0x00, 0x80, 0x99, 0x03, 0x00, 0x1e, 0xf2, 0x44, 0x00, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x89, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x33, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x90, 0xa7, 0x02, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x21, 0xcf, 0x06, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x0e, 0x08,
0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x1f, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0xc2, 0x00, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x63, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x43, 0x9e, 0x32, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x21, 0xcf, 0x19, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x90, 0x27, 0x0d, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x0b, 0x04, 0x00, 0x00,
0x0d, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x18, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x02, 0x4a, 0xa0, 0x0c, 0x8a, 0x61, 0x04, 0xa0, 0x40, 0x0a, 0xa1, 0x08, 0x4a,
0xa2, 0x30, 0x0a, 0xa2, 0x28, 0xca, 0xa1, 0x14, 0xca, 0x82, 0xd8, 0x11, 0x00, 0x6a, 0x0b, 0x14, 0x10, 0x61, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0xca, 0x00, 0x00, 0x00,
0x1a, 0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0x44, 0x35, 0x18, 0x63, 0x0b, 0x73, 0x3b, 0x03, 0xb1, 0x2b, 0x93, 0x9b, 0x4b, 0x7b, 0x73, 0x03, 0x99, 0x71, 0xb9, 0x01, 0x41, 0xa1, 0x0b, 0x3b, 0x9b,
0x7b, 0x91, 0x2a, 0x62, 0x2a, 0x0a, 0x9a, 0x2a, 0xfa, 0x9a, 0xb9, 0x81, 0x79, 0x31, 0x4b, 0x73, 0x0b, 0x63, 0x4b, 0xd9, 0x10, 0x04, 0x13, 0x04, 0x40, 0x9a, 0x20, 0x00, 0xd3, 0x06, 0x61, 0x20,
0x26, 0x08, 0x00, 0xb5, 0x41, 0x18, 0x0c, 0x0e, 0x6c, 0x69, 0x62, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x40, 0x35, 0x41, 0x10, 0x00, 0x0a, 0x41, 0x53, 0x13, 0x04, 0xc0, 0x9a, 0x20, 0x00, 0xd7,
0x06, 0x41, 0x71, 0x36, 0x24, 0xca, 0xc2, 0x28, 0xca, 0xd0, 0x28, 0xcf, 0x04, 0x01, 0x11, 0x38, 0x50, 0x95, 0xe1, 0x4d, 0x10, 0x00, 0x6c, 0x82, 0x00, 0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b, 0x92, 0x41, 0x0d, 0xde, 0x00, 0x0e, 0xde, 0x20, 0x0e, 0xe4, 0x60,
0x0e, 0xe8, 0x80, 0xc0, 0x04, 0xa1, 0x0d, 0xc2, 0x60, 0x83, 0xa0, 0xdc, 0xc1, 0x86, 0x02, 0xb0, 0x03, 0x20, 0x0d, 0xf0, 0x80, 0xa9, 0x10, 0xf0, 0x23, 0x15, 0x96, 0x37, 0xc4, 0xf6, 0x36, 0x57,
0x36, 0x47, 0x17, 0x03, 0x04, 0x94, 0x15, 0x84, 0x55, 0x25, 0x15, 0x96, 0x07, 0x15, 0x96, 0xc7, 0xf6, 0x16, 0x46, 0x06, 0x04, 0x54, 0x25, 0x54, 0x97, 0xc6, 0x46, 0x97, 0xe4, 0x46, 0x25, 0x97,
0x16, 0xe6, 0x76, 0xc6, 0x56, 0x96, 0xe4, 0x46, 0x57, 0x26, 0x37, 0x57, 0x36, 0x46, 0x97, 0xf6, 0xe6, 0x16, 0x44, 0x47, 0x27, 0x97, 0x26, 0x56, 0x47, 0x57, 0x36, 0x07, 0x04, 0x04, 0xa4, 0x35,
0x41, 0x00, 0xb6, 0x09, 0x02, 0xc0, 0x4d, 0x10, 0x80, 0x6e, 0x82, 0x00, 0x78, 0x1b, 0x02, 0x65, 0x03, 0xb2, 0x07, 0x7c, 0x60, 0x38, 0x7d, 0xb0, 0x07, 0x7e, 0xf0, 0x07, 0x1b, 0x0a, 0x35, 0xd0,
0x03, 0x00, 0x00, 0x05, 0xa6, 0x42, 0xc0, 0x8f, 0x54, 0x58, 0xde, 0x10, 0xdb, 0xdb, 0x5c, 0xd9, 0x1c, 0x9d, 0x0c, 0x10, 0x50, 0x56, 0x10, 0x56, 0x95, 0x54, 0x58, 0x1e, 0x54, 0x58, 0x1e, 0xdb,
0x5b, 0x18, 0x19, 0x10, 0x50, 0x95, 0x50, 0x5d, 0x1a, 0x1b, 0x5d, 0x92, 0x1b, 0x95, 0x5c, 0x5a, 0x98, 0xdb, 0x19, 0x5b,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 0xcc, 0x03, 0x3d, 0xc8, 0x43, 0x3d, 0x8c, 0x03, 0x3d, 0xcc, 0x78, 0x8c, 0x74, 0x70, 0x07, 0x7b, 0x08, 0x07, 0x79, 0x48, 0x87, 0x70, 0x70, 0x07,
0x7a, 0x70, 0x03, 0x76, 0x78, 0x87, 0x70, 0x20, 0x87, 0x19, 0xcc, 0x11, 0x0e, 0xec, 0x90, 0x0e, 0xe1, 0x30, 0x0f, 0x6e, 0x30, 0x0f, 0xe3, 0xf0, 0x0e, 0xf0, 0x50, 0x0e, 0x33, 0x10, 0xc4, 0x1d,
0xde, 0x21, 0x1c, 0xd8, 0x21, 0x1d, 0xc2, 0x61, 0x1e, 0x66, 0x30, 0x89, 0x3b, 0xbc, 0x83, 0x3b, 0xd0, 0x43, 0x39, 0xb4, 0x03, 0x3c, 0xbc, 0x83, 0x3c, 0x84, 0x03, 0x3b, 0xcc, 0xf0, 0x14, 0x76,
0x60, 0x07, 0x7b, 0x68, 0x07, 0x37, 0x68, 0x87, 0x72, 0x68, 0x07, 0x37, 0x80, 0x87, 0x70, 0x90, 0x87, 0x70, 0x60, 0x07, 0x76, 0x28, 0x07, 0x76, 0xf8, 0x05, 0x76, 0x78, 0x87, 0x77, 0x80, 0x87,
0x5f, 0x08, 0x87, 0x71, 0x18, 0x87, 0x72, 0x98, 0x87, 0x79, 0x98, 0x81, 0x2c, 0xee, 0xf0, 0x0e, 0xee, 0xe0, 0x0e, 0xf5, 0xc0, 0x0e, 0xec, 0x30, 0x03, 0x62, 0xc8, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c,
0xcc, 0xa1, 0x1c, 0xe4, 0xa1, 0x1c, 0xdc, 0x61, 0x1c, 0xca, 0x21, 0x1c, 0xc4, 0x81, 0x1d, 0xca, 0x61, 0x06, 0xd6, 0x90, 0x43, 0x39, 0xc8, 0x43, 0x39, 0x98, 0x43, 0x39, 0xc8, 0x43, 0x39, 0xb8,
0xc3, 0x38, 0x94, 0x43, 0x38, 0x88, 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68, 0x82, 0x40, 0x2c, 0x44, 0x04, 0x4c, 0x88, 0xd3, 0xb0, 0x53, 0x44, 0x09, 0x13,
0x15, 0x11, 0xf6, 0xc0, 0x06, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x44, 0x04, 0x30, 0x11, 0x21, 0xd0, 0x0c, 0x0b, 0xf1, 0x39, 0x51, 0x89, 0x04, 0xbe, 0x34, 0x45, 0x94, 0x30, 0xf9, 0x2c, 0xc0, 0x3c,
0x0b, 0x11, 0xb1, 0x13, 0x30, 0x11, 0xb6, 0xb0, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0x80, 0x48, 0x0f, 0x30, 0x09, 0xc7, 0x0a, 0x60, 0x92, 0xd8, 0x0c, 0xc4, 0xe5, 0x23, 0xb7, 0x6d, 0x0d, 0xd8, 0x70,
0xf9, 0xce, 0xe3, 0x47, 0x80, 0xb5, 0x51, 0x45, 0x41, 0x44, 0xec, 0xe4, 0x44, 0x84, 0x5f, 0xdc, 0xb6, 0x29, 0x54, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x01, 0xcc, 0xb3, 0x10, 0x25, 0x51, 0x11, 0x8b,
0x5f, 0xdc, 0xb6, 0x31, 0x80, 0xc1, 0x70, 0xf9, 0xce, 0xe3, 0x4f, 0x11, 0x20, 0x10, 0x2b, 0x80, 0xf9, 0xd2, 0x14, 0x51, 0xc2, 0xe4, 0xaf, 0x00, 0x96, 0x02, 0xd8, 0xe2, 0x00, 0x03, 0x00, 0x00,
0x61, 0x20, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x14, 0xb0, 0x40, 0xf1, 0xcd, 0x00, 0xd0, 0x30, 0x46, 0x00, 0x82,
0x20, 0xa8, 0x7f, 0x33, 0x00, 0x23, 0x00, 0x00, 0x64, 0x06, 0xc9, 0xa0, 0x34, 0x48, 0x06, 0xad, 0xc1, 0x31, 0x46, 0x0c, 0x0c, 0x00, 0x04, 0xc1, 0x60, 0x0c, 0xc0, 0x20, 0x09, 0x46, 0x0c, 0x0c,
0x00, 0x04, 0xc1, 0xa0, 0x0c, 0xc0, 0x40, 0x19, 0x46, 0x0c, 0x1e, 0x00, 0x04, 0xc1, 0x60, 0x33, 0x03, 0x45, 0x08, 0x10, 0xe4, 0x38, 0xb6, 0x2d, 0x31, 0x46, 0x13, 0x02, 0x60, 0xc4, 0xc0, 0x00,
0x40, 0x10, 0x0c, 0xca, 0x60, 0x0c, 0x9a, 0x63, 0xc4, 0xe0, 0x01, 0x40, 0x10, 0x0c, 0xb6, 0x34, 0x68, 0x8a, 0x60, 0x59, 0x14, 0xc5, 0xf3, 0x98, 0x64, 0x34, 0x21, 0x00, 0x2c, 0x20, 0xe0, 0xb3,
0x99, 0x61, 0x0a, 0x83, 0x30, 0x18, 0x36, 0x20, 0x02, 0x61, 0x00, 0x30, 0x1c, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x62, 0x00, 0xd3, 0x14, 0x21, 0x81, 0x8d, 0x1c, 0x0f, 0x80, 0x2d,
0x0e, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x14, 0xb0, 0x40,
0xf1, 0xcd, 0x00, 0xd0, 0x30, 0x46, 0x00, 0x82, 0x20, 0xa8, 0x7f, 0x33, 0x00, 0x23, 0x00, 0x00, 0x64, 0x06, 0xc9, 0x20, 0x34, 0x48, 0x06, 0xad, 0xc1, 0x31, 0x46, 0x0c, 0x0c, 0x00, 0x04, 0xc1,
0x60, 0x0c, 0xc0, 0x20, 0x09, 0x46, 0x0c, 0x0c, 0x00, 0x04, 0xc1, 0xa0, 0x0c, 0xc0, 0x40, 0x19, 0x46, 0x0c, 0x1e, 0x00, 0x04, 0xc1, 0x60, 0x33, 0x03, 0x45, 0x08, 0x10, 0xe4, 0x38, 0xb6, 0x2d,
0x31, 0x46, 0x13, 0x02, 0x60, 0xc4, 0xc0, 0x00, 0x40, 0x10, 0x0c, 0xca, 0x60, 0x0c, 0x9a, 0x63, 0xc4, 0xe0, 0x01, 0x40, 0x10, 0x0c, 0xb6, 0x34, 0x68, 0x8a, 0x60, 0x59, 0x14, 0xc5, 0xf3, 0x98,
0x64, 0x34, 0x21, 0x00, 0x2c, 0x20, 0xe0, 0xb3, 0x99, 0x61, 0x0a, 0x83, 0x30, 0x18, 0x36, 0x20, 0x02, 0x61, 0x00, 0x30, 0x1c, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x62, 0x00, 0xd3,
0x14, 0x21, 0x81, 0x8d, 0x1c, 0x0f, 0x80, 0x2d, 0x0e, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x34, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x19, 0x04, 0x08, 0x1a, 0x36, 0x20, 0x02, 0x61, 0x00, 0x30, 0x1c, 0x08, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x36, 0x72, 0x3c, 0x00, 0xb6, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x20, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00,
0x0b, 0x00, 0x00, 0x00, 0x04, 0x94, 0xa8, 0x40, 0x01, 0x0b, 0x94, 0xae, 0x40, 0x61, 0x0a, 0x10, 0x36, 0x02, 0x50, 0x02, 0x34, 0xcc, 0x00, 0x8c, 0x11, 0x80, 0x20, 0x08, 0xe2, 0xdf, 0x18, 0x01,
0x08, 0x82, 0x20, 0xfe, 0x0b, 0x63, 0x04, 0x20, 0x08, 0x82, 0x32, 0x18, 0x8c, 0x00, 0x00, 0x00, 0xe4, 0x06, 0xc1, 0x20, 0x37, 0x20, 0xc6, 0x4c, 0x04, 0x03, 0x48, 0xa3, 0xb0, 0x99, 0x21, 0xe0,
0xb8, 0x61, 0x03, 0x22, 0x28, 0x06, 0x60, 0xc4, 0xc0, 0x00, 0x40, 0x10, 0x0c, 0xba, 0x33, 0x78, 0x96, 0x11, 0x03, 0x03, 0x00, 0x41, 0x30, 0xe8, 0xd0, 0x00, 0x5a, 0x4e, 0x18, 0xea, 0x84, 0xa1,
0x4c, 0x50, 0xe4, 0x63, 0xc2, 0x22, 0x9f, 0x11, 0x03, 0x03, 0x00, 0x41, 0x30, 0x38, 0x03, 0x34, 0xa0, 0x94, 0x11, 0x03, 0xea, 0x00, 0x41, 0x30, 0xf8, 0xda, 0x80, 0x0a, 0xc8, 0xe0, 0x0c, 0xc8,
0xe0, 0x0c, 0xc8, 0x60, 0x10, 0x1e, 0x86, 0x61, 0x9c, 0x26, 0x21, 0x64, 0x18, 0x75, 0xa0, 0xc1, 0x55, 0x90, 0xc0, 0x88, 0x81, 0x01, 0x80, 0x20, 0x18, 0xa4, 0xc1, 0x1a, 0x60, 0xcd, 0x88, 0x81,
0x03, 0x80, 0x20, 0x18, 0x84, 0x01, 0x1c, 0x5c, 0x81, 0x80, 0x06, 0x04, 0x45, 0x51, 0x95, 0x19, 0x60, 0x40, 0x0c, 0x00, 0x03, 0x00, 0x00, 0x00, 0x5b, 0x06, 0x22, 0x88, 0x85, 0x2d, 0x43, 0x13,
0xc4, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
D3D12_SHADER_BYTECODE code;
code.pShaderBytecode = rt_lib_dxil;
code.BytecodeLength = sizeof(rt_lib_dxil);
return code;
}
static D3D12_SHADER_BYTECODE get_default_rt_lib(void)
{
/* Compile with -Tlib_6_3 in DXC. */
@ -1424,3 +1636,276 @@ void test_raytracing(void)
destroy_raytracing_test_context(&context);
}
void test_raytracing_local_rs_static_sampler(void)
{
ID3D12GraphicsCommandList4 *command_list4;
ID3D12GraphicsCommandList *command_list;
struct raytracing_test_context context;
struct test_rt_geometry test_rtases;
ID3D12RootSignature *local_rs[2];
struct test_geometry test_geom;
ID3D12RootSignature *global_rs;
struct resource_readback rb;
ID3D12DescriptorHeap *heap;
ID3D12StateObject *rt_pso;
ID3D12Device *device;
ID3D12Resource *srv;
ID3D12Resource *uav;
ID3D12Resource *sbt;
if (!init_raytracing_test_context(&context))
return;
device = context.context.device;
command_list = context.context.list;
command_list4 = context.list4;
init_test_geometry(device, &test_geom);
init_rt_geometry(&context, &test_rtases, &test_geom,
2, 10.0f, 2, 1.0f, 10.0f, 0);
/* Global root signature */
{
D3D12_ROOT_PARAMETER root_param[1];
D3D12_ROOT_SIGNATURE_DESC rs_desc;
D3D12_DESCRIPTOR_RANGE ranges[2];
memset(&rs_desc, 0, sizeof(rs_desc));
memset(root_param, 0, sizeof(root_param));
memset(ranges, 0, sizeof(ranges));
rs_desc.NumParameters = ARRAY_SIZE(root_param);
rs_desc.pParameters = root_param;
root_param[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
root_param[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
root_param[0].DescriptorTable.NumDescriptorRanges = ARRAY_SIZE(ranges);
root_param[0].DescriptorTable.pDescriptorRanges = ranges;
ranges[0].NumDescriptors = 2;
ranges[0].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
ranges[0].OffsetInDescriptorsFromTableStart = 0;
ranges[1].NumDescriptors = 1;
ranges[1].RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_UAV;
ranges[1].OffsetInDescriptorsFromTableStart = 2;
create_root_signature(device, &rs_desc, &global_rs);
}
/* Local root signatures. */
{
D3D12_STATIC_SAMPLER_DESC sampler_descs[2];
D3D12_ROOT_SIGNATURE_DESC rs_desc;
memset(&rs_desc, 0, sizeof(rs_desc));
memset(sampler_descs, 0, sizeof(sampler_descs));
rs_desc.NumStaticSamplers = ARRAY_SIZE(sampler_descs);
rs_desc.pStaticSamplers = sampler_descs;
rs_desc.Flags = D3D12_ROOT_SIGNATURE_FLAG_LOCAL_ROOT_SIGNATURE;
/* First closesthit shader reads s0 and s2. Second one reads s1 and s2. s2 is shared, and must be defined
* equal across the PSO. */
sampler_descs[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
sampler_descs[0].AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
sampler_descs[0].AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
sampler_descs[0].AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
sampler_descs[0].Filter = D3D12_FILTER_MIN_MAG_MIP_POINT;
sampler_descs[0].ShaderRegister = 0;
sampler_descs[1] = sampler_descs[0];
sampler_descs[1].ShaderRegister = 2;
sampler_descs[1].AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
create_root_signature(device, &rs_desc, &local_rs[0]);
sampler_descs[0].ShaderRegister = 1;
sampler_descs[0].AddressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
sampler_descs[0].AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
sampler_descs[0].AddressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
create_root_signature(device, &rs_desc, &local_rs[1]);
}
/* Create PSO. */
{
D3D12_HIT_GROUP_DESC hit_group[2];
struct rt_pso_factory factory;
unsigned local_index[2];
rt_pso_factory_init(&factory);
rt_pso_factory_add_dxil_library(&factory, get_static_sampler_rt_lib(), 0, NULL);
rt_pso_factory_add_state_object_config(&factory, D3D12_STATE_OBJECT_FLAG_NONE);
rt_pso_factory_add_pipeline_config(&factory, 1);
rt_pso_factory_add_shader_config(&factory, 8, 4);
rt_pso_factory_add_global_root_signature(&factory, global_rs);
local_index[0] = rt_pso_factory_add_local_root_signature(&factory, local_rs[0]);
local_index[1] = rt_pso_factory_add_local_root_signature(&factory, local_rs[1]);
memset(hit_group, 0, sizeof(hit_group));
hit_group[0].Type = D3D12_HIT_GROUP_TYPE_TRIANGLES;
hit_group[0].HitGroupExport = u"RayHit1";
hit_group[0].ClosestHitShaderImport = u"RayClosest1";
hit_group[1].Type = D3D12_HIT_GROUP_TYPE_TRIANGLES;
hit_group[1].HitGroupExport = u"RayHit2";
hit_group[1].ClosestHitShaderImport = u"RayClosest2";
rt_pso_factory_add_hit_group(&factory, &hit_group[0]);
rt_pso_factory_add_hit_group(&factory, &hit_group[1]);
rt_pso_factory_add_subobject_to_exports_association(&factory, local_index[0],
1, &hit_group[0].HitGroupExport);
rt_pso_factory_add_subobject_to_exports_association(&factory, local_index[1],
1, &hit_group[1].HitGroupExport);
rt_pso = rt_pso_factory_compile(&context, &factory, D3D12_STATE_OBJECT_TYPE_RAYTRACING_PIPELINE);
}
if (rt_pso)
{
uint8_t sbt_data[D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 6];
const void *hit1, *hit2, *gen, *miss;
ID3D12StateObjectProperties *props;
ID3D12StateObject_QueryInterface(rt_pso, &IID_ID3D12StateObjectProperties, (void**)&props);
hit1 = ID3D12StateObjectProperties_GetShaderIdentifier(props, u"RayHit1");
hit2 = ID3D12StateObjectProperties_GetShaderIdentifier(props, u"RayHit2");
gen = ID3D12StateObjectProperties_GetShaderIdentifier(props, u"RayGen");
miss = ID3D12StateObjectProperties_GetShaderIdentifier(props, u"RayMiss");
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 0, gen, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 1, miss, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
/* Hit SBTs for 2x2 quads. */
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 2, hit1, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 3, hit2, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 4, hit2, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
memcpy(sbt_data + D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT * 5, hit1, D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES);
ID3D12StateObjectProperties_Release(props);
sbt = create_upload_buffer(device, sizeof(sbt_data), sbt_data);
}
else
sbt = NULL;
srv = create_default_texture2d(device, 2, 2, 1, 1,
DXGI_FORMAT_R32_FLOAT, D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST);
uav = create_default_buffer(device, 4 * sizeof(float),
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
{
const float data[] = { 10.0f, 20.0f, 30.0f, 40.0f };
D3D12_SUBRESOURCE_DATA srv_data;
srv_data.pData = data;
srv_data.RowPitch = 2 * sizeof(float);
srv_data.SlicePitch = 4 * sizeof(float);
upload_texture_data(srv, &srv_data, 1, context.context.queue, command_list);
reset_command_list(command_list, context.context.allocator);
}
heap = create_gpu_descriptor_heap(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 3);
{
D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc;
D3D12_CPU_DESCRIPTOR_HANDLE h;
memset(&srv_desc, 0, sizeof(srv_desc));
srv_desc.ViewDimension = D3D12_SRV_DIMENSION_RAYTRACING_ACCELERATION_STRUCTURE;
srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
srv_desc.RaytracingAccelerationStructure.Location =
ID3D12Resource_GetGPUVirtualAddress(test_rtases.top_acceleration_structures[0]);
h = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
ID3D12Device_CreateShaderResourceView(device, NULL, &srv_desc, h);
}
{
D3D12_SHADER_RESOURCE_VIEW_DESC srv_desc;
D3D12_CPU_DESCRIPTOR_HANDLE h;
memset(&srv_desc, 0, sizeof(srv_desc));
srv_desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
srv_desc.Format = DXGI_FORMAT_R32_FLOAT;
srv_desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
srv_desc.Texture2D.MipLevels = 1;
h = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
h.ptr += ID3D12Device_GetDescriptorHandleIncrementSize(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
ID3D12Device_CreateShaderResourceView(device, srv, &srv_desc, h);
}
{
D3D12_UNORDERED_ACCESS_VIEW_DESC uav_desc;
D3D12_CPU_DESCRIPTOR_HANDLE h;
memset(&uav_desc, 0, sizeof(uav_desc));
uav_desc.ViewDimension = D3D12_UAV_DIMENSION_BUFFER;
uav_desc.Format = DXGI_FORMAT_UNKNOWN;
uav_desc.Buffer.NumElements = 4;
uav_desc.Buffer.StructureByteStride = 4;
h = ID3D12DescriptorHeap_GetCPUDescriptorHandleForHeapStart(heap);
h.ptr += 2 * ID3D12Device_GetDescriptorHandleIncrementSize(device, D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV);
ID3D12Device_CreateUnorderedAccessView(device, uav, NULL, &uav_desc, h);
}
ID3D12GraphicsCommandList4_SetComputeRootSignature(command_list4, global_rs);
ID3D12GraphicsCommandList4_SetPipelineState1(command_list4, rt_pso);
ID3D12GraphicsCommandList4_SetDescriptorHeaps(command_list4, 1, &heap);
ID3D12GraphicsCommandList4_SetComputeRootDescriptorTable(command_list4, 0,
ID3D12DescriptorHeap_GetGPUDescriptorHandleForHeapStart(heap));
if (rt_pso)
{
D3D12_DISPATCH_RAYS_DESC ray_desc;
memset(&ray_desc, 0, sizeof(ray_desc));
ray_desc.Width = 2;
ray_desc.Height = 2;
ray_desc.Depth = 1;
ray_desc.RayGenerationShaderRecord.StartAddress =
ID3D12Resource_GetGPUVirtualAddress(sbt) + 0 * D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.RayGenerationShaderRecord.SizeInBytes = D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.MissShaderTable.StartAddress =
ID3D12Resource_GetGPUVirtualAddress(sbt) + 1 * D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.MissShaderTable.SizeInBytes = D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.MissShaderTable.StrideInBytes = D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.HitGroupTable.StartAddress =
ID3D12Resource_GetGPUVirtualAddress(sbt) + 2 * D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.HitGroupTable.SizeInBytes = 4 * D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ray_desc.HitGroupTable.StrideInBytes = D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
ID3D12GraphicsCommandList4_DispatchRays(command_list4, &ray_desc);
}
transition_resource_state(command_list, uav, D3D12_RESOURCE_STATE_UNORDERED_ACCESS, D3D12_RESOURCE_STATE_COPY_SOURCE);
get_buffer_readback_with_command_list(uav, DXGI_FORMAT_R32_FLOAT, &rb, context.context.queue, command_list);
{
static const float expected[] = { 60.0f, 30.0f, 30.0f, 60.0f };
unsigned int i;
for (i = 0; i < 4; i++)
{
ok(expected[i] == get_readback_float(&rb, i, 0), "Sampled value #%u: %f != reference %f\n",
i, get_readback_float(&rb, i, 0), expected[i]);
}
}
release_resource_readback(&rb);
ID3D12Resource_Release(srv);
ID3D12Resource_Release(uav);
if (sbt)
ID3D12Resource_Release(sbt);
ID3D12DescriptorHeap_Release(heap);
destroy_test_geometry(&test_geom);
destroy_rt_geometry(&test_rtases);
ID3D12RootSignature_Release(local_rs[0]);
ID3D12RootSignature_Release(local_rs[1]);
ID3D12RootSignature_Release(global_rs);
if (rt_pso)
ID3D12StateObject_Release(rt_pso);
destroy_raytracing_test_context(&context);
}

View File

@ -281,3 +281,4 @@ decl_test(test_read_subresource_rt);
decl_test(test_integer_blending_pipeline_state);
decl_test(test_discard_resource_uav);
decl_test(test_unbound_rtv_rendering);
decl_test(test_raytracing_local_rs_static_sampler);