mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-27 09:44:15 +00:00
Add the SDL_GPU API
Project Lead: Evan Hemsley <evan@moonside.games> Co-designer, Metal Port, Console Ports: Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com> Production, QA, Debug: Co-authored-by: Ethan Lee <flibitijibibo@gmail.com> SDL_Render Driver, Bugfixes: Co-authored-by: Andrei Alexeyev <akari@taisei-project.org> Additional D3D12 Programming, Bugfixes: Co-authored-by: Bart van der Werf <bluelive@gmail.com> Bugfixes and Feedback: Co-authored-by: Zakary Strange <zakarystrange@gmail.com> Co-authored-by: meyraud705 <meyraud705@gmail.com> Co-authored-by: Joshua T. Fisher <playmer@gmail.com> Co-authored-by: Topi Ritala <ritalat@fastmail.com> Co-authored-by: David Gow <david@ingeniumdigital.com> Original API Proposal: Co-authored-by: Ryan C. Gordon <icculus@icculus.org>
This commit is contained in:
@@ -401,6 +401,7 @@ add_sdl_test_executable(testcontroller TESTUTILS SOURCES testcontroller.c gamepa
|
||||
add_sdl_test_executable(testgeometry TESTUTILS SOURCES testgeometry.c)
|
||||
add_sdl_test_executable(testgl SOURCES testgl.c)
|
||||
add_sdl_test_executable(testgles SOURCES testgles.c)
|
||||
add_sdl_test_executable(testgpu_spinning_cube SOURCES testgpu_spinning_cube.c)
|
||||
if(ANDROID)
|
||||
target_link_libraries(testgles PRIVATE GLESv1_CM)
|
||||
elseif(IOS OR TVOS)
|
||||
|
||||
103
test/testgpu/build-shaders.sh
Executable file
103
test/testgpu/build-shaders.sh
Executable file
@@ -0,0 +1,103 @@
|
||||
# Rebuilds the shaders needed for the GPU cube test.
|
||||
# For SPIR-V: requires glslangValidator and spirv-cross, which can be obtained from the LunarG Vulkan SDK.
|
||||
# For DXBC compilation: requires FXC, which is part of the Windows SDK.
|
||||
# For DXIL compilation, requires DXC, which can be obtained via the Windows SDK or via here: https://github.com/microsoft/DirectXShaderCompiler/releases
|
||||
# For Metal compilation: requires Xcode
|
||||
|
||||
# On Windows, run this via Git Bash.
|
||||
# To add the Windows SDK (FXC/DXC) to your path, run the command:
|
||||
# `export PATH=$PATH:/c/Program\ Files\ \(x86\)/Windows\ Kits/10/bin/x.x.x.x/x64/`
|
||||
|
||||
export MSYS_NO_PATHCONV=1
|
||||
|
||||
# SPIR-V
|
||||
glslangValidator cube.glsl -V -S vert -o cube.vert.spv --quiet -DVERTEX
|
||||
glslangValidator cube.glsl -V -S frag -o cube.frag.spv --quiet
|
||||
xxd -i cube.vert.spv | perl -w -p -e 's/\Aunsigned /const unsigned /;' > cube.vert.h
|
||||
xxd -i cube.frag.spv | perl -w -p -e 's/\Aunsigned /const unsigned /;' > cube.frag.h
|
||||
cat cube.vert.h cube.frag.h > testgpu_spirv.h
|
||||
rm -f cube.vert.h cube.frag.h cube.vert.spv cube.frag.spv
|
||||
|
||||
# Platform-specific compilation
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
|
||||
# FIXME: Needs to be updated!
|
||||
|
||||
# Xcode
|
||||
generate_shaders()
|
||||
{
|
||||
fileplatform=$1
|
||||
compileplatform=$2
|
||||
sdkplatform=$3
|
||||
minversion=$4
|
||||
|
||||
xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal1.1 -m$sdkplatform-version-min=$minversion -Wall -O3 -DVERTEX=1 -o ./cube.vert.air ./cube.metal || exit $?
|
||||
xcrun -sdk $sdkplatform metal -c -std=$compileplatform-metal1.1 -m$sdkplatform-version-min=$minversion -Wall -O3 -o ./cube.frag.air ./cube.metal || exit $?
|
||||
|
||||
xcrun -sdk $sdkplatform metallib -o cube.vert.metallib cube.vert.air || exit $?
|
||||
xcrun -sdk $sdkplatform metallib -o cube.frag.metallib cube.frag.air || exit $?
|
||||
|
||||
xxd -i cube.vert.metallib | perl -w -p -e 's/\Aunsigned /const unsigned /;' >./cube.vert_$fileplatform.h
|
||||
xxd -i cube.frag.metallib | perl -w -p -e 's/\Aunsigned /const unsigned /;' >./cube.frag_$fileplatform.h
|
||||
|
||||
rm -f cube.vert.air cube.vert.metallib
|
||||
rm -f cube.frag.air cube.frag.metallib
|
||||
}
|
||||
|
||||
generate_shaders macos macos macosx 10.11
|
||||
generate_shaders ios ios iphoneos 8.0
|
||||
generate_shaders iphonesimulator ios iphonesimulator 8.0
|
||||
generate_shaders tvos ios appletvos 9.0
|
||||
generate_shaders tvsimulator ios appletvsimulator 9.0
|
||||
|
||||
# Bundle together one mega-header
|
||||
rm -f testgpu_metallib.h
|
||||
echo "#if defined(SDL_PLATFORM_IOS)" >> testgpu_metallib.h
|
||||
echo "#if TARGET_OS_SIMULATOR" >> testgpu_metallib.h
|
||||
cat cube.vert_iphonesimulator.h >> testgpu_metallib.h
|
||||
cat cube.frag_iphonesimulator.h >> testgpu_metallib.h
|
||||
echo "#else" >> testgpu_metallib.h
|
||||
cat cube.vert_ios.h >> testgpu_metallib.h
|
||||
cat cube.frag_ios.h >> testgpu_metallib.h
|
||||
echo "#endif" >> testgpu_metallib.h
|
||||
echo "#elif defined(SDL_PLATFORM_TVOS)" >> testgpu_metallib.h
|
||||
echo "#if TARGET_OS_SIMULATOR" >> testgpu_metallib.h
|
||||
cat cube.vert_tvsimulator.h >> testgpu_metallib.h
|
||||
cat cube.frag_tvsimulator.h >> testgpu_metallib.h
|
||||
echo "#else" >> testgpu_metallib.h
|
||||
cat cube.vert_tvos.h >> testgpu_metallib.h
|
||||
cat cube.frag_tvos.h >> testgpu_metallib.h
|
||||
echo "#endif" >> testgpu_metallib.h
|
||||
echo "#else" >> testgpu_metallib.h
|
||||
cat cube.vert_macos.h >> testgpu_metallib.h
|
||||
cat cube.frag_macos.h >> testgpu_metallib.h
|
||||
echo "#endif" >> testgpu_metallib.h
|
||||
|
||||
# Clean up
|
||||
rm -f cube.vert_macos.h cube.frag_macos.h
|
||||
rm -f cube.vert_iphonesimulator.h cube.frag_iphonesimulator.h
|
||||
rm -f cube.vert_tvsimulator.h cube.frag_tvsimulator.h
|
||||
rm -f cube.vert_ios.h cube.frag_ios.h
|
||||
rm -f cube.vert_tvos.h cube.frag_tvos.h
|
||||
|
||||
elif [[ "$OSTYPE" == "cygwin"* ]] || [[ "$OSTYPE" == "msys"* ]]; then
|
||||
|
||||
# FXC
|
||||
fxc cube.hlsl /E VSMain /T vs_5_0 /Fh cube.vert.h
|
||||
fxc cube.hlsl /E PSMain /T ps_5_0 /Fh cube.frag.h
|
||||
|
||||
cat cube.vert.h | perl -w -p -e 's/BYTE/unsigned char/;s/g_VSMain/D3D11_CubeVert/;' > cube.vert.temp.h
|
||||
cat cube.frag.h | perl -w -p -e 's/BYTE/unsigned char/;s/g_PSMain/D3D11_CubeFrag/;' > cube.frag.temp.h
|
||||
cat cube.vert.temp.h cube.frag.temp.h > testgpu_dxbc.h
|
||||
rm -f cube.vert.h cube.frag.h cube.vert.temp.h cube.frag.temp.h
|
||||
|
||||
# DXC
|
||||
dxc cube.hlsl /E VSMain /T vs_6_0 /Fh cube.vert.h /D D3D12=1
|
||||
dxc cube.hlsl /E PSMain /T ps_6_0 /Fh cube.frag.h /D D3D12=1
|
||||
|
||||
cat cube.vert.h | perl -w -p -e 's/BYTE/unsigned char/;s/g_VSMain/D3D12_CubeVert/;' > cube.vert.temp.h
|
||||
cat cube.frag.h | perl -w -p -e 's/BYTE/unsigned char/;s/g_PSMain/D3D12_CubeFrag/;' > cube.frag.temp.h
|
||||
cat cube.vert.temp.h cube.frag.temp.h > testgpu_dxil.h
|
||||
rm -f cube.vert.h cube.frag.h cube.vert.temp.h cube.frag.temp.h
|
||||
|
||||
fi
|
||||
31
test/testgpu/cube.glsl
Normal file
31
test/testgpu/cube.glsl
Normal file
@@ -0,0 +1,31 @@
|
||||
#version 450
|
||||
|
||||
#ifdef VERTEX
|
||||
|
||||
layout (location = 0) in vec3 in_position;
|
||||
layout (location = 1) in vec3 in_color;
|
||||
|
||||
layout (location = 0) out vec4 out_color;
|
||||
|
||||
layout (set = 1, binding = 0) uniform UBO
|
||||
{
|
||||
mat4x4 modelViewProj;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
out_color = vec4(in_color, 1.0);
|
||||
gl_Position = modelViewProj * vec4(in_position, 1.0);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
layout (location = 0) in vec4 in_color;
|
||||
layout (location = 0) out vec4 out_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
out_color = in_color;
|
||||
}
|
||||
|
||||
#endif
|
||||
35
test/testgpu/cube.hlsl
Normal file
35
test/testgpu/cube.hlsl
Normal file
@@ -0,0 +1,35 @@
|
||||
#if D3D12
|
||||
#define REG(reg, space) register(reg, space)
|
||||
#else
|
||||
#define REG(reg, space) register(reg)
|
||||
#endif
|
||||
|
||||
cbuffer UBO : REG(b0, space1)
|
||||
{
|
||||
float4x4 ModelViewProj;
|
||||
};
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
float3 Position : TEXCOORD0;
|
||||
float3 Color : TEXCOORD1;
|
||||
};
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 Color : TEXCOORD0;
|
||||
float4 Position : SV_Position;
|
||||
};
|
||||
|
||||
VSOutput VSMain(VSInput input)
|
||||
{
|
||||
VSOutput output;
|
||||
output.Color = float4(input.Color, 1.0f);
|
||||
output.Position = mul(ModelViewProj, float4(input.Position, 1.0f));
|
||||
return output;
|
||||
}
|
||||
|
||||
float4 PSMain(VSOutput input) : SV_Target0
|
||||
{
|
||||
return input.Color;
|
||||
}
|
||||
38
test/testgpu/cube.metal
Normal file
38
test/testgpu/cube.metal
Normal file
@@ -0,0 +1,38 @@
|
||||
#include <metal_stdlib>
|
||||
using namespace metal;
|
||||
|
||||
struct VSOutput
|
||||
{
|
||||
float4 color [[user(locn0)]];
|
||||
float4 position [[position]];
|
||||
};
|
||||
|
||||
#ifdef VERTEX
|
||||
|
||||
struct UBO
|
||||
{
|
||||
float4x4 modelViewProj;
|
||||
};
|
||||
|
||||
struct VSInput
|
||||
{
|
||||
float3 position [[attribute(0)]];
|
||||
float3 color [[attribute(1)]];
|
||||
};
|
||||
|
||||
vertex VSOutput vs_main(VSInput input [[stage_in]], constant UBO& ubo [[buffer(0)]])
|
||||
{
|
||||
VSOutput output;
|
||||
output.color = float4(input.color, 1.0);
|
||||
output.position = ubo.modelViewProj * float4(input.position, 1.0);
|
||||
return output;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
fragment float4 fs_main(VSOutput input [[stage_in]])
|
||||
{
|
||||
return input.color;
|
||||
}
|
||||
|
||||
#endif
|
||||
333
test/testgpu/testgpu_dxbc.h
Normal file
333
test/testgpu/testgpu_dxbc.h
Normal file
@@ -0,0 +1,333 @@
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||
//
|
||||
//
|
||||
// Buffer Definitions:
|
||||
//
|
||||
// cbuffer UBO
|
||||
// {
|
||||
//
|
||||
// float4x4 ModelViewProj; // Offset: 0 Size: 64
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// Resource Bindings:
|
||||
//
|
||||
// Name Type Format Dim HLSL Bind Count
|
||||
// ------------------------------ ---------- ------- ----------- -------------- ------
|
||||
// UBO cbuffer NA NA cb0 1
|
||||
//
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// TEXCOORD 0 xyz 0 NONE float xyz
|
||||
// TEXCOORD 1 xyz 1 NONE float xyz
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// TEXCOORD 0 xyzw 0 NONE float xyzw
|
||||
// SV_Position 0 xyzw 1 POS float xyzw
|
||||
//
|
||||
vs_5_0
|
||||
dcl_globalFlags refactoringAllowed
|
||||
dcl_constantbuffer CB0[4], immediateIndexed
|
||||
dcl_input v0.xyz
|
||||
dcl_input v1.xyz
|
||||
dcl_output o0.xyzw
|
||||
dcl_output_siv o1.xyzw, position
|
||||
dcl_temps 1
|
||||
mov o0.xyz, v1.xyzx
|
||||
mov o0.w, l(1.000000)
|
||||
mul r0.xyzw, v0.yyyy, cb0[1].xyzw
|
||||
mad r0.xyzw, cb0[0].xyzw, v0.xxxx, r0.xyzw
|
||||
mad r0.xyzw, cb0[2].xyzw, v0.zzzz, r0.xyzw
|
||||
add o1.xyzw, r0.xyzw, cb0[3].xyzw
|
||||
ret
|
||||
// Approximately 7 instruction slots used
|
||||
#endif
|
||||
|
||||
const unsigned char D3D11_CubeVert[] =
|
||||
{
|
||||
68, 88, 66, 67, 114, 13,
|
||||
37, 16, 19, 3, 132, 73,
|
||||
243, 18, 23, 177, 140, 169,
|
||||
19, 240, 1, 0, 0, 0,
|
||||
156, 3, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
64, 1, 0, 0, 140, 1,
|
||||
0, 0, 228, 1, 0, 0,
|
||||
0, 3, 0, 0, 82, 68,
|
||||
69, 70, 4, 1, 0, 0,
|
||||
1, 0, 0, 0, 96, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
60, 0, 0, 0, 0, 5,
|
||||
254, 255, 0, 1, 0, 0,
|
||||
220, 0, 0, 0, 82, 68,
|
||||
49, 49, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 32, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
36, 0, 0, 0, 12, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
92, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 85, 66, 79, 0,
|
||||
92, 0, 0, 0, 1, 0,
|
||||
0, 0, 120, 0, 0, 0,
|
||||
64, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
160, 0, 0, 0, 0, 0,
|
||||
0, 0, 64, 0, 0, 0,
|
||||
2, 0, 0, 0, 184, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
255, 255, 255, 255, 0, 0,
|
||||
0, 0, 255, 255, 255, 255,
|
||||
0, 0, 0, 0, 77, 111,
|
||||
100, 101, 108, 86, 105, 101,
|
||||
119, 80, 114, 111, 106, 0,
|
||||
102, 108, 111, 97, 116, 52,
|
||||
120, 52, 0, 171, 3, 0,
|
||||
3, 0, 4, 0, 4, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
174, 0, 0, 0, 77, 105,
|
||||
99, 114, 111, 115, 111, 102,
|
||||
116, 32, 40, 82, 41, 32,
|
||||
72, 76, 83, 76, 32, 83,
|
||||
104, 97, 100, 101, 114, 32,
|
||||
67, 111, 109, 112, 105, 108,
|
||||
101, 114, 32, 49, 48, 46,
|
||||
49, 0, 73, 83, 71, 78,
|
||||
68, 0, 0, 0, 2, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
56, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 7, 7, 0, 0,
|
||||
56, 0, 0, 0, 1, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 1, 0,
|
||||
0, 0, 7, 7, 0, 0,
|
||||
84, 69, 88, 67, 79, 79,
|
||||
82, 68, 0, 171, 171, 171,
|
||||
79, 83, 71, 78, 80, 0,
|
||||
0, 0, 2, 0, 0, 0,
|
||||
8, 0, 0, 0, 56, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
15, 0, 0, 0, 65, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 3, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
15, 0, 0, 0, 84, 69,
|
||||
88, 67, 79, 79, 82, 68,
|
||||
0, 83, 86, 95, 80, 111,
|
||||
115, 105, 116, 105, 111, 110,
|
||||
0, 171, 171, 171, 83, 72,
|
||||
69, 88, 20, 1, 0, 0,
|
||||
80, 0, 1, 0, 69, 0,
|
||||
0, 0, 106, 8, 0, 1,
|
||||
89, 0, 0, 4, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
4, 0, 0, 0, 95, 0,
|
||||
0, 3, 114, 16, 16, 0,
|
||||
0, 0, 0, 0, 95, 0,
|
||||
0, 3, 114, 16, 16, 0,
|
||||
1, 0, 0, 0, 101, 0,
|
||||
0, 3, 242, 32, 16, 0,
|
||||
0, 0, 0, 0, 103, 0,
|
||||
0, 4, 242, 32, 16, 0,
|
||||
1, 0, 0, 0, 1, 0,
|
||||
0, 0, 104, 0, 0, 2,
|
||||
1, 0, 0, 0, 54, 0,
|
||||
0, 5, 114, 32, 16, 0,
|
||||
0, 0, 0, 0, 70, 18,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
54, 0, 0, 5, 130, 32,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
1, 64, 0, 0, 0, 0,
|
||||
128, 63, 56, 0, 0, 8,
|
||||
242, 0, 16, 0, 0, 0,
|
||||
0, 0, 86, 21, 16, 0,
|
||||
0, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 50, 0,
|
||||
0, 10, 242, 0, 16, 0,
|
||||
0, 0, 0, 0, 70, 142,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 6, 16,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
70, 14, 16, 0, 0, 0,
|
||||
0, 0, 50, 0, 0, 10,
|
||||
242, 0, 16, 0, 0, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 166, 26, 16, 0,
|
||||
0, 0, 0, 0, 70, 14,
|
||||
16, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 8, 242, 32,
|
||||
16, 0, 1, 0, 0, 0,
|
||||
70, 14, 16, 0, 0, 0,
|
||||
0, 0, 70, 142, 32, 0,
|
||||
0, 0, 0, 0, 3, 0,
|
||||
0, 0, 62, 0, 0, 1,
|
||||
83, 84, 65, 84, 148, 0,
|
||||
0, 0, 7, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 4, 0, 0, 0,
|
||||
4, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
1, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
2, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0
|
||||
};
|
||||
#if 0
|
||||
//
|
||||
// Generated by Microsoft (R) HLSL Shader Compiler 10.1
|
||||
//
|
||||
//
|
||||
//
|
||||
// Input signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// TEXCOORD 0 xyzw 0 NONE float xyzw
|
||||
// SV_Position 0 xyzw 1 POS float
|
||||
//
|
||||
//
|
||||
// Output signature:
|
||||
//
|
||||
// Name Index Mask Register SysValue Format Used
|
||||
// -------------------- ----- ------ -------- -------- ------- ------
|
||||
// SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
//
|
||||
ps_5_0
|
||||
dcl_globalFlags refactoringAllowed
|
||||
dcl_input_ps linear v0.xyzw
|
||||
dcl_output o0.xyzw
|
||||
mov o0.xyzw, v0.xyzw
|
||||
ret
|
||||
// Approximately 2 instruction slots used
|
||||
#endif
|
||||
|
||||
const unsigned char D3D11_CubeFrag[] =
|
||||
{
|
||||
68, 88, 66, 67, 100, 36,
|
||||
97, 53, 102, 218, 120, 105,
|
||||
57, 43, 222, 229, 58, 45,
|
||||
195, 237, 1, 0, 0, 0,
|
||||
12, 2, 0, 0, 5, 0,
|
||||
0, 0, 52, 0, 0, 0,
|
||||
160, 0, 0, 0, 248, 0,
|
||||
0, 0, 44, 1, 0, 0,
|
||||
112, 1, 0, 0, 82, 68,
|
||||
69, 70, 100, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
60, 0, 0, 0, 0, 5,
|
||||
255, 255, 0, 1, 0, 0,
|
||||
60, 0, 0, 0, 82, 68,
|
||||
49, 49, 60, 0, 0, 0,
|
||||
24, 0, 0, 0, 32, 0,
|
||||
0, 0, 40, 0, 0, 0,
|
||||
36, 0, 0, 0, 12, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
77, 105, 99, 114, 111, 115,
|
||||
111, 102, 116, 32, 40, 82,
|
||||
41, 32, 72, 76, 83, 76,
|
||||
32, 83, 104, 97, 100, 101,
|
||||
114, 32, 67, 111, 109, 112,
|
||||
105, 108, 101, 114, 32, 49,
|
||||
48, 46, 49, 0, 73, 83,
|
||||
71, 78, 80, 0, 0, 0,
|
||||
2, 0, 0, 0, 8, 0,
|
||||
0, 0, 56, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
0, 0, 0, 0, 15, 15,
|
||||
0, 0, 65, 0, 0, 0,
|
||||
0, 0, 0, 0, 1, 0,
|
||||
0, 0, 3, 0, 0, 0,
|
||||
1, 0, 0, 0, 15, 0,
|
||||
0, 0, 84, 69, 88, 67,
|
||||
79, 79, 82, 68, 0, 83,
|
||||
86, 95, 80, 111, 115, 105,
|
||||
116, 105, 111, 110, 0, 171,
|
||||
171, 171, 79, 83, 71, 78,
|
||||
44, 0, 0, 0, 1, 0,
|
||||
0, 0, 8, 0, 0, 0,
|
||||
32, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
3, 0, 0, 0, 0, 0,
|
||||
0, 0, 15, 0, 0, 0,
|
||||
83, 86, 95, 84, 97, 114,
|
||||
103, 101, 116, 0, 171, 171,
|
||||
83, 72, 69, 88, 60, 0,
|
||||
0, 0, 80, 0, 0, 0,
|
||||
15, 0, 0, 0, 106, 8,
|
||||
0, 1, 98, 16, 0, 3,
|
||||
242, 16, 16, 0, 0, 0,
|
||||
0, 0, 101, 0, 0, 3,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 54, 0, 0, 5,
|
||||
242, 32, 16, 0, 0, 0,
|
||||
0, 0, 70, 30, 16, 0,
|
||||
0, 0, 0, 0, 62, 0,
|
||||
0, 1, 83, 84, 65, 84,
|
||||
148, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 2, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0,
|
||||
0, 0
|
||||
};
|
||||
876
test/testgpu/testgpu_dxil.h
Normal file
876
test/testgpu/testgpu_dxil.h
Normal file
@@ -0,0 +1,876 @@
|
||||
#if 0
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; TEXCOORD 0 xyz 0 NONE float xyz
|
||||
; TEXCOORD 1 xyz 1 NONE float xyz
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; TEXCOORD 0 xyzw 0 NONE float xyzw
|
||||
; SV_Position 0 xyzw 1 POS float xyzw
|
||||
;
|
||||
; shader hash: c5bd114f25804a8a068a89dafb8ca2d1
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Vertex Shader
|
||||
; OutputPositionPresent=1
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; TEXCOORD 0
|
||||
; TEXCOORD 1
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; TEXCOORD 0 linear
|
||||
; SV_Position 0 noperspective
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
; cbuffer UBO
|
||||
; {
|
||||
;
|
||||
; struct hostlayout.UBO
|
||||
; {
|
||||
;
|
||||
; column_major float4x4 ModelViewProj; ; Offset: 0
|
||||
;
|
||||
; } UBO; ; Offset: 0 Size: 64
|
||||
;
|
||||
; }
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
; UBO cbuffer NA NA CB0 cb0,space1 1
|
||||
;
|
||||
;
|
||||
; ViewId state:
|
||||
;
|
||||
; Number of inputs: 7, outputs: 8
|
||||
; Outputs dependent on ViewId: { }
|
||||
; Inputs contributing to computation of Outputs:
|
||||
; output 0 depends on inputs: { 4 }
|
||||
; output 1 depends on inputs: { 5 }
|
||||
; output 2 depends on inputs: { 6 }
|
||||
; output 4 depends on inputs: { 0, 1, 2 }
|
||||
; output 5 depends on inputs: { 0, 1, 2 }
|
||||
; output 6 depends on inputs: { 0, 1, 2 }
|
||||
; output 7 depends on inputs: { 0, 1, 2 }
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
%dx.types.Handle = type { i8* }
|
||||
%dx.types.CBufRet.f32 = type { float, float, float, float }
|
||||
%hostlayout.UBO = type { [4 x <4 x float>] }
|
||||
|
||||
define void @VSMain() {
|
||||
%1 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false) ; CreateHandle(resourceClass,rangeId,index,nonUniformIndex)
|
||||
%2 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 1, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%5 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%6 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%7 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%8 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 0) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%9 = extractvalue %dx.types.CBufRet.f32 %8, 0
|
||||
%10 = extractvalue %dx.types.CBufRet.f32 %8, 1
|
||||
%11 = extractvalue %dx.types.CBufRet.f32 %8, 2
|
||||
%12 = extractvalue %dx.types.CBufRet.f32 %8, 3
|
||||
%13 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 1) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%14 = extractvalue %dx.types.CBufRet.f32 %13, 0
|
||||
%15 = extractvalue %dx.types.CBufRet.f32 %13, 1
|
||||
%16 = extractvalue %dx.types.CBufRet.f32 %13, 2
|
||||
%17 = extractvalue %dx.types.CBufRet.f32 %13, 3
|
||||
%18 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 2) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%19 = extractvalue %dx.types.CBufRet.f32 %18, 0
|
||||
%20 = extractvalue %dx.types.CBufRet.f32 %18, 1
|
||||
%21 = extractvalue %dx.types.CBufRet.f32 %18, 2
|
||||
%22 = extractvalue %dx.types.CBufRet.f32 %18, 3
|
||||
%23 = call %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32 59, %dx.types.Handle %1, i32 3) ; CBufferLoadLegacy(handle,regIndex)
|
||||
%24 = extractvalue %dx.types.CBufRet.f32 %23, 0
|
||||
%25 = extractvalue %dx.types.CBufRet.f32 %23, 1
|
||||
%26 = extractvalue %dx.types.CBufRet.f32 %23, 2
|
||||
%27 = extractvalue %dx.types.CBufRet.f32 %23, 3
|
||||
%28 = fmul fast float %9, %5
|
||||
%29 = call float @dx.op.tertiary.f32(i32 46, float %14, float %6, float %28) ; FMad(a,b,c)
|
||||
%30 = call float @dx.op.tertiary.f32(i32 46, float %19, float %7, float %29) ; FMad(a,b,c)
|
||||
%31 = fadd fast float %30, %24
|
||||
%32 = fmul fast float %10, %5
|
||||
%33 = call float @dx.op.tertiary.f32(i32 46, float %15, float %6, float %32) ; FMad(a,b,c)
|
||||
%34 = call float @dx.op.tertiary.f32(i32 46, float %20, float %7, float %33) ; FMad(a,b,c)
|
||||
%35 = fadd fast float %34, %25
|
||||
%36 = fmul fast float %11, %5
|
||||
%37 = call float @dx.op.tertiary.f32(i32 46, float %16, float %6, float %36) ; FMad(a,b,c)
|
||||
%38 = call float @dx.op.tertiary.f32(i32 46, float %21, float %7, float %37) ; FMad(a,b,c)
|
||||
%39 = fadd fast float %38, %26
|
||||
%40 = fmul fast float %12, %5
|
||||
%41 = call float @dx.op.tertiary.f32(i32 46, float %17, float %6, float %40) ; FMad(a,b,c)
|
||||
%42 = call float @dx.op.tertiary.f32(i32 46, float %22, float %7, float %41) ; FMad(a,b,c)
|
||||
%43 = fadd fast float %42, %27
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %2) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %3) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %4) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float 1.000000e+00) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 0, float %31) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 1, float %35) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 2, float %39) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 1, i32 0, i8 3, float %43) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.CBufRet.f32 @dx.op.cbufferLoadLegacy.f32(i32, %dx.types.Handle, i32) #2
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.tertiary.f32(i32, float, float, float) #0
|
||||
|
||||
; Function Attrs: nounwind readonly
|
||||
declare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #2
|
||||
|
||||
attributes #0 = { nounwind readnone }
|
||||
attributes #1 = { nounwind }
|
||||
attributes #2 = { nounwind readonly }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.valver = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.resources = !{!4}
|
||||
!dx.viewIdState = !{!7}
|
||||
!dx.entryPoints = !{!8}
|
||||
|
||||
!0 = !{!"dxc(private) 1.7.0.3896 (021f8f3e1)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 6}
|
||||
!3 = !{!"vs", i32 6, i32 0}
|
||||
!4 = !{null, null, !5, null}
|
||||
!5 = !{!6}
|
||||
!6 = !{i32 0, %hostlayout.UBO* undef, !"", i32 1, i32 0, i32 1, i32 64, null}
|
||||
!7 = !{[9 x i32] [i32 7, i32 8, i32 240, i32 240, i32 240, i32 0, i32 1, i32 2, i32 4]}
|
||||
!8 = !{void ()* @VSMain, !"VSMain", !9, !4, null}
|
||||
!9 = !{!10, !16, null}
|
||||
!10 = !{!11, !14}
|
||||
!11 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !12, i8 0, i32 1, i8 3, i32 0, i8 0, !13}
|
||||
!12 = !{i32 0}
|
||||
!13 = !{i32 3, i32 7}
|
||||
!14 = !{i32 1, !"TEXCOORD", i8 9, i8 0, !15, i8 0, i32 1, i8 3, i32 1, i8 0, !13}
|
||||
!15 = !{i32 1}
|
||||
!16 = !{!17, !19}
|
||||
!17 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !12, i8 2, i32 1, i8 4, i32 0, i8 0, !18}
|
||||
!18 = !{i32 3, i32 15}
|
||||
!19 = !{i32 1, !"SV_Position", i8 9, i8 3, !12, i8 4, i32 1, i8 4, i32 1, i8 0, !18}
|
||||
|
||||
#endif
|
||||
|
||||
const unsigned char D3D12_CubeVert[] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0xd9, 0x52, 0xf4, 0xa2, 0x04, 0x60, 0xc4, 0x95,
|
||||
0x5b, 0x00, 0x57, 0x3a, 0x22, 0x9c, 0xc9, 0x7e, 0x01, 0x00, 0x00, 0x00,
|
||||
0xa3, 0x0f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x4c, 0x00, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, 0x13, 0x01, 0x00, 0x00,
|
||||
0xff, 0x01, 0x00, 0x00, 0x27, 0x08, 0x00, 0x00, 0x43, 0x08, 0x00, 0x00,
|
||||
0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x5a, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x54, 0x45, 0x58,
|
||||
0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x31, 0x5d, 0x00,
|
||||
0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x53,
|
||||
0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x50,
|
||||
0x53, 0x56, 0x30, 0xe4, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01,
|
||||
0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00,
|
||||
0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x54, 0x45, 0x58,
|
||||
0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f,
|
||||
0x52, 0x44, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x43, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0a,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x43, 0x00, 0x03,
|
||||
0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0xf0,
|
||||
0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x54, 0x41, 0x54, 0x20,
|
||||
0x06, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x88, 0x01, 0x00, 0x00, 0x44,
|
||||
0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08,
|
||||
0x06, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x7f,
|
||||
0x01, 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, 0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4,
|
||||
0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48,
|
||||
0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4,
|
||||
0x48, 0x0e, 0x90, 0x91, 0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1,
|
||||
0x83, 0xe5, 0x8a, 0x04, 0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08,
|
||||
0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40,
|
||||
0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d,
|
||||
0x30, 0x86, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49,
|
||||
0x18, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
|
||||
0x4c, 0x08, 0x06, 0x00, 0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x23,
|
||||
0x00, 0x00, 0x00, 0x32, 0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93,
|
||||
0x22, 0xa4, 0x84, 0x04, 0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12,
|
||||
0x4c, 0x8a, 0x8c, 0x0b, 0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, 0x25,
|
||||
0x00, 0x14, 0x66, 0x00, 0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6,
|
||||
0x20, 0x84, 0x14, 0x42, 0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3,
|
||||
0x86, 0xcb, 0x9f, 0xb0, 0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98,
|
||||
0xfc, 0xe2, 0xb6, 0x11, 0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f,
|
||||
0xc2, 0x1e, 0x42, 0xf2, 0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10,
|
||||
0x8a, 0x30, 0x42, 0xad, 0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04,
|
||||
0xc5, 0x60, 0xa4, 0x10, 0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43,
|
||||
0x12, 0xd4, 0x73, 0x0e, 0x47, 0x9a, 0x16, 0x00, 0x73, 0xa8, 0xc9, 0x77,
|
||||
0x37, 0x14, 0x05, 0x96, 0x6e, 0x26, 0x10, 0x00, 0x00, 0x00, 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, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40,
|
||||
0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79,
|
||||
0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8,
|
||||
0x23, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
|
||||
0x16, 0x08, 0x00, 0x10, 0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19,
|
||||
0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25,
|
||||
0x30, 0x02, 0x50, 0x0c, 0x05, 0x18, 0x50, 0x04, 0x85, 0x50, 0x06, 0xe5,
|
||||
0x50, 0x12, 0xe5, 0x51, 0x10, 0x85, 0x46, 0xa5, 0x24, 0x46, 0x00, 0xca,
|
||||
0xa0, 0x08, 0x0a, 0x81, 0xee, 0x0c, 0x00, 0xe1, 0x19, 0x00, 0xca, 0x63,
|
||||
0x25, 0x07, 0x02, 0x1f, 0xf0, 0x01, 0x1f, 0x40, 0x20, 0x10, 0x00, 0x79,
|
||||
0x18, 0x00, 0x00, 0x82, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46,
|
||||
0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b, 0xb3,
|
||||
0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71, 0xb9, 0x71, 0x81, 0x71, 0x99,
|
||||
0xc1, 0xc9, 0xb1, 0x01, 0x41, 0x81, 0x91, 0x89, 0x31, 0xc3, 0x31, 0x9b,
|
||||
0x29, 0x8b, 0x49, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10,
|
||||
0xc7, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41, 0xc1, 0x6e, 0x6e, 0x82,
|
||||
0x40, 0x20, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08, 0x18, 0xc6, 0xa1, 0x4a,
|
||||
0xe8, 0x69, 0x82, 0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x06, 0x62, 0x60,
|
||||
0x80, 0x0d, 0x41, 0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x5c, 0x17,
|
||||
0x9b, 0xa6, 0x37, 0xb2, 0x32, 0x36, 0xab, 0xb4, 0xb2, 0x3b, 0x28, 0xb9,
|
||||
0x37, 0xb5, 0x09, 0x02, 0xa1, 0x4c, 0x10, 0x88, 0x65, 0xc3, 0x30, 0x4d,
|
||||
0xd2, 0x04, 0x81, 0x60, 0x26, 0x08, 0x44, 0x33, 0x41, 0x20, 0x9c, 0x0d,
|
||||
0x08, 0x12, 0x49, 0x54, 0x45, 0x58, 0xd7, 0x06, 0x81, 0xc1, 0x36, 0x0c,
|
||||
0x04, 0x94, 0x4d, 0x10, 0x04, 0x60, 0x03, 0xb0, 0x61, 0x20, 0x38, 0x6e,
|
||||
0x43, 0xd0, 0x6d, 0x18, 0x86, 0xcd, 0x9b, 0x20, 0x64, 0xd9, 0x86, 0x00,
|
||||
0x0c, 0x68, 0x58, 0x4d, 0x35, 0x85, 0xa5, 0xb9, 0x11, 0xa1, 0x2a, 0xc2,
|
||||
0x1a, 0x7a, 0x7a, 0x92, 0x22, 0x9a, 0x20, 0x14, 0xd2, 0x04, 0xa1, 0x98,
|
||||
0x36, 0x04, 0xc4, 0x04, 0xa1, 0xa0, 0x36, 0x08, 0x95, 0xb5, 0x61, 0x21,
|
||||
0xc6, 0x80, 0x0c, 0xca, 0xc0, 0x0c, 0xca, 0x60, 0x38, 0x03, 0xa2, 0x0c,
|
||||
0xd0, 0x60, 0x43, 0x30, 0x6c, 0x58, 0x86, 0x31, 0x20, 0x83, 0x32, 0x50,
|
||||
0x83, 0x32, 0x18, 0xce, 0x60, 0x28, 0x03, 0x34, 0xd8, 0x20, 0xa4, 0xc1,
|
||||
0x1a, 0x4c, 0x10, 0x8a, 0x6a, 0x82, 0x50, 0x58, 0x13, 0x04, 0xe2, 0xd9,
|
||||
0x20, 0x54, 0x6f, 0xb0, 0x61, 0x21, 0xc6, 0x80, 0x0c, 0xca, 0xc0, 0x0c,
|
||||
0xda, 0x60, 0x70, 0x03, 0xa2, 0x0c, 0xe0, 0x80, 0xcb, 0x94, 0xd5, 0x17,
|
||||
0xd4, 0xdb, 0x5c, 0x1a, 0x5d, 0xda, 0x9b, 0xdb, 0x86, 0x65, 0x90, 0x03,
|
||||
0x32, 0x38, 0x03, 0x33, 0x70, 0x83, 0xc1, 0x0d, 0x86, 0x32, 0x80, 0x83,
|
||||
0x0d, 0x42, 0x1c, 0xcc, 0xc1, 0x86, 0x81, 0x0d, 0xe8, 0x00, 0xd8, 0x50,
|
||||
0x6c, 0x62, 0x50, 0x07, 0x0f, 0x40, 0xc3, 0x8c, 0xed, 0x2d, 0x8c, 0x6e,
|
||||
0x6e, 0x82, 0x40, 0x40, 0x2c, 0xd2, 0xdc, 0xe6, 0xe8, 0xe6, 0x26, 0x08,
|
||||
0x44, 0x44, 0x63, 0x2e, 0xed, 0xec, 0x8b, 0x8d, 0x8c, 0xc6, 0x5c, 0xda,
|
||||
0xd9, 0xd7, 0x1c, 0xdd, 0x06, 0xe4, 0x0e, 0xf0, 0x20, 0x0f, 0xf4, 0x60,
|
||||
0x0f, 0x10, 0x3e, 0xc0, 0x83, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e, 0x69,
|
||||
0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b, 0x5d,
|
||||
0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86, 0xe7,
|
||||
0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x28, 0xea, 0x90, 0xe1,
|
||||
0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95, 0xb1,
|
||||
0x4d, 0x09, 0x90, 0x32, 0x64, 0x78, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
|
||||
0x72, 0x63, 0x65, 0x73, 0x53, 0x02, 0xa7, 0x12, 0x19, 0x9e, 0x0b, 0x5d,
|
||||
0x1e, 0x5c, 0x59, 0x90, 0x9b, 0xdb, 0x1b, 0x5d, 0x18, 0x5d, 0xda, 0x9b,
|
||||
0xdb, 0xdc, 0x14, 0x21, 0xf3, 0xea, 0x90, 0xe1, 0xb9, 0xd8, 0xa5, 0x95,
|
||||
0xdd, 0x25, 0x91, 0x4d, 0xd1, 0x85, 0xd1, 0x95, 0x4d, 0x09, 0xc0, 0xa0,
|
||||
0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a,
|
||||
0x1b, 0xdd, 0xdc, 0x94, 0xa0, 0x0e, 0xba, 0x90, 0xe1, 0xb9, 0x8c, 0xbd,
|
||||
0xd5, 0xb9, 0xd1, 0x95, 0xc9, 0xcd, 0x4d, 0x09, 0xf8, 0x00, 0x00, 0x79,
|
||||
0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4,
|
||||
0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c,
|
||||
0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00,
|
||||
0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2,
|
||||
0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38,
|
||||
0x84, 0x83, 0x1b, 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, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b,
|
||||
0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03,
|
||||
0x72, 0x10, 0x87, 0x73, 0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87,
|
||||
0x70, 0xc8, 0x87, 0x77, 0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80,
|
||||
0x0f, 0x6e, 0x40, 0x0f, 0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71,
|
||||
0x20, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x06, 0x60, 0xbc, 0xac, 0x09,
|
||||
0x20, 0x8d, 0x0d, 0x6c, 0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x04, 0x54, 0x51,
|
||||
0x10, 0x51, 0xe9, 0x00, 0x43, 0x49, 0x18, 0x80, 0x80, 0xf9, 0xc5, 0x6d,
|
||||
0x5b, 0x81, 0x34, 0x5c, 0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11,
|
||||
0x02, 0xcd, 0xb0, 0x10, 0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2,
|
||||
0x00, 0x83, 0xd8, 0x3c, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70,
|
||||
0xf9, 0xce, 0xe3, 0x4b, 0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4,
|
||||
0x17, 0xb7, 0x6d, 0x04, 0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x4f, 0x44, 0x34,
|
||||
0x21, 0x40, 0x84, 0xf9, 0xc5, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x48,
|
||||
0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc5,
|
||||
0xbd, 0x11, 0x4f, 0x25, 0x80, 0x4a, 0x8a, 0x06, 0x8a, 0x89, 0xda, 0xfb,
|
||||
0x8c, 0xa2, 0xd1, 0x44, 0x58, 0x49, 0x4c, 0x58, 0x07, 0x00, 0x00, 0x60,
|
||||
0x00, 0x01, 0x00, 0xd6, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00,
|
||||
0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x40, 0x07, 0x00, 0x00, 0x42,
|
||||
0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0xcd, 0x01, 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,
|
||||
0x14, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0xa4, 0x10, 0x32, 0x14, 0x38,
|
||||
0x08, 0x18, 0x4b, 0x0a, 0x32, 0x52, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43,
|
||||
0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x91,
|
||||
0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04,
|
||||
0x29, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1b,
|
||||
0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84,
|
||||
0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x6d, 0x30, 0x86, 0xff, 0xff,
|
||||
0xff, 0xff, 0x1f, 0x00, 0x09, 0xa8, 0x00, 0x49, 0x18, 0x00, 0x00, 0x03,
|
||||
0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x4c, 0x08, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x32,
|
||||
0x22, 0x48, 0x09, 0x20, 0x64, 0x85, 0x04, 0x93, 0x22, 0xa4, 0x84, 0x04,
|
||||
0x93, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x8a, 0x8c, 0x0b,
|
||||
0x84, 0xa4, 0x4c, 0x10, 0x68, 0x23, 0x00, 0x25, 0x00, 0x14, 0x66, 0x00,
|
||||
0xe6, 0x08, 0xc0, 0x60, 0x8e, 0x00, 0x29, 0xc6, 0x20, 0x84, 0x14, 0x42,
|
||||
0xa6, 0x18, 0x80, 0x10, 0x52, 0x06, 0xa1, 0xa3, 0x86, 0xcb, 0x9f, 0xb0,
|
||||
0x87, 0x90, 0x7c, 0x6e, 0xa3, 0x8a, 0x95, 0x98, 0xfc, 0xe2, 0xb6, 0x11,
|
||||
0x31, 0xc6, 0x18, 0x54, 0xee, 0x19, 0x2e, 0x7f, 0xc2, 0x1e, 0x42, 0xf2,
|
||||
0x43, 0xa0, 0x19, 0x16, 0x02, 0x05, 0xab, 0x10, 0x8a, 0x30, 0x42, 0xad,
|
||||
0x14, 0x83, 0x8c, 0x31, 0xe8, 0xcd, 0x11, 0x04, 0xc5, 0x60, 0xa4, 0x10,
|
||||
0x12, 0x49, 0x0e, 0x04, 0x0c, 0x23, 0x10, 0x43, 0x12, 0xd4, 0x73, 0x0e,
|
||||
0x47, 0x9a, 0x16, 0x00, 0x73, 0xa8, 0xc9, 0x77, 0x37, 0x14, 0x05, 0x96,
|
||||
0x6e, 0x26, 0x10, 0x00, 0x00, 0x00, 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, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0xf2, 0x34, 0x40, 0x00, 0x0c, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0xe4, 0x79, 0x80, 0x00, 0x08, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc8, 0x23, 0x01, 0x01, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x16, 0x08, 0x00, 0x0e,
|
||||
0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c,
|
||||
0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0x22, 0x25, 0x30, 0x02, 0x50, 0x0c,
|
||||
0x05, 0x18, 0x50, 0x06, 0xe5, 0x50, 0x1e, 0x54, 0x4a, 0x62, 0x04, 0xa0,
|
||||
0x0c, 0x8a, 0xa0, 0x10, 0x08, 0xcf, 0x00, 0x50, 0x1e, 0x2b, 0x39, 0x10,
|
||||
0xf8, 0x80, 0x0f, 0xf8, 0x00, 0x02, 0x81, 0x00, 0x00, 0x00, 0x00, 0x79,
|
||||
0x18, 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x1a, 0x03, 0x4c, 0x90, 0x46,
|
||||
0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43, 0x81, 0x93, 0x4b, 0xb3,
|
||||
0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71, 0xb9, 0x71, 0x81, 0x71, 0x99,
|
||||
0xc1, 0xc9, 0xb1, 0x01, 0x41, 0x81, 0x91, 0x89, 0x31, 0xc3, 0x31, 0x9b,
|
||||
0x29, 0x8b, 0x49, 0xd9, 0x10, 0x04, 0x13, 0x04, 0xc2, 0x98, 0x20, 0x10,
|
||||
0xc7, 0x06, 0x61, 0x20, 0x26, 0x08, 0x04, 0xb2, 0x41, 0x18, 0x0c, 0x0a,
|
||||
0x76, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08, 0x98, 0x44, 0x60, 0x82,
|
||||
0x40, 0x24, 0x1b, 0x10, 0x42, 0x59, 0x06, 0x62, 0x60, 0x80, 0x0d, 0x41,
|
||||
0xb3, 0x81, 0x00, 0x00, 0x07, 0x98, 0x20, 0x64, 0xd3, 0x86, 0x00, 0x9a,
|
||||
0x20, 0x08, 0x00, 0x0d, 0xab, 0xa9, 0xa6, 0xb0, 0x34, 0x37, 0x22, 0x54,
|
||||
0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x13, 0x84, 0xa2, 0x99, 0x20,
|
||||
0x14, 0xce, 0x86, 0x80, 0x98, 0x20, 0x14, 0xcf, 0x04, 0x81, 0x50, 0x26,
|
||||
0x08, 0xc4, 0xb2, 0x41, 0xc8, 0xb4, 0x0d, 0x0b, 0x41, 0x55, 0xd6, 0x65,
|
||||
0x0d, 0x18, 0x61, 0x6d, 0x1b, 0x82, 0x61, 0xc3, 0x32, 0x50, 0x95, 0xd5,
|
||||
0x59, 0x03, 0x36, 0x58, 0xdb, 0x06, 0x81, 0xf3, 0x26, 0x08, 0x05, 0x34,
|
||||
0x41, 0x28, 0xa2, 0x09, 0x02, 0xc1, 0x6c, 0x10, 0x32, 0x31, 0xd8, 0xb0,
|
||||
0x10, 0x54, 0x65, 0x5d, 0x60, 0x30, 0x84, 0x01, 0x61, 0x8d, 0x01, 0x97,
|
||||
0x29, 0xab, 0x2f, 0xa8, 0xb7, 0xb9, 0x34, 0xba, 0xb4, 0x37, 0xb7, 0x0d,
|
||||
0xcb, 0x50, 0x06, 0x15, 0x76, 0x85, 0xc1, 0x10, 0x06, 0x83, 0x35, 0x06,
|
||||
0x1b, 0x04, 0x32, 0x30, 0x83, 0x0d, 0xc3, 0x77, 0x06, 0xc0, 0x86, 0x42,
|
||||
0x9a, 0xd0, 0xe0, 0x01, 0xaa, 0xb0, 0xb1, 0xd9, 0xb5, 0xb9, 0xa4, 0x91,
|
||||
0x95, 0xb9, 0xd1, 0x4d, 0x09, 0x82, 0x2a, 0x64, 0x78, 0x2e, 0x76, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x02, 0xa2, 0x09, 0x19, 0x9e, 0x8b,
|
||||
0x5d, 0x18, 0x9b, 0x5d, 0x99, 0xdc, 0x94, 0xc0, 0xa8, 0x43, 0x86, 0xe7,
|
||||
0x32, 0x87, 0x16, 0x46, 0x56, 0x26, 0xd7, 0xf4, 0x46, 0x56, 0xc6, 0x36,
|
||||
0x25, 0x40, 0xca, 0x90, 0xe1, 0xb9, 0xc8, 0x95, 0xcd, 0xbd, 0xd5, 0xc9,
|
||||
0x8d, 0x95, 0xcd, 0x4d, 0x09, 0x9c, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69,
|
||||
0x65, 0x77, 0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x02, 0xa8,
|
||||
0x0e, 0x19, 0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a,
|
||||
0x1b, 0xdd, 0xdc, 0x94, 0x00, 0x0d, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c,
|
||||
0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14,
|
||||
0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79,
|
||||
0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e,
|
||||
0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1,
|
||||
0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 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, 0x03, 0x3b, 0x94,
|
||||
0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0,
|
||||
0xc3, 0x8c, 0xc8, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x72, 0x10, 0x87, 0x73,
|
||||
0x70, 0x03, 0x7b, 0x08, 0x07, 0x79, 0x60, 0x87, 0x70, 0xc8, 0x87, 0x77,
|
||||
0xa8, 0x07, 0x7a, 0x98, 0x81, 0x3c, 0xe4, 0x80, 0x0f, 0x6e, 0x40, 0x0f,
|
||||
0xe5, 0xd0, 0x0e, 0xf0, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x18,
|
||||
0x00, 0x00, 0x00, 0x06, 0x60, 0xbc, 0xac, 0x09, 0x20, 0x8d, 0x0d, 0x6c,
|
||||
0xc3, 0xe5, 0x3b, 0x8f, 0x2f, 0x04, 0x54, 0x51, 0x10, 0x51, 0xe9, 0x00,
|
||||
0x43, 0x49, 0x18, 0x80, 0x80, 0xf9, 0xc5, 0x6d, 0x5b, 0x81, 0x34, 0x5c,
|
||||
0xbe, 0xf3, 0xf8, 0x42, 0x44, 0x00, 0x13, 0x11, 0x02, 0xcd, 0xb0, 0x10,
|
||||
0x16, 0x30, 0x0d, 0x97, 0xef, 0x3c, 0xfe, 0xe2, 0x00, 0x83, 0xd8, 0x3c,
|
||||
0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x02, 0xd5, 0x70, 0xf9, 0xce, 0xe3, 0x4b,
|
||||
0x93, 0x13, 0x11, 0x28, 0x35, 0x3d, 0xd4, 0xe4, 0x17, 0xb7, 0x6d, 0x04,
|
||||
0xd2, 0x70, 0xf9, 0xce, 0xe3, 0x4f, 0x44, 0x34, 0x21, 0x40, 0x84, 0xf9,
|
||||
0xc5, 0x6d, 0x03, 0x61, 0x20, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x13,
|
||||
0x04, 0x41, 0x2c, 0x10, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x14,
|
||||
0x47, 0x00, 0x88, 0x14, 0x57, 0x29, 0x14, 0xc2, 0x0c, 0x40, 0xd9, 0x95,
|
||||
0x5c, 0x11, 0x50, 0x29, 0x01, 0x1a, 0x63, 0x04, 0x20, 0x08, 0x82, 0xf8,
|
||||
0x07, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x20, 0x65, 0x84,
|
||||
0x73, 0x5d, 0xca, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x1e, 0x92,
|
||||
0x61, 0xd1, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc6, 0x97, 0x68,
|
||||
0x19, 0x81, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x01, 0x06, 0xca,
|
||||
0xa6, 0x45, 0xc9, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x61, 0xb0,
|
||||
0x6c, 0x1b, 0xa5, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x81, 0x21, 0x06,
|
||||
0x0c, 0xc7, 0x1d, 0xcb, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x18, 0x63,
|
||||
0xd0, 0x74, 0x1d, 0xc5, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41, 0x23,
|
||||
0x06, 0xcc, 0xe1, 0x8d, 0x26, 0x04, 0xc0, 0x68, 0x82, 0x10, 0x8c, 0x26,
|
||||
0x0c, 0xc2, 0x68, 0x02, 0x31, 0x8c, 0x18, 0x1c, 0x00, 0x08, 0x82, 0x41,
|
||||
0x73, 0x06, 0x11, 0x43, 0x06, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20, 0x04,
|
||||
0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00, 0x82,
|
||||
0x60, 0xd0, 0xb0, 0x81, 0x15, 0x51, 0xa3, 0x09, 0x01, 0x30, 0x9a, 0x20,
|
||||
0x04, 0xa3, 0x09, 0x83, 0x30, 0x9a, 0x40, 0x0c, 0x23, 0x06, 0x07, 0x00,
|
||||
0x82, 0x60, 0xd0, 0xc4, 0xc1, 0x66, 0xa9, 0xc1, 0x68, 0x42, 0x00, 0x8c,
|
||||
0x26, 0x08, 0xc1, 0x68, 0xc2, 0x20, 0x8c, 0x26, 0x10, 0x83, 0x4d, 0x97,
|
||||
0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0xb1, 0x83, 0x32, 0x78,
|
||||
0xae, 0x60, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x9e, 0x3b, 0x30, 0x83,
|
||||
0xe5, 0x0a, 0x2c, 0x38, 0xa0, 0x63, 0xd6, 0x26, 0x9f, 0x11, 0x03, 0x04,
|
||||
0x00, 0x41, 0x30, 0x78, 0xf4, 0x20, 0x0d, 0xa4, 0x2d, 0x18, 0x31, 0x40,
|
||||
0x00, 0x10, 0x04, 0x83, 0x67, 0x0f, 0xd4, 0xc0, 0xd9, 0x02, 0x0b, 0x14,
|
||||
0xe8, 0x58, 0xf6, 0xc9, 0x67, 0xc4, 0x00, 0x01, 0x40, 0x10, 0x0c, 0x1e,
|
||||
0x3f, 0x68, 0x83, 0xea, 0x0b, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0,
|
||||
0xf9, 0x03, 0x37, 0x88, 0xbe, 0xc0, 0x82, 0x06, 0x3a, 0xc6, 0x8d, 0x81,
|
||||
0x7c, 0x46, 0x0c, 0x10, 0x00, 0x04, 0xc1, 0xe0, 0x11, 0x85, 0x38, 0xc0,
|
||||
0xc6, 0x20, 0x18, 0x31, 0x40, 0x00, 0x10, 0x04, 0x83, 0x67, 0x14, 0xe4,
|
||||
0x80, 0x1a, 0x83, 0xc0, 0x02, 0x08, 0x3a, 0x23, 0x06, 0x09, 0x00, 0x82,
|
||||
0x60, 0x80, 0x9c, 0xc2, 0x1c, 0x88, 0x82, 0x28, 0xec, 0x81, 0x1a, 0x8c,
|
||||
0x18, 0x24, 0x00, 0x08, 0x82, 0x01, 0x72, 0x0a, 0x73, 0x20, 0x0a, 0xa2,
|
||||
0xd0, 0x06, 0x69, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc8, 0x29,
|
||||
0xcc, 0x81, 0x28, 0x88, 0x42, 0x1e, 0xa0, 0xc1, 0x88, 0x41, 0x02, 0x80,
|
||||
0x20, 0x18, 0x20, 0xa7, 0x30, 0x07, 0xa2, 0x20, 0x0a, 0x7a, 0xc0, 0x06,
|
||||
0x23, 0x06, 0x09, 0x00, 0x82, 0x60, 0x80, 0x9c, 0xc2, 0x1c, 0x8c, 0x82,
|
||||
0x28, 0xec, 0x41, 0x33, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0xc8, 0x29,
|
||||
0xcc, 0xc1, 0x28, 0x88, 0x42, 0x1b, 0x24, 0x23, 0x06, 0x09, 0x00, 0x82,
|
||||
0x60, 0x80, 0x9c, 0xc2, 0x1c, 0x8c, 0x82, 0x28, 0xe4, 0x41, 0x31, 0x62,
|
||||
0x90, 0x00, 0x20, 0x08, 0x06, 0xc8, 0x29, 0xcc, 0xc1, 0x28, 0x88, 0x82,
|
||||
0x1e, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
#if 0
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; TEXCOORD 0 xyzw 0 NONE float xyzw
|
||||
; SV_Position 0 xyzw 1 POS float
|
||||
;
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index Mask Register SysValue Format Used
|
||||
; -------------------- ----- ------ -------- -------- ------- ------
|
||||
; SV_Target 0 xyzw 0 TARGET float xyzw
|
||||
;
|
||||
; shader hash: a10908b314d7c2de5d684fdf3768659c
|
||||
;
|
||||
; Pipeline Runtime Information:
|
||||
;
|
||||
; Pixel Shader
|
||||
; DepthOutput=0
|
||||
; SampleFrequency=0
|
||||
;
|
||||
;
|
||||
; Input signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; TEXCOORD 0 linear
|
||||
; SV_Position 0 noperspective
|
||||
;
|
||||
; Output signature:
|
||||
;
|
||||
; Name Index InterpMode DynIdx
|
||||
; -------------------- ----- ---------------------- ------
|
||||
; SV_Target 0
|
||||
;
|
||||
; Buffer Definitions:
|
||||
;
|
||||
;
|
||||
; Resource Bindings:
|
||||
;
|
||||
; Name Type Format Dim ID HLSL Bind Count
|
||||
; ------------------------------ ---------- ------- ----------- ------- -------------- ------
|
||||
;
|
||||
;
|
||||
; ViewId state:
|
||||
;
|
||||
; Number of inputs: 8, outputs: 4
|
||||
; Outputs dependent on ViewId: { }
|
||||
; Inputs contributing to computation of Outputs:
|
||||
; output 0 depends on inputs: { 0 }
|
||||
; output 1 depends on inputs: { 1 }
|
||||
; output 2 depends on inputs: { 2 }
|
||||
; output 3 depends on inputs: { 3 }
|
||||
;
|
||||
target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64"
|
||||
target triple = "dxil-ms-dx"
|
||||
|
||||
define void @PSMain() {
|
||||
%1 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 0, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%2 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 1, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%3 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 2, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
%4 = call float @dx.op.loadInput.f32(i32 4, i32 0, i32 0, i8 3, i32 undef) ; LoadInput(inputSigId,rowIndex,colIndex,gsVertexAxis)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %1) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 1, float %2) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 2, float %3) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 3, float %4) ; StoreOutput(outputSigId,rowIndex,colIndex,value)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: nounwind readnone
|
||||
declare float @dx.op.loadInput.f32(i32, i32, i32, i8, i32) #0
|
||||
|
||||
; Function Attrs: nounwind
|
||||
declare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #1
|
||||
|
||||
attributes #0 = { nounwind readnone }
|
||||
attributes #1 = { nounwind }
|
||||
|
||||
!llvm.ident = !{!0}
|
||||
!dx.version = !{!1}
|
||||
!dx.valver = !{!2}
|
||||
!dx.shaderModel = !{!3}
|
||||
!dx.viewIdState = !{!4}
|
||||
!dx.entryPoints = !{!5}
|
||||
|
||||
!0 = !{!"dxc(private) 1.7.0.3896 (021f8f3e1)"}
|
||||
!1 = !{i32 1, i32 0}
|
||||
!2 = !{i32 1, i32 6}
|
||||
!3 = !{!"ps", i32 6, i32 0}
|
||||
!4 = !{[10 x i32] [i32 8, i32 4, i32 1, i32 2, i32 4, i32 8, i32 0, i32 0, i32 0, i32 0]}
|
||||
!5 = !{void ()* @PSMain, !"PSMain", !6, null, null}
|
||||
!6 = !{!7, !12, null}
|
||||
!7 = !{!8, !11}
|
||||
!8 = !{i32 0, !"TEXCOORD", i8 9, i8 0, !9, i8 2, i32 1, i8 4, i32 0, i8 0, !10}
|
||||
!9 = !{i32 0}
|
||||
!10 = !{i32 3, i32 15}
|
||||
!11 = !{i32 1, !"SV_Position", i8 9, i8 3, !9, i8 4, i32 1, i8 4, i32 1, i8 0, null}
|
||||
!12 = !{!13}
|
||||
!13 = !{i32 0, !"SV_Target", i8 9, i8 16, !9, i8 0, i32 1, i8 4, i32 0, i8 0, !10}
|
||||
|
||||
#endif
|
||||
|
||||
const unsigned char D3D12_CubeFrag[] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0x55, 0xdd, 0xea, 0x5b, 0x70, 0xf7, 0xd6, 0x72,
|
||||
0x11, 0x2b, 0x82, 0xd4, 0x62, 0x33, 0xa4, 0xa4, 0x01, 0x00, 0x00, 0x00,
|
||||
0x93, 0x0b, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x4c, 0x00, 0x00, 0x00, 0xb1, 0x00, 0x00, 0x00, 0xeb, 0x00, 0x00, 0x00,
|
||||
0x97, 0x01, 0x00, 0x00, 0x77, 0x06, 0x00, 0x00, 0x93, 0x06, 0x00, 0x00,
|
||||
0x53, 0x46, 0x49, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x31, 0x5d, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x48, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x53, 0x56, 0x5f,
|
||||
0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x4f, 0x53, 0x47,
|
||||
0x31, 0x32, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f,
|
||||
0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x50, 0x53, 0x56, 0x30, 0xa4,
|
||||
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x02,
|
||||
0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
|
||||
0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x00, 0x44, 0x00, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x44, 0x03, 0x03, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x10, 0x03,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04,
|
||||
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53,
|
||||
0x54, 0x41, 0x54, 0xd8, 0x04, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x36,
|
||||
0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x10,
|
||||
0x00, 0x00, 0x00, 0xc0, 0x04, 0x00, 0x00, 0x42, 0x43, 0xc0, 0xde, 0x21,
|
||||
0x0c, 0x00, 0x00, 0x2d, 0x01, 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, 0x10, 0x45, 0x02, 0x42,
|
||||
0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38, 0x08, 0x18, 0x4b, 0x0a,
|
||||
0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43, 0x46, 0x88, 0xa5, 0x00,
|
||||
0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11, 0x22, 0xc4, 0x50, 0x41,
|
||||
0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04, 0x21, 0x46, 0x06, 0x51,
|
||||
0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b, 0x8c, 0xe0, 0xff, 0xff,
|
||||
0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84, 0xf0, 0xff, 0xff, 0xff,
|
||||
0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49, 0x18, 0x00, 0x00, 0x02,
|
||||
0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20, 0x00, 0x00, 0x00, 0x89,
|
||||
0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32, 0x22, 0x08, 0x09, 0x20,
|
||||
0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04, 0x13, 0x22, 0xe3, 0x84,
|
||||
0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b, 0x84, 0x84, 0x4c, 0x10,
|
||||
0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80, 0x39, 0x02, 0x30, 0x98,
|
||||
0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56, 0x0c, 0x20, 0xa2, 0x1a,
|
||||
0xc2, 0x81, 0x80, 0x54, 0x20, 0x00, 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, 0x43, 0x9e, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x32,
|
||||
0x1e, 0x98, 0x14, 0x19, 0x11, 0x4c, 0x90, 0x8c, 0x09, 0x26, 0x47, 0xc6,
|
||||
0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x86, 0x32, 0x28, 0x8f, 0x92,
|
||||
0x28, 0x04, 0xaa, 0x92, 0x18, 0x01, 0x28, 0x82, 0x42, 0x28, 0x83, 0x02,
|
||||
0xa1, 0x1d, 0x4b, 0x41, 0x88, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x1a,
|
||||
0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43,
|
||||
0x81, 0x93, 0x4b, 0xb3, 0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71, 0xb9,
|
||||
0x71, 0x81, 0x71, 0x99, 0xc1, 0xc9, 0xb1, 0x01, 0x41, 0x81, 0x91, 0x89,
|
||||
0x31, 0xc3, 0x31, 0x9b, 0x29, 0x8b, 0x49, 0xd9, 0x10, 0x04, 0x13, 0x04,
|
||||
0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61, 0x20, 0x36, 0x08, 0x04, 0x41,
|
||||
0x01, 0x6e, 0x6e, 0x82, 0x40, 0x14, 0x1b, 0x86, 0x03, 0x21, 0x26, 0x08,
|
||||
0x02, 0xb0, 0x01, 0xd8, 0x30, 0x10, 0xcb, 0xb2, 0x21, 0x60, 0x36, 0x0c,
|
||||
0x83, 0xd2, 0x4c, 0x10, 0x16, 0x68, 0x43, 0xf0, 0xd0, 0x80, 0x9a, 0x6a,
|
||||
0x0a, 0x4b, 0x73, 0x23, 0x42, 0x55, 0x84, 0x35, 0xf4, 0xf4, 0x24, 0x45,
|
||||
0x34, 0x41, 0x28, 0x94, 0x09, 0x42, 0xb1, 0x6c, 0x08, 0x88, 0x09, 0x42,
|
||||
0xc1, 0x4c, 0x10, 0x8a, 0x66, 0x82, 0x40, 0x18, 0x13, 0x04, 0xe2, 0xd8,
|
||||
0x20, 0x60, 0xd9, 0x86, 0x85, 0x90, 0x26, 0xaa, 0xb2, 0x86, 0x8b, 0xa0,
|
||||
0x34, 0x2e, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x13, 0x84, 0xc2, 0xd9, 0xb0, 0x0c, 0xdc, 0xd4, 0x55, 0xd7, 0x70,
|
||||
0x0d, 0x14, 0xb0, 0x41, 0xd8, 0x3c, 0x26, 0x53, 0x56, 0x5f, 0x54, 0x61,
|
||||
0x72, 0x67, 0x65, 0x74, 0x13, 0x84, 0xe2, 0xd9, 0xb0, 0x10, 0x60, 0x30,
|
||||
0x85, 0x41, 0x45, 0x0d, 0x17, 0x41, 0x69, 0x1b, 0x02, 0x31, 0xd8, 0x30,
|
||||
0x7c, 0x63, 0x00, 0x6c, 0x28, 0x94, 0x88, 0x0c, 0x00, 0x80, 0x45, 0x9a,
|
||||
0xdb, 0x1c, 0xdd, 0xdc, 0x04, 0x81, 0x40, 0x68, 0xcc, 0xa5, 0x9d, 0x7d,
|
||||
0xb1, 0x91, 0x4d, 0x10, 0x88, 0x84, 0xc6, 0x5c, 0xda, 0xd9, 0xd7, 0x1c,
|
||||
0xdd, 0x06, 0xc3, 0x0c, 0xce, 0x00, 0x0d, 0xd2, 0x40, 0x0d, 0xd2, 0xa0,
|
||||
0x0a, 0x1b, 0x9b, 0x5d, 0x9b, 0x4b, 0x1a, 0x59, 0x99, 0x1b, 0xdd, 0x94,
|
||||
0x20, 0xa8, 0x42, 0x86, 0xe7, 0x62, 0x57, 0x26, 0x37, 0x97, 0xf6, 0xe6,
|
||||
0x36, 0x25, 0x20, 0x9a, 0x90, 0xe1, 0xb9, 0xd8, 0x85, 0xb1, 0xd9, 0x95,
|
||||
0xc9, 0x4d, 0x09, 0x8a, 0x3a, 0x64, 0x78, 0x2e, 0x73, 0x68, 0x61, 0x64,
|
||||
0x65, 0x72, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x53, 0x02, 0xa4, 0x12, 0x19,
|
||||
0x9e, 0x0b, 0x5d, 0x1e, 0x5c, 0x59, 0x90, 0x9b, 0xdb, 0x1b, 0x5d, 0x18,
|
||||
0x5d, 0xda, 0x9b, 0xdb, 0xdc, 0x94, 0xa0, 0xa9, 0x43, 0x86, 0xe7, 0x62,
|
||||
0x97, 0x56, 0x76, 0x97, 0x44, 0x36, 0x45, 0x17, 0x46, 0x57, 0x36, 0x25,
|
||||
0x78, 0xea, 0x90, 0xe1, 0xb9, 0x94, 0xb9, 0xd1, 0xc9, 0xe5, 0x41, 0xbd,
|
||||
0xa5, 0xb9, 0xd1, 0xcd, 0x4d, 0x09, 0xc8, 0xa0, 0x0b, 0x19, 0x9e, 0xcb,
|
||||
0xd8, 0x5b, 0x9d, 0x1b, 0x5d, 0x99, 0xdc, 0xdc, 0x94, 0x40, 0x0d, 0x00,
|
||||
0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x33,
|
||||
0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14, 0x01, 0x3d, 0x88, 0x43,
|
||||
0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79, 0x78, 0x07, 0x73, 0x98,
|
||||
0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e, 0xf4, 0x80, 0x0e, 0x33,
|
||||
0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1, 0x1c, 0x66, 0x30, 0x05,
|
||||
0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 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, 0x03, 0x3b, 0x94, 0xc3, 0x2f, 0xbc, 0x83,
|
||||
0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0, 0xc3, 0x0c, 0xc4, 0x21,
|
||||
0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76, 0x80, 0x87, 0x19, 0xd1,
|
||||
0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e, 0xe7, 0xe0, 0x06, 0xf6,
|
||||
0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f, 0xef, 0x50, 0x0f, 0xf4,
|
||||
0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x06,
|
||||
0x60, 0xa4, 0xac, 0x09, 0x20, 0x8d, 0x05, 0x4c, 0xc3, 0xe5, 0x3b, 0x8f,
|
||||
0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x9b, 0x40,
|
||||
0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44, 0x04, 0x4a, 0x4d, 0x0f,
|
||||
0x35, 0xf9, 0xc5, 0x6d, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48,
|
||||
0x41, 0x53, 0x48, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1,
|
||||
0x09, 0x08, 0xb3, 0x14, 0xd7, 0xc2, 0xde, 0x5d, 0x68, 0x4f, 0xdf, 0x37,
|
||||
0x68, 0x65, 0x9c, 0x44, 0x58, 0x49, 0x4c, 0xf8, 0x04, 0x00, 0x00, 0x60,
|
||||
0x00, 0x00, 0x00, 0x3e, 0x01, 0x00, 0x00, 0x44, 0x58, 0x49, 0x4c, 0x00,
|
||||
0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0xe0, 0x04, 0x00, 0x00, 0x42,
|
||||
0x43, 0xc0, 0xde, 0x21, 0x0c, 0x00, 0x00, 0x35, 0x01, 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,
|
||||
0x10, 0x45, 0x02, 0x42, 0x92, 0x0b, 0x42, 0x84, 0x10, 0x32, 0x14, 0x38,
|
||||
0x08, 0x18, 0x4b, 0x0a, 0x32, 0x42, 0x88, 0x48, 0x90, 0x14, 0x20, 0x43,
|
||||
0x46, 0x88, 0xa5, 0x00, 0x19, 0x32, 0x42, 0xe4, 0x48, 0x0e, 0x90, 0x11,
|
||||
0x22, 0xc4, 0x50, 0x41, 0x51, 0x81, 0x8c, 0xe1, 0x83, 0xe5, 0x8a, 0x04,
|
||||
0x21, 0x46, 0x06, 0x51, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1b,
|
||||
0x8c, 0xe0, 0xff, 0xff, 0xff, 0xff, 0x07, 0x40, 0x02, 0xa8, 0x0d, 0x84,
|
||||
0xf0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x01, 0x00, 0x00, 0x00, 0x49,
|
||||
0x18, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 0x82, 0x60, 0x42, 0x20,
|
||||
0x00, 0x00, 0x00, 0x89, 0x20, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x32,
|
||||
0x22, 0x08, 0x09, 0x20, 0x64, 0x85, 0x04, 0x13, 0x22, 0xa4, 0x84, 0x04,
|
||||
0x13, 0x22, 0xe3, 0x84, 0xa1, 0x90, 0x14, 0x12, 0x4c, 0x88, 0x8c, 0x0b,
|
||||
0x84, 0x84, 0x4c, 0x10, 0x30, 0x23, 0x00, 0x25, 0x00, 0x8a, 0x19, 0x80,
|
||||
0x39, 0x02, 0x30, 0x98, 0x23, 0x40, 0x8a, 0x31, 0x44, 0x54, 0x44, 0x56,
|
||||
0x0c, 0x20, 0xa2, 0x1a, 0xc2, 0x81, 0x80, 0x54, 0x20, 0x00, 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, 0x43, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x3c, 0x06, 0x10, 0x00, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x79, 0x10, 0x20, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x01, 0x0c,
|
||||
0x00, 0x00, 0x00, 0x32, 0x1e, 0x98, 0x10, 0x19, 0x11, 0x4c, 0x90, 0x8c,
|
||||
0x09, 0x26, 0x47, 0xc6, 0x04, 0x43, 0xa2, 0x12, 0x18, 0x01, 0x28, 0x86,
|
||||
0x32, 0x28, 0x0f, 0xaa, 0x92, 0x18, 0x01, 0x28, 0x82, 0x42, 0x28, 0x83,
|
||||
0x02, 0xa1, 0x1d, 0x4b, 0x41, 0x88, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x1a,
|
||||
0x03, 0x4c, 0x90, 0x46, 0x02, 0x13, 0xc4, 0x31, 0x20, 0xc3, 0x1b, 0x43,
|
||||
0x81, 0x93, 0x4b, 0xb3, 0x0b, 0xa3, 0x2b, 0x4b, 0x01, 0x89, 0x71, 0xb9,
|
||||
0x71, 0x81, 0x71, 0x99, 0xc1, 0xc9, 0xb1, 0x01, 0x41, 0x81, 0x91, 0x89,
|
||||
0x31, 0xc3, 0x31, 0x9b, 0x29, 0x8b, 0x49, 0xd9, 0x10, 0x04, 0x13, 0x04,
|
||||
0x62, 0x98, 0x20, 0x10, 0xc4, 0x06, 0x61, 0x20, 0x26, 0x08, 0x44, 0xb1,
|
||||
0x41, 0x18, 0x0c, 0x0a, 0x70, 0x73, 0x1b, 0x06, 0xc4, 0x20, 0x26, 0x08,
|
||||
0x8b, 0xb3, 0x21, 0x50, 0x26, 0x08, 0x02, 0x40, 0x03, 0x6a, 0xaa, 0x29,
|
||||
0x2c, 0xcd, 0x8d, 0x08, 0x55, 0x11, 0xd6, 0xd0, 0xd3, 0x93, 0x14, 0xd1,
|
||||
0x04, 0xa1, 0x40, 0x26, 0x08, 0x45, 0xb2, 0x21, 0x20, 0x26, 0x08, 0x85,
|
||||
0x32, 0x41, 0x28, 0x96, 0x09, 0x02, 0x61, 0x4c, 0x10, 0x88, 0x63, 0x83,
|
||||
0x40, 0x55, 0x1b, 0x16, 0xc2, 0x79, 0xa0, 0x48, 0x1a, 0x26, 0x02, 0xb2,
|
||||
0xb8, 0x4c, 0x59, 0x7d, 0x41, 0xbd, 0xcd, 0xa5, 0xd1, 0xa5, 0xbd, 0xb9,
|
||||
0x4d, 0x10, 0x0a, 0x66, 0xc3, 0x32, 0x60, 0x4f, 0x16, 0x4d, 0xc3, 0x34,
|
||||
0x40, 0xc0, 0x06, 0xe1, 0xd2, 0x98, 0x4c, 0x59, 0x7d, 0x51, 0x85, 0xc9,
|
||||
0x9d, 0x95, 0xd1, 0x4d, 0x10, 0x8a, 0x66, 0xc3, 0x42, 0x70, 0x4f, 0x17,
|
||||
0x41, 0xc3, 0x44, 0x40, 0xd6, 0x86, 0xc0, 0xdb, 0x30, 0x6c, 0x1f, 0xb0,
|
||||
0xa1, 0x60, 0x1a, 0x30, 0x00, 0x80, 0x2a, 0x6c, 0x6c, 0x76, 0x6d, 0x2e,
|
||||
0x69, 0x64, 0x65, 0x6e, 0x74, 0x53, 0x82, 0xa0, 0x0a, 0x19, 0x9e, 0x8b,
|
||||
0x5d, 0x99, 0xdc, 0x5c, 0xda, 0x9b, 0xdb, 0x94, 0x80, 0x68, 0x42, 0x86,
|
||||
0xe7, 0x62, 0x17, 0xc6, 0x66, 0x57, 0x26, 0x37, 0x25, 0x30, 0xea, 0x90,
|
||||
0xe1, 0xb9, 0xcc, 0xa1, 0x85, 0x91, 0x95, 0xc9, 0x35, 0xbd, 0x91, 0x95,
|
||||
0xb1, 0x4d, 0x09, 0x90, 0x3a, 0x64, 0x78, 0x2e, 0x76, 0x69, 0x65, 0x77,
|
||||
0x49, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x02, 0xa5, 0x0e, 0x19,
|
||||
0x9e, 0x4b, 0x99, 0x1b, 0x9d, 0x5c, 0x1e, 0xd4, 0x5b, 0x9a, 0x1b, 0xdd,
|
||||
0xdc, 0x94, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x79, 0x18, 0x00, 0x00, 0x4c,
|
||||
0x00, 0x00, 0x00, 0x33, 0x08, 0x80, 0x1c, 0xc4, 0xe1, 0x1c, 0x66, 0x14,
|
||||
0x01, 0x3d, 0x88, 0x43, 0x38, 0x84, 0xc3, 0x8c, 0x42, 0x80, 0x07, 0x79,
|
||||
0x78, 0x07, 0x73, 0x98, 0x71, 0x0c, 0xe6, 0x00, 0x0f, 0xed, 0x10, 0x0e,
|
||||
0xf4, 0x80, 0x0e, 0x33, 0x0c, 0x42, 0x1e, 0xc2, 0xc1, 0x1d, 0xce, 0xa1,
|
||||
0x1c, 0x66, 0x30, 0x05, 0x3d, 0x88, 0x43, 0x38, 0x84, 0x83, 0x1b, 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, 0x03, 0x3b, 0x94,
|
||||
0xc3, 0x2f, 0xbc, 0x83, 0x3c, 0xfc, 0x82, 0x3b, 0xd4, 0x03, 0x3b, 0xb0,
|
||||
0xc3, 0x0c, 0xc4, 0x21, 0x07, 0x7c, 0x70, 0x03, 0x7a, 0x28, 0x87, 0x76,
|
||||
0x80, 0x87, 0x19, 0xd1, 0x43, 0x0e, 0xf8, 0xe0, 0x06, 0xe4, 0x20, 0x0e,
|
||||
0xe7, 0xe0, 0x06, 0xf6, 0x10, 0x0e, 0xf2, 0xc0, 0x0e, 0xe1, 0x90, 0x0f,
|
||||
0xef, 0x50, 0x0f, 0xf4, 0x00, 0x00, 0x00, 0x71, 0x20, 0x00, 0x00, 0x0b,
|
||||
0x00, 0x00, 0x00, 0x06, 0x60, 0xa4, 0xac, 0x09, 0x20, 0x8d, 0x05, 0x4c,
|
||||
0xc3, 0xe5, 0x3b, 0x8f, 0xbf, 0x38, 0xc0, 0x20, 0x36, 0x0f, 0x35, 0xf9,
|
||||
0xc5, 0x6d, 0x9b, 0x40, 0x35, 0x5c, 0xbe, 0xf3, 0xf8, 0xd2, 0xe4, 0x44,
|
||||
0x04, 0x4a, 0x4d, 0x0f, 0x35, 0xf9, 0xc5, 0x6d, 0x03, 0x00, 0x00, 0x61,
|
||||
0x20, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x13, 0x04, 0x41, 0x2c, 0x10,
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x85, 0x30, 0x03, 0x50,
|
||||
0x0a, 0x54, 0x25, 0x00, 0x00, 0x00, 0x00, 0x23, 0x06, 0x09, 0x00, 0x82,
|
||||
0x60, 0x60, 0x48, 0xc4, 0xf3, 0x28, 0xc3, 0x88, 0x41, 0x02, 0x80, 0x20,
|
||||
0x18, 0x18, 0x53, 0x01, 0x41, 0x02, 0x31, 0x62, 0x90, 0x00, 0x20, 0x08,
|
||||
0x06, 0x06, 0x65, 0x44, 0xd1, 0x52, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82,
|
||||
0x81, 0x51, 0x1d, 0x92, 0xa4, 0x18, 0x23, 0x06, 0x09, 0x00, 0x82, 0x60,
|
||||
0x80, 0x54, 0xc6, 0x34, 0x39, 0xc4, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18,
|
||||
0x20, 0x95, 0x31, 0x4d, 0xc5, 0x30, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06,
|
||||
0x48, 0x65, 0x4c, 0x53, 0x23, 0x8c, 0x18, 0x24, 0x00, 0x08, 0x82, 0x01,
|
||||
0x52, 0x19, 0xd3, 0xb4, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
2584
test/testgpu/testgpu_metallib.h
Normal file
2584
test/testgpu/testgpu_metallib.h
Normal file
File diff suppressed because it is too large
Load Diff
150
test/testgpu/testgpu_spirv.h
Normal file
150
test/testgpu/testgpu_spirv.h
Normal file
@@ -0,0 +1,150 @@
|
||||
const unsigned char cube_vert_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00,
|
||||
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0xc2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x6f, 0x75, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||
0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x50,
|
||||
0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x06, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00,
|
||||
0x06, 0x00, 0x07, 0x00, 0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x53, 0x69, 0x7a, 0x65,
|
||||
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x43, 0x6c, 0x69, 0x70, 0x44,
|
||||
0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00, 0x06, 0x00, 0x07, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x67, 0x6c, 0x5f, 0x43,
|
||||
0x75, 0x6c, 0x6c, 0x44, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x00,
|
||||
0x05, 0x00, 0x03, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x55, 0x42, 0x4f, 0x00,
|
||||
0x06, 0x00, 0x07, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f,
|
||||
0x6a, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00,
|
||||
0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x48, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x16, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x47, 0x00, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x47, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x20, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f,
|
||||
0x15, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x04, 0x00, 0x13, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x06, 0x00, 0x16, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x20, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00,
|
||||
0x19, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x2b, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x04, 0x00, 0x1b, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x03, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
|
||||
0x1d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x3b, 0x00, 0x04, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x02, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x0d, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||
0x0d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
|
||||
0x41, 0x00, 0x05, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00,
|
||||
0x1b, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||
0x3d, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x22, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00,
|
||||
0x24, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
|
||||
0x23, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
|
||||
0x26, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x91, 0x00, 0x05, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
|
||||
0x27, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x29, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x00, 0x03, 0x00, 0x29, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
|
||||
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
const unsigned int cube_vert_spv_len = 1340;
|
||||
const unsigned char cube_frag_spv[] = {
|
||||
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x08, 0x00,
|
||||
0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x47, 0x4c, 0x53, 0x4c, 0x2e, 0x73, 0x74, 0x64, 0x2e, 0x34, 0x35, 0x30,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x10, 0x00, 0x03, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x03, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0xc2, 0x01, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x6f, 0x75, 0x74, 0x5f,
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72,
|
||||
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x13, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x00, 0x03, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x16, 0x00, 0x03, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0x3b, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0xf8, 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x04, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
|
||||
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00
|
||||
};
|
||||
const unsigned int cube_frag_spv_len = 380;
|
||||
724
test/testgpu_spinning_cube.c
Normal file
724
test/testgpu_spinning_cube.c
Normal file
@@ -0,0 +1,724 @@
|
||||
/*
|
||||
Copyright (C) 1997-2022 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include <emscripten/emscripten.h>
|
||||
#endif
|
||||
|
||||
#include <SDL3/SDL_test_common.h>
|
||||
#include <SDL3/SDL_gpu.h>
|
||||
#include <SDL3/SDL_main.h>
|
||||
|
||||
/* Regenerate the shaders with testgpu/build-shaders.sh */
|
||||
#include "testgpu/testgpu_spirv.h"
|
||||
#include "testgpu/testgpu_dxbc.h"
|
||||
#include "testgpu/testgpu_dxil.h"
|
||||
#include "testgpu/testgpu_metallib.h"
|
||||
|
||||
#define TESTGPU_SUPPORTED_FORMATS (SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXBC | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_METALLIB)
|
||||
|
||||
#define CHECK_CREATE(var, thing) { if (!(var)) { SDL_Log("Failed to create %s: %s\n", thing, SDL_GetError()); quit(2); } }
|
||||
|
||||
static Uint32 frames = 0;
|
||||
|
||||
typedef struct RenderState
|
||||
{
|
||||
SDL_GpuBuffer *buf_vertex;
|
||||
SDL_GpuGraphicsPipeline *pipeline;
|
||||
SDL_GpuSampleCount sample_count;
|
||||
} RenderState;
|
||||
|
||||
typedef struct WindowState
|
||||
{
|
||||
int angle_x, angle_y, angle_z;
|
||||
SDL_GpuTexture *tex_depth, *tex_msaa;
|
||||
Uint32 prev_drawablew, prev_drawableh;
|
||||
} WindowState;
|
||||
|
||||
static SDL_GpuDevice *gpu_device = NULL;
|
||||
static RenderState render_state;
|
||||
static SDLTest_CommonState *state = NULL;
|
||||
static WindowState *window_states = NULL;
|
||||
|
||||
static void shutdownGpu(void)
|
||||
{
|
||||
if (window_states) {
|
||||
int i;
|
||||
for (i = 0; i < state->num_windows; i++) {
|
||||
WindowState *winstate = &window_states[i];
|
||||
SDL_ReleaseGpuTexture(gpu_device, winstate->tex_depth);
|
||||
SDL_ReleaseGpuTexture(gpu_device, winstate->tex_msaa);
|
||||
SDL_UnclaimGpuWindow(gpu_device, state->windows[i]);
|
||||
}
|
||||
SDL_free(window_states);
|
||||
window_states = NULL;
|
||||
}
|
||||
|
||||
SDL_ReleaseGpuBuffer(gpu_device, render_state.buf_vertex);
|
||||
SDL_ReleaseGpuGraphicsPipeline(gpu_device, render_state.pipeline);
|
||||
SDL_DestroyGpuDevice(gpu_device);
|
||||
|
||||
SDL_zero(render_state);
|
||||
gpu_device = NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
|
||||
static void
|
||||
quit(int rc)
|
||||
{
|
||||
shutdownGpu();
|
||||
SDLTest_CommonQuit(state);
|
||||
exit(rc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Simulates desktop's glRotatef. The matrix is returned in column-major
|
||||
* order.
|
||||
*/
|
||||
static void
|
||||
rotate_matrix(float angle, float x, float y, float z, float *r)
|
||||
{
|
||||
float radians, c, s, c1, u[3], length;
|
||||
int i, j;
|
||||
|
||||
radians = angle * SDL_PI_F / 180.0f;
|
||||
|
||||
c = SDL_cosf(radians);
|
||||
s = SDL_sinf(radians);
|
||||
|
||||
c1 = 1.0f - SDL_cosf(radians);
|
||||
|
||||
length = (float)SDL_sqrt(x * x + y * y + z * z);
|
||||
|
||||
u[0] = x / length;
|
||||
u[1] = y / length;
|
||||
u[2] = z / length;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
r[i] = 0.0;
|
||||
}
|
||||
|
||||
r[15] = 1.0;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
r[i * 4 + (i + 1) % 3] = u[(i + 2) % 3] * s;
|
||||
r[i * 4 + (i + 2) % 3] = -u[(i + 1) % 3] * s;
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
r[i * 4 + j] += c1 * u[i] * u[j] + (i == j ? c : 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Simulates gluPerspectiveMatrix
|
||||
*/
|
||||
static void
|
||||
perspective_matrix(float fovy, float aspect, float znear, float zfar, float *r)
|
||||
{
|
||||
int i;
|
||||
float f;
|
||||
|
||||
f = 1.0f/SDL_tanf(fovy * 0.5f);
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
r[i] = 0.0;
|
||||
}
|
||||
|
||||
r[0] = f / aspect;
|
||||
r[5] = f;
|
||||
r[10] = (znear + zfar) / (znear - zfar);
|
||||
r[11] = -1.0f;
|
||||
r[14] = (2.0f * znear * zfar) / (znear - zfar);
|
||||
r[15] = 0.0f;
|
||||
}
|
||||
|
||||
/*
|
||||
* Multiplies lhs by rhs and writes out to r. All matrices are 4x4 and column
|
||||
* major. In-place multiplication is supported.
|
||||
*/
|
||||
static void
|
||||
multiply_matrix(float *lhs, float *rhs, float *r)
|
||||
{
|
||||
int i, j, k;
|
||||
float tmp[16];
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
tmp[j * 4 + i] = 0.0;
|
||||
|
||||
for (k = 0; k < 4; k++) {
|
||||
tmp[j * 4 + i] += lhs[k * 4 + i] * rhs[j * 4 + k];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
r[i] = tmp[i];
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct VertexData
|
||||
{
|
||||
float x, y, z; /* 3D data. Vertex range -0.5..0.5 in all axes. Z -0.5 is near, 0.5 is far. */
|
||||
float red, green, blue; /* intensity 0 to 1 (alpha is always 1). */
|
||||
} VertexData;
|
||||
|
||||
static const VertexData vertex_data[] = {
|
||||
/* Front face. */
|
||||
/* Bottom left */
|
||||
{ -0.5, 0.5, -0.5, 1.0, 0.0, 0.0 }, /* red */
|
||||
{ 0.5, -0.5, -0.5, 0.0, 0.0, 1.0 }, /* blue */
|
||||
{ -0.5, -0.5, -0.5, 0.0, 1.0, 0.0 }, /* green */
|
||||
|
||||
/* Top right */
|
||||
{ -0.5, 0.5, -0.5, 1.0, 0.0, 0.0 }, /* red */
|
||||
{ 0.5, 0.5, -0.5, 1.0, 1.0, 0.0 }, /* yellow */
|
||||
{ 0.5, -0.5, -0.5, 0.0, 0.0, 1.0 }, /* blue */
|
||||
|
||||
/* Left face */
|
||||
/* Bottom left */
|
||||
{ -0.5, 0.5, 0.5, 1.0, 1.0, 1.0 }, /* white */
|
||||
{ -0.5, -0.5, -0.5, 0.0, 1.0, 0.0 }, /* green */
|
||||
{ -0.5, -0.5, 0.5, 0.0, 1.0, 1.0 }, /* cyan */
|
||||
|
||||
/* Top right */
|
||||
{ -0.5, 0.5, 0.5, 1.0, 1.0, 1.0 }, /* white */
|
||||
{ -0.5, 0.5, -0.5, 1.0, 0.0, 0.0 }, /* red */
|
||||
{ -0.5, -0.5, -0.5, 0.0, 1.0, 0.0 }, /* green */
|
||||
|
||||
/* Top face */
|
||||
/* Bottom left */
|
||||
{ -0.5, 0.5, 0.5, 1.0, 1.0, 1.0 }, /* white */
|
||||
{ 0.5, 0.5, -0.5, 1.0, 1.0, 0.0 }, /* yellow */
|
||||
{ -0.5, 0.5, -0.5, 1.0, 0.0, 0.0 }, /* red */
|
||||
|
||||
/* Top right */
|
||||
{ -0.5, 0.5, 0.5, 1.0, 1.0, 1.0 }, /* white */
|
||||
{ 0.5, 0.5, 0.5, 0.0, 0.0, 0.0 }, /* black */
|
||||
{ 0.5, 0.5, -0.5, 1.0, 1.0, 0.0 }, /* yellow */
|
||||
|
||||
/* Right face */
|
||||
/* Bottom left */
|
||||
{ 0.5, 0.5, -0.5, 1.0, 1.0, 0.0 }, /* yellow */
|
||||
{ 0.5, -0.5, 0.5, 1.0, 0.0, 1.0 }, /* magenta */
|
||||
{ 0.5, -0.5, -0.5, 0.0, 0.0, 1.0 }, /* blue */
|
||||
|
||||
/* Top right */
|
||||
{ 0.5, 0.5, -0.5, 1.0, 1.0, 0.0 }, /* yellow */
|
||||
{ 0.5, 0.5, 0.5, 0.0, 0.0, 0.0 }, /* black */
|
||||
{ 0.5, -0.5, 0.5, 1.0, 0.0, 1.0 }, /* magenta */
|
||||
|
||||
/* Back face */
|
||||
/* Bottom left */
|
||||
{ 0.5, 0.5, 0.5, 0.0, 0.0, 0.0 }, /* black */
|
||||
{ -0.5, -0.5, 0.5, 0.0, 1.0, 1.0 }, /* cyan */
|
||||
{ 0.5, -0.5, 0.5, 1.0, 0.0, 1.0 }, /* magenta */
|
||||
|
||||
/* Top right */
|
||||
{ 0.5, 0.5, 0.5, 0.0, 0.0, 0.0 }, /* black */
|
||||
{ -0.5, 0.5, 0.5, 1.0, 1.0, 1.0 }, /* white */
|
||||
{ -0.5, -0.5, 0.5, 0.0, 1.0, 1.0 }, /* cyan */
|
||||
|
||||
/* Bottom face */
|
||||
/* Bottom left */
|
||||
{ -0.5, -0.5, -0.5, 0.0, 1.0, 0.0 }, /* green */
|
||||
{ 0.5, -0.5, 0.5, 1.0, 0.0, 1.0 }, /* magenta */
|
||||
{ -0.5, -0.5, 0.5, 0.0, 1.0, 1.0 }, /* cyan */
|
||||
|
||||
/* Top right */
|
||||
{ -0.5, -0.5, -0.5, 0.0, 1.0, 0.0 }, /* green */
|
||||
{ 0.5, -0.5, -0.5, 0.0, 0.0, 1.0 }, /* blue */
|
||||
{ 0.5, -0.5, 0.5, 1.0, 0.0, 1.0 } /* magenta */
|
||||
};
|
||||
|
||||
static SDL_GpuTexture*
|
||||
CreateDepthTexture(Uint32 drawablew, Uint32 drawableh)
|
||||
{
|
||||
SDL_GpuTextureCreateInfo depthtex_createinfo;
|
||||
SDL_GpuTexture *result;
|
||||
|
||||
depthtex_createinfo.type = SDL_GPU_TEXTURETYPE_2D;
|
||||
depthtex_createinfo.format = SDL_GPU_TEXTUREFORMAT_D16_UNORM;
|
||||
depthtex_createinfo.width = drawablew;
|
||||
depthtex_createinfo.height = drawableh;
|
||||
depthtex_createinfo.layerCountOrDepth = 1;
|
||||
depthtex_createinfo.levelCount = 1;
|
||||
depthtex_createinfo.sampleCount = render_state.sample_count;
|
||||
depthtex_createinfo.usageFlags = SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET_BIT;
|
||||
depthtex_createinfo.props = 0;
|
||||
|
||||
result = SDL_CreateGpuTexture(gpu_device, &depthtex_createinfo);
|
||||
CHECK_CREATE(result, "Depth Texture")
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static SDL_GpuTexture*
|
||||
CreateMSAATexture(Uint32 drawablew, Uint32 drawableh)
|
||||
{
|
||||
SDL_GpuTextureCreateInfo msaatex_createinfo;
|
||||
SDL_GpuTexture *result;
|
||||
|
||||
if (render_state.sample_count == SDL_GPU_SAMPLECOUNT_1) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
msaatex_createinfo.type = SDL_GPU_TEXTURETYPE_2D;
|
||||
msaatex_createinfo.format = SDL_GetGpuSwapchainTextureFormat(gpu_device, state->windows[0]);
|
||||
msaatex_createinfo.width = drawablew;
|
||||
msaatex_createinfo.height = drawableh;
|
||||
msaatex_createinfo.layerCountOrDepth = 1;
|
||||
msaatex_createinfo.levelCount = 1;
|
||||
msaatex_createinfo.sampleCount = render_state.sample_count;
|
||||
msaatex_createinfo.usageFlags = SDL_GPU_TEXTUREUSAGE_COLOR_TARGET_BIT | SDL_GPU_TEXTUREUSAGE_SAMPLER_BIT;
|
||||
msaatex_createinfo.props = 0;
|
||||
|
||||
result = SDL_CreateGpuTexture(gpu_device, &msaatex_createinfo);
|
||||
CHECK_CREATE(result, "MSAA Texture")
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
Render(SDL_Window *window, const int windownum)
|
||||
{
|
||||
WindowState *winstate = &window_states[windownum];
|
||||
SDL_GpuTexture *swapchain;
|
||||
SDL_GpuColorAttachmentInfo color_attachment;
|
||||
SDL_GpuDepthStencilAttachmentInfo depth_attachment;
|
||||
float matrix_rotate[16], matrix_modelview[16], matrix_perspective[16], matrix_final[16];
|
||||
Uint32 drawablew, drawableh;
|
||||
SDL_GpuCommandBuffer *cmd;
|
||||
SDL_GpuRenderPass *pass;
|
||||
SDL_GpuBufferBinding vertex_binding;
|
||||
SDL_GpuBlitRegion src_region;
|
||||
SDL_GpuBlitRegion dst_region;
|
||||
|
||||
/* Acquire the swapchain texture */
|
||||
|
||||
cmd = SDL_AcquireGpuCommandBuffer(gpu_device);
|
||||
swapchain = SDL_AcquireGpuSwapchainTexture(cmd, state->windows[windownum], &drawablew, &drawableh);
|
||||
|
||||
if (!swapchain) {
|
||||
/* No swapchain was acquired, probably too many frames in flight */
|
||||
SDL_SubmitGpu(cmd);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do some rotation with Euler angles. It is not a fixed axis as
|
||||
* quaterions would be, but the effect is cool.
|
||||
*/
|
||||
rotate_matrix((float)winstate->angle_x, 1.0f, 0.0f, 0.0f, matrix_modelview);
|
||||
rotate_matrix((float)winstate->angle_y, 0.0f, 1.0f, 0.0f, matrix_rotate);
|
||||
|
||||
multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview);
|
||||
|
||||
rotate_matrix((float)winstate->angle_z, 0.0f, 1.0f, 0.0f, matrix_rotate);
|
||||
|
||||
multiply_matrix(matrix_rotate, matrix_modelview, matrix_modelview);
|
||||
|
||||
/* Pull the camera back from the cube */
|
||||
matrix_modelview[14] -= 2.5f;
|
||||
|
||||
perspective_matrix(45.0f, (float)drawablew/drawableh, 0.01f, 100.0f, matrix_perspective);
|
||||
multiply_matrix(matrix_perspective, matrix_modelview, (float*) &matrix_final);
|
||||
|
||||
winstate->angle_x += 3;
|
||||
winstate->angle_y += 2;
|
||||
winstate->angle_z += 1;
|
||||
|
||||
if(winstate->angle_x >= 360) winstate->angle_x -= 360;
|
||||
if(winstate->angle_x < 0) winstate->angle_x += 360;
|
||||
if(winstate->angle_y >= 360) winstate->angle_y -= 360;
|
||||
if(winstate->angle_y < 0) winstate->angle_y += 360;
|
||||
if(winstate->angle_z >= 360) winstate->angle_z -= 360;
|
||||
if(winstate->angle_z < 0) winstate->angle_z += 360;
|
||||
|
||||
/* Resize the depth buffer if the window size changed */
|
||||
|
||||
if (winstate->prev_drawablew != drawablew || winstate->prev_drawableh != drawableh) {
|
||||
SDL_ReleaseGpuTexture(gpu_device, winstate->tex_depth);
|
||||
SDL_ReleaseGpuTexture(gpu_device, winstate->tex_msaa);
|
||||
winstate->tex_depth = CreateDepthTexture(drawablew, drawableh);
|
||||
winstate->tex_msaa = CreateMSAATexture(drawablew, drawableh);
|
||||
}
|
||||
winstate->prev_drawablew = drawablew;
|
||||
winstate->prev_drawableh = drawableh;
|
||||
|
||||
/* Set up the pass */
|
||||
|
||||
SDL_zero(color_attachment);
|
||||
color_attachment.clearColor.a = 1.0f;
|
||||
color_attachment.loadOp = SDL_GPU_LOADOP_CLEAR;
|
||||
color_attachment.storeOp = SDL_GPU_STOREOP_STORE;
|
||||
color_attachment.texture = winstate->tex_msaa ? winstate->tex_msaa : swapchain;
|
||||
|
||||
SDL_zero(depth_attachment);
|
||||
depth_attachment.depthStencilClearValue.depth = 1.0f;
|
||||
depth_attachment.loadOp = SDL_GPU_LOADOP_CLEAR;
|
||||
depth_attachment.storeOp = SDL_GPU_STOREOP_DONT_CARE;
|
||||
depth_attachment.texture = winstate->tex_depth;
|
||||
depth_attachment.cycle = SDL_TRUE;
|
||||
|
||||
/* Set up the bindings */
|
||||
|
||||
vertex_binding.buffer = render_state.buf_vertex;
|
||||
vertex_binding.offset = 0;
|
||||
|
||||
/* Draw the cube! */
|
||||
|
||||
SDL_PushGpuVertexUniformData(cmd, 0, matrix_final, sizeof(matrix_final));
|
||||
|
||||
pass = SDL_BeginGpuRenderPass(cmd, &color_attachment, 1, &depth_attachment);
|
||||
SDL_BindGpuGraphicsPipeline(pass, render_state.pipeline);
|
||||
SDL_BindGpuVertexBuffers(pass, 0, &vertex_binding, 1);
|
||||
SDL_DrawGpuPrimitives(pass, 36, 1, 0, 0);
|
||||
SDL_EndGpuRenderPass(pass);
|
||||
|
||||
/* Blit MSAA to swapchain, if needed */
|
||||
if (render_state.sample_count > SDL_GPU_SAMPLECOUNT_1) {
|
||||
SDL_zero(src_region);
|
||||
src_region.texture = winstate->tex_msaa;
|
||||
src_region.w = drawablew;
|
||||
src_region.h = drawableh;
|
||||
|
||||
dst_region = src_region;
|
||||
dst_region.texture = swapchain;
|
||||
|
||||
SDL_BlitGpu(cmd, &src_region, &dst_region, SDL_FLIP_NONE, SDL_GPU_FILTER_LINEAR, SDL_FALSE);
|
||||
}
|
||||
|
||||
/* Submit the command buffer! */
|
||||
SDL_SubmitGpu(cmd);
|
||||
|
||||
++frames;
|
||||
}
|
||||
|
||||
static SDL_GpuShader*
|
||||
load_shader(SDL_bool is_vertex)
|
||||
{
|
||||
SDL_GpuShaderCreateInfo createinfo;
|
||||
createinfo.samplerCount = 0;
|
||||
createinfo.storageBufferCount = 0;
|
||||
createinfo.storageTextureCount = 0;
|
||||
createinfo.uniformBufferCount = is_vertex ? 1 : 0;
|
||||
createinfo.props = 0;
|
||||
|
||||
SDL_GpuDriver backend = SDL_GetGpuDriver(gpu_device);
|
||||
if (backend == SDL_GPU_DRIVER_D3D11) {
|
||||
createinfo.format = SDL_GPU_SHADERFORMAT_DXBC;
|
||||
createinfo.code = is_vertex ? D3D11_CubeVert : D3D11_CubeFrag;
|
||||
createinfo.codeSize = is_vertex ? SDL_arraysize(D3D11_CubeVert) : SDL_arraysize(D3D11_CubeFrag);
|
||||
createinfo.entryPointName = is_vertex ? "VSMain" : "PSMain";
|
||||
} else if (backend == SDL_GPU_DRIVER_D3D12) {
|
||||
createinfo.format = SDL_GPU_SHADERFORMAT_DXIL;
|
||||
createinfo.code = is_vertex ? D3D12_CubeVert : D3D12_CubeFrag;
|
||||
createinfo.codeSize = is_vertex ? SDL_arraysize(D3D12_CubeVert) : SDL_arraysize(D3D12_CubeFrag);
|
||||
createinfo.entryPointName = is_vertex ? "VSMain" : "PSMain";
|
||||
} else if (backend == SDL_GPU_DRIVER_METAL) {
|
||||
createinfo.format = SDL_GPU_SHADERFORMAT_METALLIB;
|
||||
createinfo.code = is_vertex ? cube_vert_metallib : cube_frag_metallib;
|
||||
createinfo.codeSize = is_vertex ? cube_vert_metallib_len : cube_frag_metallib_len;
|
||||
createinfo.entryPointName = is_vertex ? "vs_main" : "fs_main";
|
||||
} else {
|
||||
createinfo.format = SDL_GPU_SHADERFORMAT_SPIRV;
|
||||
createinfo.code = is_vertex ? cube_vert_spv : cube_frag_spv;
|
||||
createinfo.codeSize = is_vertex ? cube_vert_spv_len : cube_frag_spv_len;
|
||||
createinfo.entryPointName = "main";
|
||||
}
|
||||
|
||||
createinfo.stage = is_vertex ? SDL_GPU_SHADERSTAGE_VERTEX : SDL_GPU_SHADERSTAGE_FRAGMENT;
|
||||
return SDL_CreateGpuShader(gpu_device, &createinfo);
|
||||
}
|
||||
|
||||
static void
|
||||
init_render_state(int msaa)
|
||||
{
|
||||
SDL_GpuCommandBuffer *cmd;
|
||||
SDL_GpuTransferBuffer *buf_transfer;
|
||||
void *map;
|
||||
SDL_GpuTransferBufferLocation buf_location;
|
||||
SDL_GpuBufferRegion dst_region;
|
||||
SDL_GpuCopyPass *copy_pass;
|
||||
SDL_GpuBufferCreateInfo buffer_desc;
|
||||
SDL_GpuTransferBufferCreateInfo transfer_buffer_desc;
|
||||
SDL_GpuGraphicsPipelineCreateInfo pipelinedesc;
|
||||
SDL_GpuColorAttachmentDescription color_attachment_desc;
|
||||
Uint32 drawablew, drawableh;
|
||||
SDL_GpuVertexAttribute vertex_attributes[2];
|
||||
SDL_GpuVertexBinding vertex_binding;
|
||||
SDL_GpuShader *vertex_shader;
|
||||
SDL_GpuShader *fragment_shader;
|
||||
int i;
|
||||
|
||||
gpu_device = SDL_CreateGpuDevice(
|
||||
TESTGPU_SUPPORTED_FORMATS,
|
||||
1,
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
CHECK_CREATE(gpu_device, "GPU device");
|
||||
|
||||
/* Claim the windows */
|
||||
|
||||
for (i = 0; i < state->num_windows; i++) {
|
||||
SDL_ClaimGpuWindow(
|
||||
gpu_device,
|
||||
state->windows[i]
|
||||
);
|
||||
}
|
||||
|
||||
/* Create shaders */
|
||||
|
||||
vertex_shader = load_shader(SDL_TRUE);
|
||||
CHECK_CREATE(vertex_shader, "Vertex Shader")
|
||||
fragment_shader = load_shader(SDL_FALSE);
|
||||
CHECK_CREATE(fragment_shader, "Fragment Shader")
|
||||
|
||||
/* Create buffers */
|
||||
|
||||
buffer_desc.usageFlags = SDL_GPU_BUFFERUSAGE_VERTEX_BIT;
|
||||
buffer_desc.sizeInBytes = sizeof(vertex_data);
|
||||
buffer_desc.props = 0;
|
||||
render_state.buf_vertex = SDL_CreateGpuBuffer(
|
||||
gpu_device,
|
||||
&buffer_desc
|
||||
);
|
||||
CHECK_CREATE(render_state.buf_vertex, "Static vertex buffer")
|
||||
|
||||
SDL_SetGpuBufferName(gpu_device, render_state.buf_vertex, "космонавт");
|
||||
|
||||
transfer_buffer_desc.usage = SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD;
|
||||
transfer_buffer_desc.sizeInBytes = sizeof(vertex_data);
|
||||
transfer_buffer_desc.props = 0;
|
||||
buf_transfer = SDL_CreateGpuTransferBuffer(
|
||||
gpu_device,
|
||||
&transfer_buffer_desc
|
||||
);
|
||||
CHECK_CREATE(buf_transfer, "Vertex transfer buffer")
|
||||
|
||||
/* We just need to upload the static data once. */
|
||||
map = SDL_MapGpuTransferBuffer(gpu_device, buf_transfer, SDL_FALSE);
|
||||
SDL_memcpy(map, vertex_data, sizeof(vertex_data));
|
||||
SDL_UnmapGpuTransferBuffer(gpu_device, buf_transfer);
|
||||
|
||||
cmd = SDL_AcquireGpuCommandBuffer(gpu_device);
|
||||
copy_pass = SDL_BeginGpuCopyPass(cmd);
|
||||
buf_location.transferBuffer = buf_transfer;
|
||||
buf_location.offset = 0;
|
||||
dst_region.buffer = render_state.buf_vertex;
|
||||
dst_region.offset = 0;
|
||||
dst_region.size = sizeof(vertex_data);
|
||||
SDL_UploadToGpuBuffer(copy_pass, &buf_location, &dst_region, SDL_FALSE);
|
||||
SDL_EndGpuCopyPass(copy_pass);
|
||||
SDL_SubmitGpu(cmd);
|
||||
|
||||
SDL_ReleaseGpuTransferBuffer(gpu_device, buf_transfer);
|
||||
|
||||
/* Determine which sample count to use */
|
||||
render_state.sample_count = SDL_GPU_SAMPLECOUNT_1;
|
||||
if (msaa && SDL_SupportsGpuSampleCount(
|
||||
gpu_device,
|
||||
SDL_GetGpuSwapchainTextureFormat(gpu_device, state->windows[0]),
|
||||
SDL_GPU_SAMPLECOUNT_4)) {
|
||||
render_state.sample_count = SDL_GPU_SAMPLECOUNT_4;
|
||||
}
|
||||
|
||||
/* Set up the graphics pipeline */
|
||||
|
||||
SDL_zero(pipelinedesc);
|
||||
|
||||
color_attachment_desc.format = SDL_GetGpuSwapchainTextureFormat(gpu_device, state->windows[0]);
|
||||
|
||||
color_attachment_desc.blendState.blendEnable = 0;
|
||||
color_attachment_desc.blendState.alphaBlendOp = SDL_GPU_BLENDOP_ADD;
|
||||
color_attachment_desc.blendState.colorBlendOp = SDL_GPU_BLENDOP_ADD;
|
||||
color_attachment_desc.blendState.colorWriteMask = 0xF;
|
||||
color_attachment_desc.blendState.srcAlphaBlendFactor = SDL_GPU_BLENDFACTOR_ONE;
|
||||
color_attachment_desc.blendState.dstAlphaBlendFactor = SDL_GPU_BLENDFACTOR_ZERO;
|
||||
color_attachment_desc.blendState.srcColorBlendFactor = SDL_GPU_BLENDFACTOR_ONE;
|
||||
color_attachment_desc.blendState.dstColorBlendFactor = SDL_GPU_BLENDFACTOR_ZERO;
|
||||
|
||||
pipelinedesc.attachmentInfo.colorAttachmentCount = 1;
|
||||
pipelinedesc.attachmentInfo.colorAttachmentDescriptions = &color_attachment_desc;
|
||||
pipelinedesc.attachmentInfo.depthStencilFormat = SDL_GPU_TEXTUREFORMAT_D16_UNORM;
|
||||
pipelinedesc.attachmentInfo.hasDepthStencilAttachment = SDL_TRUE;
|
||||
|
||||
pipelinedesc.depthStencilState.depthTestEnable = 1;
|
||||
pipelinedesc.depthStencilState.depthWriteEnable = 1;
|
||||
pipelinedesc.depthStencilState.compareOp = SDL_GPU_COMPAREOP_LESS_OR_EQUAL;
|
||||
|
||||
pipelinedesc.multisampleState.sampleCount = render_state.sample_count;
|
||||
pipelinedesc.multisampleState.sampleMask = 0xF;
|
||||
|
||||
pipelinedesc.primitiveType = SDL_GPU_PRIMITIVETYPE_TRIANGLELIST;
|
||||
|
||||
pipelinedesc.vertexShader = vertex_shader;
|
||||
pipelinedesc.fragmentShader = fragment_shader;
|
||||
|
||||
vertex_binding.binding = 0;
|
||||
vertex_binding.inputRate = SDL_GPU_VERTEXINPUTRATE_VERTEX;
|
||||
vertex_binding.instanceStepRate = 0;
|
||||
vertex_binding.stride = sizeof(VertexData);
|
||||
|
||||
vertex_attributes[0].binding = 0;
|
||||
vertex_attributes[0].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
|
||||
vertex_attributes[0].location = 0;
|
||||
vertex_attributes[0].offset = 0;
|
||||
|
||||
vertex_attributes[1].binding = 0;
|
||||
vertex_attributes[1].format = SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3;
|
||||
vertex_attributes[1].location = 1;
|
||||
vertex_attributes[1].offset = sizeof(float) * 3;
|
||||
|
||||
pipelinedesc.vertexInputState.vertexBindingCount = 1;
|
||||
pipelinedesc.vertexInputState.vertexBindings = &vertex_binding;
|
||||
pipelinedesc.vertexInputState.vertexAttributeCount = 2;
|
||||
pipelinedesc.vertexInputState.vertexAttributes = (SDL_GpuVertexAttribute*) &vertex_attributes;
|
||||
|
||||
pipelinedesc.props = 0;
|
||||
|
||||
render_state.pipeline = SDL_CreateGpuGraphicsPipeline(gpu_device, &pipelinedesc);
|
||||
CHECK_CREATE(render_state.pipeline, "Render Pipeline")
|
||||
|
||||
/* These are reference-counted; once the pipeline is created, you don't need to keep these. */
|
||||
SDL_ReleaseGpuShader(gpu_device, vertex_shader);
|
||||
SDL_ReleaseGpuShader(gpu_device, fragment_shader);
|
||||
|
||||
/* Set up per-window state */
|
||||
|
||||
window_states = (WindowState *) SDL_calloc(state->num_windows, sizeof (WindowState));
|
||||
if (!window_states) {
|
||||
SDL_Log("Out of memory!\n");
|
||||
quit(2);
|
||||
}
|
||||
|
||||
for (i = 0; i < state->num_windows; i++) {
|
||||
WindowState *winstate = &window_states[i];
|
||||
|
||||
/* create a depth texture for the window */
|
||||
SDL_GetWindowSizeInPixels(state->windows[i], (int*) &drawablew, (int*) &drawableh);
|
||||
winstate->tex_depth = CreateDepthTexture(drawablew, drawableh);
|
||||
winstate->tex_msaa = CreateMSAATexture(drawablew, drawableh);
|
||||
|
||||
/* make each window different */
|
||||
winstate->angle_x = (i * 10) % 360;
|
||||
winstate->angle_y = (i * 20) % 360;
|
||||
winstate->angle_z = (i * 30) % 360;
|
||||
}
|
||||
}
|
||||
|
||||
static int done = 0;
|
||||
|
||||
void loop()
|
||||
{
|
||||
SDL_Event event;
|
||||
int i;
|
||||
|
||||
/* Check for events */
|
||||
while (SDL_PollEvent(&event) && !done) {
|
||||
SDLTest_CommonEvent(state, &event, &done);
|
||||
}
|
||||
if (!done) {
|
||||
for (i = 0; i < state->num_windows; ++i) {
|
||||
Render(state->windows[i], i);
|
||||
}
|
||||
}
|
||||
#ifdef __EMSCRIPTEN__
|
||||
else {
|
||||
emscripten_cancel_main_loop();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int msaa;
|
||||
int i;
|
||||
const SDL_DisplayMode *mode;
|
||||
Uint64 then, now;
|
||||
|
||||
/* Initialize params */
|
||||
msaa = 0;
|
||||
|
||||
/* Initialize test framework */
|
||||
state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO);
|
||||
if (!state) {
|
||||
return 1;
|
||||
}
|
||||
for (i = 1; i < argc;) {
|
||||
int consumed;
|
||||
|
||||
consumed = SDLTest_CommonArg(state, i);
|
||||
if (consumed == 0) {
|
||||
if (SDL_strcasecmp(argv[i], "--msaa") == 0) {
|
||||
++msaa;
|
||||
consumed = 1;
|
||||
} else {
|
||||
consumed = -1;
|
||||
}
|
||||
}
|
||||
if (consumed < 0) {
|
||||
static const char *options[] = { "[--msaa]", NULL };
|
||||
SDLTest_CommonLogUsage(state, argv[0], options);
|
||||
quit(1);
|
||||
}
|
||||
i += consumed;
|
||||
}
|
||||
|
||||
state->skip_renderer = 1;
|
||||
state->window_flags |= SDL_WINDOW_RESIZABLE;
|
||||
|
||||
if (!SDLTest_CommonInit(state)) {
|
||||
quit(2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
mode = SDL_GetCurrentDisplayMode(SDL_GetDisplayForWindow(state->windows[0]));
|
||||
SDL_Log("Screen bpp: %d\n", SDL_BITSPERPIXEL(mode->format));
|
||||
|
||||
init_render_state(msaa);
|
||||
|
||||
/* Main render loop */
|
||||
frames = 0;
|
||||
then = SDL_GetTicks();
|
||||
done = 0;
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_set_main_loop(loop, 0, 1);
|
||||
#else
|
||||
while (!done) {
|
||||
loop();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Print out some timing information */
|
||||
now = SDL_GetTicks();
|
||||
if (now > then) {
|
||||
SDL_Log("%2.2f frames per second\n",
|
||||
((double) frames * 1000) / (now - then));
|
||||
}
|
||||
#if !defined(__ANDROID__)
|
||||
quit(0);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
Reference in New Issue
Block a user