Vulkan Renderer (#9114)

This pull request adds an implementation of a Vulkan Render backend to SDL.  I have so far tested this primarily on Windows, but also smoke tested on Linux and macOS (MoltenVK).  I have not tried it yet on Android, but it should be usable there as well (sans any bugs I missed).  This began as a port of the SDL Direct3D12 Renderer, which is the closest thing to Vulkan as existed in the SDL codebase. The shaders are more or less identical (with the only differences being in descriptor bindings vs root descriptors).  The shaders are built using the HLSL frontend of glslang.

Everything in the code is pure Vulkan 1.0 (no extensions), with the exception of HDR support which requires the Vulkan instance extension `VK_EXT_swapchain_colorspace`.  The code could have been simplified considerably if I used dynamic rendering, push descriptors, extended dynamic state, and other modern Vulkan-isms, but I felt it was more important to make the code as vanilla Vulkan as possible so that it would run on any Vulkan implementation.

The main differences with the Direct3D12 renderer are:
* Having to manage renderpasses for performing clears.  There is likely some optimization that would still remain for more efficient use of TBDR hardware where there might be some unnecessary load/stores, but it does attempt to do clears using renderpasses.
* Constant buffer data couldn't be directly updated in the command buffer since I didn't want to rely on push descriptors, so there is a persistently mapped buffer with increasing offset per swapchain image where CB data gets written.
* Many more resources are dependent on the swapchain resizing due to i.e. Vulkan requiring the VkFramebuffer to reference the VkImageView of the swapchain, so there is a bit more code around handling that than was necessary in D3D12.
* For NV12/NV21 textures, rather than there being plane data in the texture itself, the UV data is placed in a separate `VkImage`/`VkImageView`.

I've verified that `testcolorspace` works with both sRGB and HDR linear.  I've tested `testoverlay` works with the various YUV/NV12/NV21 formats.  I've tested `testsprite`.  I've checked that window resizing and swapchain out-of-date handling when minimizing are working.  I've run through `testautomation` with the render tests.  I also have run several of the tests with Vulkan validation and synchronization validation.  Surely I will have missed some things, but I think it's in a good state to be merged and build out from here.
main
Dan Ginsburg 2024-02-22 17:58:11 -05:00 committed by GitHub
parent 2f1f55aeb1
commit cab20117e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 4723 additions and 4 deletions

View File

@ -335,6 +335,7 @@ dep_option(SDL_RENDER_D3D "Enable the Direct3D render driver" ON "SDL_R
dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;${APPLE}" OFF) dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;${APPLE}" OFF)
dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF) dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF)
dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF) dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
dep_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS} "SDL_VIDEO" OFF) dep_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS} "SDL_VIDEO" OFF)
dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF) dep_option(SDL_KMSDRM_SHARED "Dynamically load KMS DRM support" ON "SDL_KMSDRM" OFF)
@ -2007,6 +2008,9 @@ elseif(WINDOWS)
if(SDL_VULKAN) if(SDL_VULKAN)
set(SDL_VIDEO_VULKAN 1) set(SDL_VIDEO_VULKAN 1)
set(HAVE_VULKAN TRUE) set(HAVE_VULKAN TRUE)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
endif()
endif() endif()
endif() endif()
@ -2248,6 +2252,9 @@ elseif(APPLE)
if(SDL_VULKAN) if(SDL_VULKAN)
set(SDL_VIDEO_VULKAN 1) set(SDL_VIDEO_VULKAN 1)
set(HAVE_VULKAN TRUE) set(HAVE_VULKAN TRUE)
if(SDL_RENDER_VULKAN)
set(SDL_VIDEO_RENDER_VULKAN 1)
endif()
endif() endif()
if(SDL_METAL) if(SDL_METAL)
set(SDL_VIDEO_METAL 1) set(SDL_VIDEO_METAL 1)

View File

@ -725,6 +725,7 @@ macro(CheckVulkan)
if(SDL_VULKAN) if(SDL_VULKAN)
set(SDL_VIDEO_VULKAN 1) set(SDL_VIDEO_VULKAN 1)
set(HAVE_VULKAN TRUE) set(HAVE_VULKAN TRUE)
set(SDL_VIDEO_RENDER_VULKAN 1)
endif() endif()
endmacro() endmacro()

View File

@ -1736,6 +1736,18 @@ extern "C" {
*/ */
#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG" #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
/**
* A variable controlling whether to enable Vulkan Validation Layers
*
*
* This variable can be set to the following values:
* "0" - Disable Validation Layer use
* "1" - Enable Validation Layer use
*
* By default, SDL does not use Vulkan Validation Layers.
*/
#define SDL_HINT_RENDER_VULKAN_DEBUG "SDL_RENDER_VULKAN_DEBUG"
/** /**
* A variable specifying which render driver to use. * A variable specifying which render driver to use.
* *

View File

@ -639,6 +639,17 @@ extern DECLSPEC SDL_Texture *SDLCALL SDL_CreateTextureWithProperties(SDL_Rendere
* - `SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource associated * - `SDL_PROP_TEXTURE_D3D12_TEXTURE_V_POINTER`: the ID3D12Resource associated
* with the V plane of a YUV texture * with the V plane of a YUV texture
* *
* With the vulkan renderer:
*
* - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_POINTER`: the VkImage associated
* with the texture
* - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_U_POINTER`: the VkImage associated
* with the U plane of a YUV texture
* - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_V_POINTER`: the VkImage associated
* with the V plane of a YUV texture
* - `SDL_PROP_TEXTURE_VULKAN_TEXTURE_UV_POINTER`: the VkImage associated
* with the UV plane of a NV12/NV21 texture
*
* With the opengl renderer: * With the opengl renderer:
* *
* - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER`: the GLuint texture associated * - `SDL_PROP_TEXTURE_OPENGL_TEXTURE_NUMBER`: the GLuint texture associated
@ -701,6 +712,10 @@ extern DECLSPEC SDL_PropertiesID SDLCALL SDL_GetTextureProperties(SDL_Texture *t
#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER "SDL.texture.opengles2.texture_u" #define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_U_NUMBER "SDL.texture.opengles2.texture_u"
#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER "SDL.texture.opengles2.texture_v" #define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_V_NUMBER "SDL.texture.opengles2.texture_v"
#define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER "SDL.texture.opengles2.target" #define SDL_PROP_TEXTURE_OPENGLES2_TEXTURE_TARGET_NUMBER "SDL.texture.opengles2.target"
#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_POINTER "SDL.texture.vulkan.texture"
#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_U_POINTER "SDL.texture.vulkan.texture_u"
#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_V_POINTER "SDL.texture.vulkan.texture_v"
#define SDL_PROP_TEXTURE_VULKAN_TEXTURE_UV_POINTER "SDL.texture.vulkan.texture_uv"
/** /**
* Get the renderer that created an SDL_Texture. * Get the renderer that created an SDL_Texture.

View File

@ -412,6 +412,7 @@
#cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@ #cmakedefine SDL_VIDEO_RENDER_D3D11 @SDL_VIDEO_RENDER_D3D11@
#cmakedefine SDL_VIDEO_RENDER_D3D12 @SDL_VIDEO_RENDER_D3D12@ #cmakedefine SDL_VIDEO_RENDER_D3D12 @SDL_VIDEO_RENDER_D3D12@
#cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@ #cmakedefine SDL_VIDEO_RENDER_METAL @SDL_VIDEO_RENDER_METAL@
#cmakedefine SDL_VIDEO_RENDER_VULKAN @SDL_VIDEO_RENDER_VULKAN@
#cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@ #cmakedefine SDL_VIDEO_RENDER_OGL @SDL_VIDEO_RENDER_OGL@
#cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@ #cmakedefine SDL_VIDEO_RENDER_OGL_ES2 @SDL_VIDEO_RENDER_OGL_ES2@
#cmakedefine SDL_VIDEO_RENDER_PS2 @SDL_VIDEO_RENDER_PS2@ #cmakedefine SDL_VIDEO_RENDER_PS2 @SDL_VIDEO_RENDER_PS2@

View File

@ -223,6 +223,9 @@
#ifndef SDL_VIDEO_RENDER_VITA_GXM #ifndef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0 #define SDL_VIDEO_RENDER_VITA_GXM 0
#endif #endif
#ifndef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 0
#endif
#else /* define all as 0 */ #else /* define all as 0 */
#undef SDL_VIDEO_RENDER_SW #undef SDL_VIDEO_RENDER_SW
#define SDL_VIDEO_RENDER_SW 0 #define SDL_VIDEO_RENDER_SW 0
@ -244,6 +247,8 @@
#define SDL_VIDEO_RENDER_PSP 0 #define SDL_VIDEO_RENDER_PSP 0
#undef SDL_VIDEO_RENDER_VITA_GXM #undef SDL_VIDEO_RENDER_VITA_GXM
#define SDL_VIDEO_RENDER_VITA_GXM 0 #define SDL_VIDEO_RENDER_VITA_GXM 0
#undef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 0
#endif /* SDL_RENDER_DISABLED */ #endif /* SDL_RENDER_DISABLED */
#define SDL_HAS_RENDER_DRIVER \ #define SDL_HAS_RENDER_DRIVER \
@ -256,7 +261,8 @@
SDL_VIDEO_RENDER_OGL_ES2 | \ SDL_VIDEO_RENDER_OGL_ES2 | \
SDL_VIDEO_RENDER_PS2 | \ SDL_VIDEO_RENDER_PS2 | \
SDL_VIDEO_RENDER_PSP | \ SDL_VIDEO_RENDER_PSP | \
SDL_VIDEO_RENDER_VITA_GXM) SDL_VIDEO_RENDER_VITA_GXM | \
SDL_VIDEO_RENDER_VULKAN )
#if !defined(SDL_RENDER_DISABLED) && !SDL_HAS_RENDER_DRIVER #if !defined(SDL_RENDER_DISABLED) && !SDL_HAS_RENDER_DRIVER
#error SDL_RENDER enabled without any backend drivers. #error SDL_RENDER enabled without any backend drivers.

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) #if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN)
#include "SDL_d3dmath.h" #include "SDL_d3dmath.h"

View File

@ -20,7 +20,7 @@
*/ */
#include "SDL_internal.h" #include "SDL_internal.h"
#if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) #if (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN)
/* Set up for C function definitions, even when using C++ */ /* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus #ifdef __cplusplus
@ -78,4 +78,4 @@ Float4X4 MatrixRotationZ(float r);
} }
#endif #endif
#endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12) */ #endif /* (SDL_VIDEO_RENDER_D3D || SDL_VIDEO_RENDER_D3D11 || SDL_VIDEO_RENDER_D3D12 || SDL_VIDEO_RENDER_VULKAN)*/

View File

@ -116,6 +116,9 @@ static const SDL_RenderDriver *render_drivers[] = {
#if SDL_VIDEO_RENDER_VITA_GXM #if SDL_VIDEO_RENDER_VITA_GXM
&VITA_GXM_RenderDriver, &VITA_GXM_RenderDriver,
#endif #endif
#if SDL_VIDEO_RENDER_VULKAN
&VULKAN_RenderDriver,
#endif
#if SDL_VIDEO_RENDER_SW #if SDL_VIDEO_RENDER_SW
&SW_RenderDriver &SW_RenderDriver
#endif #endif

View File

@ -305,6 +305,7 @@ extern SDL_RenderDriver D3D12_RenderDriver;
extern SDL_RenderDriver GL_RenderDriver; extern SDL_RenderDriver GL_RenderDriver;
extern SDL_RenderDriver GLES2_RenderDriver; extern SDL_RenderDriver GLES2_RenderDriver;
extern SDL_RenderDriver METAL_RenderDriver; extern SDL_RenderDriver METAL_RenderDriver;
extern SDL_RenderDriver VULKAN_RenderDriver;
extern SDL_RenderDriver PS2_RenderDriver; extern SDL_RenderDriver PS2_RenderDriver;
extern SDL_RenderDriver PSP_RenderDriver; extern SDL_RenderDriver PSP_RenderDriver;
extern SDL_RenderDriver SW_RenderDriver; extern SDL_RenderDriver SW_RenderDriver;

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 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, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_VULKAN
#include "SDL_shaders_vulkan.h"
/* The shaders here were compiled with compile_shaders.bat */
#include "VULKAN_PixelShader_Colors.h"
#include "VULKAN_PixelShader_Textures.h"
#include "VULKAN_PixelShader_Advanced.h"
#include "VULKAN_VertexShader.h"
static struct
{
const void *ps_shader_data;
size_t ps_shader_size;
const void *vs_shader_data;
size_t vs_shader_size;
} VULKAN_shaders[NUM_SHADERS] = {
{ VULKAN_PixelShader_Colors, sizeof(VULKAN_PixelShader_Colors),
VULKAN_VertexShader, sizeof(VULKAN_VertexShader) },
{ VULKAN_PixelShader_Textures, sizeof(VULKAN_PixelShader_Textures),
VULKAN_VertexShader, sizeof(VULKAN_VertexShader) },
{ VULKAN_PixelShader_Advanced, sizeof(VULKAN_PixelShader_Advanced),
VULKAN_VertexShader, sizeof(VULKAN_VertexShader) },
};
void VULKAN_GetVertexShader(VULKAN_Shader shader, const uint32_t **outBytecode, size_t *outSize)
{
*outBytecode = VULKAN_shaders[shader].vs_shader_data;
*outSize = VULKAN_shaders[shader].vs_shader_size;
}
void VULKAN_GetPixelShader(VULKAN_Shader shader, const uint32_t **outBytecode, size_t *outSize)
{
*outBytecode = VULKAN_shaders[shader].ps_shader_data;
*outSize = VULKAN_shaders[shader].ps_shader_size;
}
#endif /* SDL_VIDEO_RENDER_VULKAN */

View File

@ -0,0 +1,44 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2024 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, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
#include "SDL_internal.h"
/* Vulkan shader implementation */
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
typedef enum
{
SHADER_SOLID,
SHADER_RGB,
SHADER_ADVANCED,
NUM_SHADERS
} VULKAN_Shader;
extern void VULKAN_GetVertexShader(VULKAN_Shader shader, const uint32_t **outBytecode, size_t *outSize);
extern void VULKAN_GetPixelShader(VULKAN_Shader shader, const uint32_t **outBytecode, size_t *outSize);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,373 @@
// 1113.1.1
#pragma once
const uint32_t VULKAN_PixelShader_Advanced[] = {
0x07230203,0x00010000,0x0008000b,0x000005e4,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000275,0x00000278,0x0000027c,
0x00030010,0x00000004,0x00000007,0x00030003,0x00000005,0x000001f4,0x00040005,0x00000004,
0x6e69616d,0x00000000,0x00050005,0x00000075,0x736e6f43,0x746e6174,0x00000073,0x00070006,
0x00000075,0x00000000,0x47526373,0x756f5f42,0x74757074,0x00000000,0x00070006,0x00000075,
0x00000001,0x74786574,0x5f657275,0x65707974,0x00000000,0x00060006,0x00000075,0x00000002,
0x75706e69,0x79745f74,0x00006570,0x00060006,0x00000075,0x00000003,0x6f6c6f63,0x63735f72,
0x00656c61,0x00070006,0x00000075,0x00000004,0x656e6f74,0x5f70616d,0x6874656d,0x0000646f,
0x00070006,0x00000075,0x00000005,0x656e6f74,0x5f70616d,0x74636166,0x0031726f,0x00070006,
0x00000075,0x00000006,0x656e6f74,0x5f70616d,0x74636166,0x0032726f,0x00070006,0x00000075,
0x00000007,0x5f726473,0x74696877,0x6f705f65,0x00746e69,0x00050006,0x00000075,0x00000008,
0x66666f59,0x00746573,0x00050006,0x00000075,0x00000009,0x656f6352,0x00006666,0x00050006,
0x00000075,0x0000000a,0x656f6347,0x00006666,0x00050006,0x00000075,0x0000000b,0x656f6342,
0x00006666,0x00030005,0x00000077,0x00000000,0x00050005,0x000000f2,0x74786574,0x30657275,
0x00000000,0x00050005,0x000000f6,0x706d6173,0x3072656c,0x00000000,0x00050005,0x0000010d,
0x74786574,0x31657275,0x00000000,0x00050005,0x00000182,0x74786574,0x32657275,0x00000000,
0x00050005,0x00000275,0x75706e69,0x65742e74,0x00000078,0x00050005,0x00000278,0x75706e69,
0x6f632e74,0x00726f6c,0x00070005,0x0000027c,0x746e6540,0x6f507972,0x4f746e69,0x75707475,
0x00000074,0x00050048,0x00000075,0x00000000,0x00000023,0x00000000,0x00050048,0x00000075,
0x00000001,0x00000023,0x00000004,0x00050048,0x00000075,0x00000002,0x00000023,0x00000008,
0x00050048,0x00000075,0x00000003,0x00000023,0x0000000c,0x00050048,0x00000075,0x00000004,
0x00000023,0x00000010,0x00050048,0x00000075,0x00000005,0x00000023,0x00000014,0x00050048,
0x00000075,0x00000006,0x00000023,0x00000018,0x00050048,0x00000075,0x00000007,0x00000023,
0x0000001c,0x00050048,0x00000075,0x00000008,0x00000023,0x00000020,0x00050048,0x00000075,
0x00000009,0x00000023,0x00000030,0x00050048,0x00000075,0x0000000a,0x00000023,0x00000040,
0x00050048,0x00000075,0x0000000b,0x00000023,0x00000050,0x00030047,0x00000075,0x00000002,
0x00040047,0x00000077,0x00000022,0x00000000,0x00040047,0x00000077,0x00000021,0x00000004,
0x00040047,0x000000f2,0x00000022,0x00000000,0x00040047,0x000000f2,0x00000021,0x00000001,
0x00040047,0x000000f6,0x00000022,0x00000000,0x00040047,0x000000f6,0x00000021,0x00000000,
0x00040047,0x0000010d,0x00000022,0x00000000,0x00040047,0x0000010d,0x00000021,0x00000002,
0x00040047,0x00000182,0x00000022,0x00000000,0x00040047,0x00000182,0x00000021,0x00000003,
0x00040047,0x00000275,0x0000001e,0x00000000,0x00040047,0x00000278,0x0000001e,0x00000001,
0x00040047,0x0000027c,0x0000001e,0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,
0x00000002,0x00030016,0x00000006,0x00000020,0x00040017,0x0000000f,0x00000006,0x00000003,
0x00040017,0x00000018,0x00000006,0x00000004,0x00040017,0x00000019,0x00000006,0x00000002,
0x0004002b,0x00000006,0x00000032,0x3d25aee6,0x00020014,0x00000033,0x0004002b,0x00000006,
0x00000038,0x414eb852,0x0004002b,0x00000006,0x0000003c,0x3d6147ae,0x0004002b,0x00000006,
0x0000003f,0x3f870a3d,0x0004002b,0x00000006,0x00000041,0x4019999a,0x0004002b,0x00000006,
0x00000047,0x3b4d2e1c,0x0004002b,0x00000006,0x00000050,0x3ed55555,0x0004002b,0x00000006,
0x0000005a,0x3c4fcdac,0x0006002c,0x0000000f,0x0000005b,0x0000005a,0x0000005a,0x0000005a,
0x0004002b,0x00000006,0x0000005d,0x3f560000,0x0004002b,0x00000006,0x00000060,0x00000000,
0x0006002c,0x0000000f,0x00000061,0x00000060,0x00000060,0x00000060,0x0004002b,0x00000006,
0x00000064,0x4196d000,0x0004002b,0x00000006,0x00000065,0x41958000,0x0004002b,0x00000006,
0x0000006c,0x461c4000,0x0004002b,0x00000006,0x00000071,0x40c8e06b,0x0006002c,0x0000000f,
0x00000072,0x00000071,0x00000071,0x00000071,0x000e001e,0x00000075,0x00000006,0x00000006,
0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000018,0x00000018,
0x00000018,0x00000018,0x00040020,0x00000076,0x00000002,0x00000075,0x0004003b,0x00000076,
0x00000077,0x00000002,0x00040015,0x00000078,0x00000020,0x00000001,0x0004002b,0x00000078,
0x00000079,0x00000007,0x00040020,0x0000007a,0x00000002,0x00000006,0x0004002b,0x00000078,
0x00000081,0x00000004,0x0004002b,0x00000006,0x00000084,0x3f800000,0x0004002b,0x00000078,
0x00000088,0x00000005,0x0004002b,0x00000006,0x00000090,0x40000000,0x0004002b,0x00000078,
0x00000094,0x00000002,0x00040018,0x0000009b,0x0000000f,0x00000003,0x0004002b,0x00000006,
0x0000009c,0x3f209d8c,0x0004002b,0x00000006,0x0000009d,0x3ea897c8,0x0004002b,0x00000006,
0x0000009e,0x3d3168f9,0x0006002c,0x0000000f,0x0000009f,0x0000009c,0x0000009d,0x0000009e,
0x0004002b,0x00000006,0x000000a0,0x3d8d82ba,0x0004002b,0x00000006,0x000000a1,0x3f6b670a,
0x0004002b,0x00000006,0x000000a2,0x3c3a27af,0x0006002c,0x0000000f,0x000000a3,0x000000a0,
0x000000a1,0x000000a2,0x0004002b,0x00000006,0x000000a4,0x3c86466b,0x0004002b,0x00000006,
0x000000a5,0x3db44029,0x0004002b,0x00000006,0x000000a6,0x3f6545b7,0x0006002c,0x0000000f,
0x000000a7,0x000000a4,0x000000a5,0x000000a6,0x0006002c,0x0000009b,0x000000a8,0x0000009f,
0x000000a3,0x000000a7,0x0004002b,0x00000078,0x000000c1,0x00000006,0x0004002b,0x00000006,
0x000000d1,0x3fd48b22,0x0004002b,0x00000006,0x000000d2,0xbf1670a0,0x0004002b,0x00000006,
0x000000d3,0xbd952d23,0x0006002c,0x0000000f,0x000000d4,0x000000d1,0x000000d2,0x000000d3,
0x0004002b,0x00000006,0x000000d5,0xbdff127f,0x0004002b,0x00000006,0x000000d6,0x3f9102b4,
0x0004002b,0x00000006,0x000000d7,0xbc08c60d,0x0006002c,0x0000000f,0x000000d8,0x000000d5,
0x000000d6,0x000000d7,0x0004002b,0x00000006,0x000000d9,0xbc94b7b3,0x0004002b,0x00000006,
0x000000da,0xbdce05cd,0x0004002b,0x00000006,0x000000db,0x3f8f333c,0x0006002c,0x0000000f,
0x000000dc,0x000000d9,0x000000da,0x000000db,0x0006002c,0x0000009b,0x000000dd,0x000000d4,
0x000000d8,0x000000dc,0x0004002b,0x00000078,0x000000e2,0x00000001,0x0007002c,0x00000018,
0x000000e9,0x00000084,0x00000084,0x00000084,0x00000084,0x00090019,0x000000f0,0x00000006,
0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x00040020,0x000000f1,
0x00000000,0x000000f0,0x0004003b,0x000000f1,0x000000f2,0x00000000,0x0002001a,0x000000f4,
0x00040020,0x000000f5,0x00000000,0x000000f4,0x0004003b,0x000000f5,0x000000f6,0x00000000,
0x0003001b,0x000000f8,0x000000f0,0x0004003b,0x000000f1,0x0000010d,0x00000000,0x0004002b,
0x00000078,0x00000119,0x00000008,0x00040020,0x0000011a,0x00000002,0x00000018,0x0004002b,
0x00000078,0x00000121,0x00000009,0x0004002b,0x00000078,0x00000128,0x0000000a,0x0004002b,
0x00000078,0x0000012f,0x0000000b,0x0004002b,0x00000006,0x0000013a,0x40400000,0x0004002b,
0x00000006,0x0000016d,0x40800000,0x0004003b,0x000000f1,0x00000182,0x00000000,0x0004002b,
0x00000078,0x000001ae,0x00000003,0x0004002b,0x00000078,0x000001be,0x00000000,0x00040020,
0x00000270,0x00000001,0x00000018,0x00040020,0x00000274,0x00000001,0x00000019,0x0004003b,
0x00000274,0x00000275,0x00000001,0x0004003b,0x00000270,0x00000278,0x00000001,0x00040020,
0x0000027b,0x00000003,0x00000018,0x0004003b,0x0000027b,0x0000027c,0x00000003,0x0006002c,
0x0000000f,0x0000059a,0x0000005d,0x0000005d,0x0000005d,0x0006002c,0x0000000f,0x0000059b,
0x00000064,0x00000064,0x00000064,0x0006002c,0x0000000f,0x000005a0,0x00000084,0x00000084,
0x00000084,0x0004002b,0x00000006,0x000005a6,0x3f72a76f,0x0004002b,0x00000006,0x000005a7,
0x3d9e8391,0x0007002c,0x00000018,0x000005a9,0x00000084,0x00000060,0x00000060,0x00000084,
0x0004002b,0x00000006,0x000005aa,0xbd6147ae,0x00030001,0x00000018,0x000005e3,0x00050036,
0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003d,0x00000019,
0x00000276,0x00000275,0x0004003d,0x00000018,0x00000279,0x00000278,0x00050041,0x0000007a,
0x000002f9,0x00000077,0x000000e2,0x0004003d,0x00000006,0x000002fa,0x000002f9,0x000500b4,
0x00000033,0x000002fb,0x000002fa,0x00000060,0x000300f7,0x000003a6,0x00000000,0x000400fa,
0x000002fb,0x000002fc,0x000002fd,0x000200f8,0x000002fc,0x000200f9,0x000003a6,0x000200f8,
0x000002fd,0x00050041,0x0000007a,0x000002fe,0x00000077,0x000000e2,0x0004003d,0x00000006,
0x000002ff,0x000002fe,0x000500b4,0x00000033,0x00000300,0x000002ff,0x00000084,0x000300f7,
0x000003a5,0x00000000,0x000400fa,0x00000300,0x00000301,0x00000308,0x000200f8,0x00000301,
0x0004003d,0x000000f0,0x00000302,0x000000f2,0x0004003d,0x000000f4,0x00000303,0x000000f6,
0x00050056,0x000000f8,0x00000304,0x00000302,0x00000303,0x00050057,0x00000018,0x00000307,
0x00000304,0x00000276,0x000200f9,0x000003a5,0x000200f8,0x00000308,0x00050041,0x0000007a,
0x00000309,0x00000077,0x000000e2,0x0004003d,0x00000006,0x0000030a,0x00000309,0x000500b4,
0x00000033,0x0000030b,0x0000030a,0x00000090,0x000300f7,0x000003a4,0x00000000,0x000400fa,
0x0000030b,0x0000030c,0x00000338,0x000200f8,0x0000030c,0x0004003d,0x000000f0,0x0000030d,
0x000000f2,0x0004003d,0x000000f4,0x0000030e,0x000000f6,0x00050056,0x000000f8,0x0000030f,
0x0000030d,0x0000030e,0x00050057,0x00000018,0x00000312,0x0000030f,0x00000276,0x00050051,
0x00000006,0x00000313,0x00000312,0x00000000,0x0004003d,0x000000f0,0x00000315,0x0000010d,
0x0004003d,0x000000f4,0x00000316,0x000000f6,0x00050056,0x000000f8,0x00000317,0x00000315,
0x00000316,0x00050057,0x00000018,0x0000031a,0x00000317,0x00000276,0x00050051,0x00000006,
0x0000031d,0x0000031a,0x00000000,0x00050051,0x00000006,0x0000031f,0x0000031a,0x00000001,
0x00060050,0x0000000f,0x00000598,0x00000313,0x0000031d,0x0000031f,0x00050041,0x0000011a,
0x00000320,0x00000077,0x00000119,0x0004003d,0x00000018,0x00000321,0x00000320,0x0008004f,
0x0000000f,0x00000322,0x00000321,0x00000321,0x00000000,0x00000001,0x00000002,0x00050081,
0x0000000f,0x00000324,0x00000598,0x00000322,0x00050041,0x0000011a,0x00000326,0x00000077,
0x00000121,0x0004003d,0x00000018,0x00000327,0x00000326,0x0008004f,0x0000000f,0x00000328,
0x00000327,0x00000327,0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,0x00000329,
0x00000324,0x00000328,0x00050041,0x0000011a,0x0000032c,0x00000077,0x00000128,0x0004003d,
0x00000018,0x0000032d,0x0000032c,0x0008004f,0x0000000f,0x0000032e,0x0000032d,0x0000032d,
0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,0x0000032f,0x00000324,0x0000032e,
0x00050041,0x0000011a,0x00000332,0x00000077,0x0000012f,0x0004003d,0x00000018,0x00000333,
0x00000332,0x0008004f,0x0000000f,0x00000334,0x00000333,0x00000333,0x00000000,0x00000001,
0x00000002,0x00050094,0x00000006,0x00000335,0x00000324,0x00000334,0x00070050,0x00000018,
0x00000599,0x00000329,0x0000032f,0x00000335,0x00000084,0x000200f9,0x000003a4,0x000200f8,
0x00000338,0x00050041,0x0000007a,0x00000339,0x00000077,0x000000e2,0x0004003d,0x00000006,
0x0000033a,0x00000339,0x000500b4,0x00000033,0x0000033b,0x0000033a,0x0000013a,0x000300f7,
0x000003a3,0x00000000,0x000400fa,0x0000033b,0x0000033c,0x00000368,0x000200f8,0x0000033c,
0x0004003d,0x000000f0,0x0000033d,0x000000f2,0x0004003d,0x000000f4,0x0000033e,0x000000f6,
0x00050056,0x000000f8,0x0000033f,0x0000033d,0x0000033e,0x00050057,0x00000018,0x00000342,
0x0000033f,0x00000276,0x00050051,0x00000006,0x00000343,0x00000342,0x00000000,0x0004003d,
0x000000f0,0x00000345,0x0000010d,0x0004003d,0x000000f4,0x00000346,0x000000f6,0x00050056,
0x000000f8,0x00000347,0x00000345,0x00000346,0x00050057,0x00000018,0x0000034a,0x00000347,
0x00000276,0x00050051,0x00000006,0x0000034d,0x0000034a,0x00000001,0x00050051,0x00000006,
0x0000034f,0x0000034a,0x00000000,0x00060050,0x0000000f,0x00000596,0x00000343,0x0000034d,
0x0000034f,0x00050041,0x0000011a,0x00000350,0x00000077,0x00000119,0x0004003d,0x00000018,
0x00000351,0x00000350,0x0008004f,0x0000000f,0x00000352,0x00000351,0x00000351,0x00000000,
0x00000001,0x00000002,0x00050081,0x0000000f,0x00000354,0x00000596,0x00000352,0x00050041,
0x0000011a,0x00000356,0x00000077,0x00000121,0x0004003d,0x00000018,0x00000357,0x00000356,
0x0008004f,0x0000000f,0x00000358,0x00000357,0x00000357,0x00000000,0x00000001,0x00000002,
0x00050094,0x00000006,0x00000359,0x00000354,0x00000358,0x00050041,0x0000011a,0x0000035c,
0x00000077,0x00000128,0x0004003d,0x00000018,0x0000035d,0x0000035c,0x0008004f,0x0000000f,
0x0000035e,0x0000035d,0x0000035d,0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,
0x0000035f,0x00000354,0x0000035e,0x00050041,0x0000011a,0x00000362,0x00000077,0x0000012f,
0x0004003d,0x00000018,0x00000363,0x00000362,0x0008004f,0x0000000f,0x00000364,0x00000363,
0x00000363,0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,0x00000365,0x00000354,
0x00000364,0x00070050,0x00000018,0x00000597,0x00000359,0x0000035f,0x00000365,0x00000084,
0x000200f9,0x000003a3,0x000200f8,0x00000368,0x00050041,0x0000007a,0x00000369,0x00000077,
0x000000e2,0x0004003d,0x00000006,0x0000036a,0x00000369,0x000500b4,0x00000033,0x0000036b,
0x0000036a,0x0000016d,0x000300f7,0x000003a2,0x00000000,0x000400fa,0x0000036b,0x0000036c,
0x0000039d,0x000200f8,0x0000036c,0x0004003d,0x000000f0,0x0000036d,0x000000f2,0x0004003d,
0x000000f4,0x0000036e,0x000000f6,0x00050056,0x000000f8,0x0000036f,0x0000036d,0x0000036e,
0x00050057,0x00000018,0x00000372,0x0000036f,0x00000276,0x00050051,0x00000006,0x00000373,
0x00000372,0x00000000,0x0004003d,0x000000f0,0x00000375,0x0000010d,0x0004003d,0x000000f4,
0x00000376,0x000000f6,0x00050056,0x000000f8,0x00000377,0x00000375,0x00000376,0x00050057,
0x00000018,0x0000037a,0x00000377,0x00000276,0x00050051,0x00000006,0x0000037b,0x0000037a,
0x00000000,0x0004003d,0x000000f0,0x0000037d,0x00000182,0x0004003d,0x000000f4,0x0000037e,
0x000000f6,0x00050056,0x000000f8,0x0000037f,0x0000037d,0x0000037e,0x00050057,0x00000018,
0x00000382,0x0000037f,0x00000276,0x00050051,0x00000006,0x00000383,0x00000382,0x00000000,
0x00060050,0x0000000f,0x00000594,0x00000373,0x0000037b,0x00000383,0x00050041,0x0000011a,
0x00000385,0x00000077,0x00000119,0x0004003d,0x00000018,0x00000386,0x00000385,0x0008004f,
0x0000000f,0x00000387,0x00000386,0x00000386,0x00000000,0x00000001,0x00000002,0x00050081,
0x0000000f,0x00000389,0x00000594,0x00000387,0x00050041,0x0000011a,0x0000038b,0x00000077,
0x00000121,0x0004003d,0x00000018,0x0000038c,0x0000038b,0x0008004f,0x0000000f,0x0000038d,
0x0000038c,0x0000038c,0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,0x0000038e,
0x00000389,0x0000038d,0x00050041,0x0000011a,0x00000391,0x00000077,0x00000128,0x0004003d,
0x00000018,0x00000392,0x00000391,0x0008004f,0x0000000f,0x00000393,0x00000392,0x00000392,
0x00000000,0x00000001,0x00000002,0x00050094,0x00000006,0x00000394,0x00000389,0x00000393,
0x00050041,0x0000011a,0x00000397,0x00000077,0x0000012f,0x0004003d,0x00000018,0x00000398,
0x00000397,0x0008004f,0x0000000f,0x00000399,0x00000398,0x00000398,0x00000000,0x00000001,
0x00000002,0x00050094,0x00000006,0x0000039a,0x00000389,0x00000399,0x00070050,0x00000018,
0x00000595,0x0000038e,0x00000394,0x0000039a,0x00000084,0x000200f9,0x000003a2,0x000200f8,
0x0000039d,0x000200f9,0x000003a2,0x000200f8,0x000003a2,0x000700f5,0x00000018,0x000005af,
0x00000595,0x0000036c,0x000005a9,0x0000039d,0x000200f9,0x000003a3,0x000200f8,0x000003a3,
0x000700f5,0x00000018,0x000005ae,0x00000597,0x0000033c,0x000005af,0x000003a2,0x000200f9,
0x000003a4,0x000200f8,0x000003a4,0x000700f5,0x00000018,0x000005ad,0x00000599,0x0000030c,
0x000005ae,0x000003a3,0x000200f9,0x000003a5,0x000200f8,0x000003a5,0x000700f5,0x00000018,
0x000005ac,0x00000307,0x00000301,0x000005ad,0x000003a4,0x000200f9,0x000003a6,0x000200f8,
0x000003a6,0x000700f5,0x00000018,0x000005ab,0x000000e9,0x000002fc,0x000005ac,0x000003a5,
0x00050041,0x0000007a,0x00000292,0x00000077,0x00000094,0x0004003d,0x00000006,0x00000293,
0x00000292,0x000500b4,0x00000033,0x00000294,0x00000293,0x0000013a,0x000300f7,0x0000029f,
0x00000000,0x000400fa,0x00000294,0x00000295,0x0000029f,0x000200f8,0x00000295,0x0008004f,
0x0000000f,0x00000297,0x000005ab,0x000005ab,0x00000000,0x00000001,0x00000002,0x0006000c,
0x0000000f,0x000003ad,0x00000001,0x00000004,0x00000297,0x0007000c,0x0000000f,0x000003ae,
0x00000001,0x0000001a,0x000003ad,0x0000005b,0x00050083,0x0000000f,0x000003b0,0x000003ae,
0x0000059a,0x0007000c,0x0000000f,0x000003b1,0x00000001,0x00000028,0x000003b0,0x00000061,
0x0006000c,0x0000000f,0x000003b3,0x00000001,0x00000004,0x00000297,0x0007000c,0x0000000f,
0x000003b4,0x00000001,0x0000001a,0x000003b3,0x0000005b,0x0005008e,0x0000000f,0x000003b5,
0x000003b4,0x00000065,0x00050083,0x0000000f,0x000003b7,0x0000059b,0x000003b5,0x00050088,
0x0000000f,0x000003ba,0x000003b1,0x000003b7,0x0006000c,0x0000000f,0x000003bb,0x00000001,
0x00000004,0x000003ba,0x0007000c,0x0000000f,0x000003bc,0x00000001,0x0000001a,0x000003bb,
0x00000072,0x0005008e,0x0000000f,0x000003bd,0x000003bc,0x0000006c,0x00050041,0x0000007a,
0x000003be,0x00000077,0x00000079,0x0004003d,0x00000006,0x000003bf,0x000003be,0x00060050,
0x0000000f,0x000003c0,0x000003bf,0x000003bf,0x000003bf,0x00050088,0x0000000f,0x000003c1,
0x000003bd,0x000003c0,0x00050051,0x00000006,0x0000029a,0x000003c1,0x00000000,0x00060052,
0x00000018,0x00000540,0x0000029a,0x000005ab,0x00000000,0x00050051,0x00000006,0x0000029c,
0x000003c1,0x00000001,0x00060052,0x00000018,0x00000542,0x0000029c,0x00000540,0x00000001,
0x00050051,0x00000006,0x0000029e,0x000003c1,0x00000002,0x00060052,0x00000018,0x00000544,
0x0000029e,0x00000542,0x00000002,0x000200f9,0x0000029f,0x000200f8,0x0000029f,0x000700f5,
0x00000018,0x000005b0,0x000005ab,0x000003a6,0x00000544,0x00000295,0x00050041,0x0000007a,
0x000002a0,0x00000077,0x00000081,0x0004003d,0x00000006,0x000002a1,0x000002a0,0x000500b7,
0x00000033,0x000002a2,0x000002a1,0x00000060,0x000300f7,0x000002ad,0x00000000,0x000400fa,
0x000002a2,0x000002a3,0x000002ad,0x000200f8,0x000002a3,0x0008004f,0x0000000f,0x000002a5,
0x000005b0,0x000005b0,0x00000000,0x00000001,0x00000002,0x00050041,0x0000007a,0x000003c6,
0x00000077,0x00000081,0x0004003d,0x00000006,0x000003c7,0x000003c6,0x000500b4,0x00000033,
0x000003c8,0x000003c7,0x00000084,0x000300f7,0x000003fc,0x00000000,0x000400fa,0x000003c8,
0x000003c9,0x000003ce,0x000200f8,0x000003c9,0x00050041,0x0000007a,0x000003ca,0x00000077,
0x00000088,0x0004003d,0x00000006,0x000003cb,0x000003ca,0x0005008e,0x0000000f,0x000003cd,
0x000002a5,0x000003cb,0x000200f9,0x000003fc,0x000200f8,0x000003ce,0x00050041,0x0000007a,
0x000003cf,0x00000077,0x00000081,0x0004003d,0x00000006,0x000003d0,0x000003cf,0x000500b4,
0x00000033,0x000003d1,0x000003d0,0x00000090,0x000300f7,0x000003fb,0x00000000,0x000400fa,
0x000003d1,0x000003d2,0x000003fb,0x000200f8,0x000003d2,0x00050041,0x0000007a,0x000003d3,
0x00000077,0x00000094,0x0004003d,0x00000006,0x000003d4,0x000003d3,0x000500b4,0x00000033,
0x000003d5,0x000003d4,0x00000090,0x000300f7,0x000003d9,0x00000000,0x000400fa,0x000003d5,
0x000003d6,0x000003d9,0x000200f8,0x000003d6,0x00050090,0x0000000f,0x000003d8,0x000002a5,
0x000000a8,0x000200f9,0x000003d9,0x000200f8,0x000003d9,0x000700f5,0x0000000f,0x000005b1,
0x000002a5,0x000003d2,0x000003d8,0x000003d6,0x00050051,0x00000006,0x000003db,0x000005b1,
0x00000000,0x00050051,0x00000006,0x000003dd,0x000005b1,0x00000001,0x00050051,0x00000006,
0x000003df,0x000005b1,0x00000002,0x0007000c,0x00000006,0x000003e0,0x00000001,0x00000028,
0x000003dd,0x000003df,0x0007000c,0x00000006,0x000003e1,0x00000001,0x00000028,0x000003db,
0x000003e0,0x000500ba,0x00000033,0x000003e3,0x000003e1,0x00000060,0x000300f7,0x000003f3,
0x00000000,0x000400fa,0x000003e3,0x000003e4,0x000003f3,0x000200f8,0x000003e4,0x00050041,
0x0000007a,0x000003e5,0x00000077,0x00000088,0x0004003d,0x00000006,0x000003e6,0x000003e5,
0x0008000c,0x00000006,0x000003e9,0x00000001,0x00000032,0x000003e6,0x000003e1,0x00000084,
0x00050041,0x0000007a,0x000003ea,0x00000077,0x000000c1,0x0004003d,0x00000006,0x000003eb,
0x000003ea,0x0008000c,0x00000006,0x000003ee,0x00000001,0x00000032,0x000003eb,0x000003e1,
0x00000084,0x00050088,0x00000006,0x000003ef,0x000003e9,0x000003ee,0x0005008e,0x0000000f,
0x000003f2,0x000005b1,0x000003ef,0x000200f9,0x000003f3,0x000200f8,0x000003f3,0x000700f5,
0x0000000f,0x000005b2,0x000005b1,0x000003d9,0x000003f2,0x000003e4,0x00050041,0x0000007a,
0x000003f4,0x00000077,0x00000094,0x0004003d,0x00000006,0x000003f5,0x000003f4,0x000500b4,
0x00000033,0x000003f6,0x000003f5,0x00000090,0x000300f7,0x000003fa,0x00000000,0x000400fa,
0x000003f6,0x000003f7,0x000003fa,0x000200f8,0x000003f7,0x00050090,0x0000000f,0x000003f9,
0x000005b2,0x000000dd,0x000200f9,0x000003fa,0x000200f8,0x000003fa,0x000700f5,0x0000000f,
0x000005b5,0x000005b2,0x000003f3,0x000003f9,0x000003f7,0x000200f9,0x000003fb,0x000200f8,
0x000003fb,0x000700f5,0x0000000f,0x000005b4,0x000002a5,0x000003ce,0x000005b5,0x000003fa,
0x000200f9,0x000003fc,0x000200f8,0x000003fc,0x000700f5,0x0000000f,0x000005b3,0x000003cd,
0x000003c9,0x000005b4,0x000003fb,0x00050051,0x00000006,0x000002a8,0x000005b3,0x00000000,
0x00060052,0x00000018,0x00000549,0x000002a8,0x000005b0,0x00000000,0x00050051,0x00000006,
0x000002aa,0x000005b3,0x00000001,0x00060052,0x00000018,0x0000054b,0x000002aa,0x00000549,
0x00000001,0x00050051,0x00000006,0x000002ac,0x000005b3,0x00000002,0x00060052,0x00000018,
0x0000054d,0x000002ac,0x0000054b,0x00000002,0x000200f9,0x000002ad,0x000200f8,0x000002ad,
0x000700f5,0x00000018,0x000005bb,0x000005b0,0x0000029f,0x0000054d,0x000003fc,0x00050041,
0x0000007a,0x000002ae,0x00000077,0x00000094,0x0004003d,0x00000006,0x000002af,0x000002ae,
0x000500b4,0x00000033,0x000002b0,0x000002af,0x00000084,0x000300f7,0x000002ee,0x00000000,
0x000400fa,0x000002b0,0x000002b1,0x000002be,0x000200f8,0x000002b1,0x0008004f,0x0000000f,
0x000002b3,0x000005bb,0x000005bb,0x00000000,0x00000001,0x00000002,0x00050041,0x0000007a,
0x00000404,0x00000077,0x000001be,0x0004003d,0x00000006,0x00000405,0x00000404,0x000500b7,
0x00000033,0x00000406,0x00000405,0x00000060,0x000300f7,0x00000414,0x00000000,0x000400fa,
0x00000406,0x00000407,0x00000414,0x000200f8,0x00000407,0x00050051,0x00000006,0x00000409,
0x000005bb,0x00000000,0x000500bc,0x00000033,0x0000041d,0x00000409,0x00000032,0x000300f7,
0x00000427,0x00000000,0x000400fa,0x0000041d,0x0000041e,0x00000421,0x000200f8,0x0000041e,
0x00050085,0x00000006,0x00000420,0x00000409,0x000005a7,0x000200f9,0x00000427,0x000200f8,
0x00000421,0x00050081,0x00000006,0x00000423,0x00000409,0x0000003c,0x0006000c,0x00000006,
0x00000424,0x00000001,0x00000004,0x00000423,0x00050085,0x00000006,0x00000425,0x00000424,
0x000005a6,0x0007000c,0x00000006,0x00000426,0x00000001,0x0000001a,0x00000425,0x00000041,
0x000200f9,0x00000427,0x000200f8,0x00000427,0x000700f5,0x00000006,0x000005d2,0x00000420,
0x0000041e,0x00000426,0x00000421,0x00050051,0x00000006,0x0000040d,0x000005bb,0x00000001,
0x000500bc,0x00000033,0x0000042c,0x0000040d,0x00000032,0x000300f7,0x00000436,0x00000000,
0x000400fa,0x0000042c,0x0000042d,0x00000430,0x000200f8,0x0000042d,0x00050085,0x00000006,
0x0000042f,0x0000040d,0x000005a7,0x000200f9,0x00000436,0x000200f8,0x00000430,0x00050081,
0x00000006,0x00000432,0x0000040d,0x0000003c,0x0006000c,0x00000006,0x00000433,0x00000001,
0x00000004,0x00000432,0x00050085,0x00000006,0x00000434,0x00000433,0x000005a6,0x0007000c,
0x00000006,0x00000435,0x00000001,0x0000001a,0x00000434,0x00000041,0x000200f9,0x00000436,
0x000200f8,0x00000436,0x000700f5,0x00000006,0x000005d4,0x0000042f,0x0000042d,0x00000435,
0x00000430,0x00050051,0x00000006,0x00000411,0x000005bb,0x00000002,0x000500bc,0x00000033,
0x0000043b,0x00000411,0x00000032,0x000300f7,0x00000445,0x00000000,0x000400fa,0x0000043b,
0x0000043c,0x0000043f,0x000200f8,0x0000043c,0x00050085,0x00000006,0x0000043e,0x00000411,
0x000005a7,0x000200f9,0x00000445,0x000200f8,0x0000043f,0x00050081,0x00000006,0x00000441,
0x00000411,0x0000003c,0x0006000c,0x00000006,0x00000442,0x00000001,0x00000004,0x00000441,
0x00050085,0x00000006,0x00000443,0x00000442,0x000005a6,0x0007000c,0x00000006,0x00000444,
0x00000001,0x0000001a,0x00000443,0x00000041,0x000200f9,0x00000445,0x000200f8,0x00000445,
0x000700f5,0x00000006,0x000005d6,0x0000043e,0x0000043c,0x00000444,0x0000043f,0x00060050,
0x0000000f,0x000005e2,0x000005d2,0x000005d4,0x000005d6,0x000200f9,0x00000414,0x000200f8,
0x00000414,0x000700f5,0x0000000f,0x000005d8,0x000002b3,0x000002b1,0x000005e2,0x00000445,
0x00050041,0x0000007a,0x00000416,0x00000077,0x000001ae,0x0004003d,0x00000006,0x00000417,
0x00000416,0x0005008e,0x0000000f,0x00000418,0x000005d8,0x00000417,0x00050051,0x00000006,
0x000002b6,0x00000418,0x00000000,0x00050051,0x00000006,0x000002b8,0x00000418,0x00000001,
0x00050051,0x00000006,0x000002ba,0x00000418,0x00000002,0x00050051,0x00000006,0x000002bc,
0x000005bb,0x00000003,0x00070050,0x00000018,0x000005a8,0x000002b6,0x000002b8,0x000002ba,
0x000002bc,0x000200f9,0x000002ee,0x000200f8,0x000002be,0x00050041,0x0000007a,0x000002bf,
0x00000077,0x00000094,0x0004003d,0x00000006,0x000002c0,0x000002bf,0x000500b4,0x00000033,
0x000002c1,0x000002c0,0x00000090,0x000300f7,0x000002ed,0x00000000,0x000400fa,0x000002c1,
0x000002c2,0x000002cf,0x000200f8,0x000002c2,0x0008004f,0x0000000f,0x000002c4,0x000005bb,
0x000005bb,0x00000000,0x00000001,0x00000002,0x00050041,0x0000007a,0x0000044e,0x00000077,
0x000001ae,0x0004003d,0x00000006,0x0000044f,0x0000044e,0x0005008e,0x0000000f,0x00000450,
0x000002c4,0x0000044f,0x00050041,0x0000007a,0x00000451,0x00000077,0x000001be,0x0004003d,
0x00000006,0x00000452,0x00000451,0x000500b7,0x00000033,0x00000453,0x00000452,0x00000060,
0x000400a8,0x00000033,0x00000454,0x00000453,0x000300f7,0x00000466,0x00000000,0x000400fa,
0x00000454,0x00000455,0x00000466,0x000200f8,0x00000455,0x00050051,0x00000006,0x00000457,
0x00000450,0x00000000,0x000500bc,0x00000033,0x0000046b,0x00000457,0x00000047,0x000300f7,
0x00000475,0x00000000,0x000400fa,0x0000046b,0x0000046c,0x0000046f,0x000200f8,0x0000046c,
0x00050085,0x00000006,0x0000046e,0x00000457,0x00000038,0x000200f9,0x00000475,0x000200f8,
0x0000046f,0x0006000c,0x00000006,0x00000471,0x00000001,0x00000004,0x00000457,0x0007000c,
0x00000006,0x00000472,0x00000001,0x0000001a,0x00000471,0x00000050,0x0008000c,0x00000006,
0x00000474,0x00000001,0x00000032,0x00000472,0x0000003f,0x000005aa,0x000200f9,0x00000475,
0x000200f8,0x00000475,0x000700f5,0x00000006,0x000005c7,0x0000046e,0x0000046c,0x00000474,
0x0000046f,0x00050051,0x00000006,0x0000045b,0x00000450,0x00000001,0x000500bc,0x00000033,
0x0000047a,0x0000045b,0x00000047,0x000300f7,0x00000484,0x00000000,0x000400fa,0x0000047a,
0x0000047b,0x0000047e,0x000200f8,0x0000047b,0x00050085,0x00000006,0x0000047d,0x0000045b,
0x00000038,0x000200f9,0x00000484,0x000200f8,0x0000047e,0x0006000c,0x00000006,0x00000480,
0x00000001,0x00000004,0x0000045b,0x0007000c,0x00000006,0x00000481,0x00000001,0x0000001a,
0x00000480,0x00000050,0x0008000c,0x00000006,0x00000483,0x00000001,0x00000032,0x00000481,
0x0000003f,0x000005aa,0x000200f9,0x00000484,0x000200f8,0x00000484,0x000700f5,0x00000006,
0x000005c9,0x0000047d,0x0000047b,0x00000483,0x0000047e,0x00050051,0x00000006,0x0000045f,
0x00000450,0x00000002,0x000500bc,0x00000033,0x00000489,0x0000045f,0x00000047,0x000300f7,
0x00000493,0x00000000,0x000400fa,0x00000489,0x0000048a,0x0000048d,0x000200f8,0x0000048a,
0x00050085,0x00000006,0x0000048c,0x0000045f,0x00000038,0x000200f9,0x00000493,0x000200f8,
0x0000048d,0x0006000c,0x00000006,0x0000048f,0x00000001,0x00000004,0x0000045f,0x0007000c,
0x00000006,0x00000490,0x00000001,0x0000001a,0x0000048f,0x00000050,0x0008000c,0x00000006,
0x00000492,0x00000001,0x00000032,0x00000490,0x0000003f,0x000005aa,0x000200f9,0x00000493,
0x000200f8,0x00000493,0x000700f5,0x00000006,0x000005cb,0x0000048c,0x0000048a,0x00000492,
0x0000048d,0x00060050,0x0000000f,0x000005e1,0x000005c7,0x000005c9,0x000005cb,0x0008000c,
0x0000000f,0x00000465,0x00000001,0x0000002b,0x000005e1,0x00000061,0x000005a0,0x000200f9,
0x00000466,0x000200f8,0x00000466,0x000700f5,0x0000000f,0x000005cd,0x00000450,0x000002c2,
0x00000465,0x00000493,0x00050051,0x00000006,0x000002c7,0x000005cd,0x00000000,0x00050051,
0x00000006,0x000002c9,0x000005cd,0x00000001,0x00050051,0x00000006,0x000002cb,0x000005cd,
0x00000002,0x00050051,0x00000006,0x000002cd,0x000005bb,0x00000003,0x00070050,0x00000018,
0x000005a5,0x000002c7,0x000002c9,0x000002cb,0x000002cd,0x000200f9,0x000002ed,0x000200f8,
0x000002cf,0x00050041,0x0000007a,0x000002d0,0x00000077,0x00000094,0x0004003d,0x00000006,
0x000002d1,0x000002d0,0x000500b4,0x00000033,0x000002d2,0x000002d1,0x0000013a,0x000300f7,
0x000002ec,0x00000000,0x000400fa,0x000002d2,0x000002d3,0x000002e9,0x000200f8,0x000002d3,
0x0008004f,0x0000000f,0x000002d5,0x000005bb,0x000005bb,0x00000000,0x00000001,0x00000002,
0x00050090,0x0000000f,0x000002d6,0x000002d5,0x000000dd,0x00050051,0x00000006,0x000002d8,
0x000002d6,0x00000000,0x00060052,0x00000018,0x00000573,0x000002d8,0x000005e3,0x00000000,
0x00050051,0x00000006,0x000002da,0x000002d6,0x00000001,0x00060052,0x00000018,0x00000575,
0x000002da,0x00000573,0x00000001,0x00050051,0x00000006,0x000002dc,0x000002d6,0x00000002,
0x00060052,0x00000018,0x00000577,0x000002dc,0x00000575,0x00000002,0x0008004f,0x0000000f,
0x000002de,0x00000577,0x00000577,0x00000000,0x00000001,0x00000002,0x00050041,0x0000007a,
0x0000049c,0x00000077,0x000001ae,0x0004003d,0x00000006,0x0000049d,0x0000049c,0x0005008e,
0x0000000f,0x0000049e,0x000002de,0x0000049d,0x00050041,0x0000007a,0x0000049f,0x00000077,
0x000001be,0x0004003d,0x00000006,0x000004a0,0x0000049f,0x000500b7,0x00000033,0x000004a1,
0x000004a0,0x00000060,0x000400a8,0x00000033,0x000004a2,0x000004a1,0x000300f7,0x000004b4,
0x00000000,0x000400fa,0x000004a2,0x000004a3,0x000004b4,0x000200f8,0x000004a3,0x00050051,
0x00000006,0x000004a5,0x0000049e,0x00000000,0x000500bc,0x00000033,0x000004b9,0x000004a5,
0x00000047,0x000300f7,0x000004c3,0x00000000,0x000400fa,0x000004b9,0x000004ba,0x000004bd,
0x000200f8,0x000004ba,0x00050085,0x00000006,0x000004bc,0x000004a5,0x00000038,0x000200f9,
0x000004c3,0x000200f8,0x000004bd,0x0006000c,0x00000006,0x000004bf,0x00000001,0x00000004,
0x000004a5,0x0007000c,0x00000006,0x000004c0,0x00000001,0x0000001a,0x000004bf,0x00000050,
0x0008000c,0x00000006,0x000004c2,0x00000001,0x00000032,0x000004c0,0x0000003f,0x000005aa,
0x000200f9,0x000004c3,0x000200f8,0x000004c3,0x000700f5,0x00000006,0x000005bc,0x000004bc,
0x000004ba,0x000004c2,0x000004bd,0x00050051,0x00000006,0x000004a9,0x0000049e,0x00000001,
0x000500bc,0x00000033,0x000004c8,0x000004a9,0x00000047,0x000300f7,0x000004d2,0x00000000,
0x000400fa,0x000004c8,0x000004c9,0x000004cc,0x000200f8,0x000004c9,0x00050085,0x00000006,
0x000004cb,0x000004a9,0x00000038,0x000200f9,0x000004d2,0x000200f8,0x000004cc,0x0006000c,
0x00000006,0x000004ce,0x00000001,0x00000004,0x000004a9,0x0007000c,0x00000006,0x000004cf,
0x00000001,0x0000001a,0x000004ce,0x00000050,0x0008000c,0x00000006,0x000004d1,0x00000001,
0x00000032,0x000004cf,0x0000003f,0x000005aa,0x000200f9,0x000004d2,0x000200f8,0x000004d2,
0x000700f5,0x00000006,0x000005be,0x000004cb,0x000004c9,0x000004d1,0x000004cc,0x00050051,
0x00000006,0x000004ad,0x0000049e,0x00000002,0x000500bc,0x00000033,0x000004d7,0x000004ad,
0x00000047,0x000300f7,0x000004e1,0x00000000,0x000400fa,0x000004d7,0x000004d8,0x000004db,
0x000200f8,0x000004d8,0x00050085,0x00000006,0x000004da,0x000004ad,0x00000038,0x000200f9,
0x000004e1,0x000200f8,0x000004db,0x0006000c,0x00000006,0x000004dd,0x00000001,0x00000004,
0x000004ad,0x0007000c,0x00000006,0x000004de,0x00000001,0x0000001a,0x000004dd,0x00000050,
0x0008000c,0x00000006,0x000004e0,0x00000001,0x00000032,0x000004de,0x0000003f,0x000005aa,
0x000200f9,0x000004e1,0x000200f8,0x000004e1,0x000700f5,0x00000006,0x000005c0,0x000004da,
0x000004d8,0x000004e0,0x000004db,0x00060050,0x0000000f,0x000005e0,0x000005bc,0x000005be,
0x000005c0,0x0008000c,0x0000000f,0x000004b3,0x00000001,0x0000002b,0x000005e0,0x00000061,
0x000005a0,0x000200f9,0x000004b4,0x000200f8,0x000004b4,0x000700f5,0x0000000f,0x000005c2,
0x0000049e,0x000002d3,0x000004b3,0x000004e1,0x00050051,0x00000006,0x000002e1,0x000005c2,
0x00000000,0x00050051,0x00000006,0x000002e3,0x000005c2,0x00000001,0x00050051,0x00000006,
0x000002e5,0x000005c2,0x00000002,0x00050051,0x00000006,0x000002e7,0x000005bb,0x00000003,
0x00070050,0x00000018,0x000005a1,0x000002e1,0x000002e3,0x000002e5,0x000002e7,0x000200f9,
0x000002ec,0x000200f8,0x000002e9,0x0008004f,0x0000000f,0x000004e7,0x000005bb,0x000005bb,
0x00000000,0x00000001,0x00000002,0x00050041,0x0000007a,0x000004e8,0x00000077,0x000001ae,
0x0004003d,0x00000006,0x000004e9,0x000004e8,0x0005008e,0x0000000f,0x000004ea,0x000004e7,
0x000004e9,0x00050051,0x00000006,0x000004ec,0x000004ea,0x00000000,0x00050051,0x00000006,
0x000004ee,0x000004ea,0x00000001,0x00050051,0x00000006,0x000004f0,0x000004ea,0x00000002,
0x00050051,0x00000006,0x000004f2,0x000005bb,0x00000003,0x00070050,0x00000018,0x0000059c,
0x000004ec,0x000004ee,0x000004f0,0x000004f2,0x000200f9,0x000002ec,0x000200f8,0x000002ec,
0x000700f5,0x00000018,0x000005df,0x000005a1,0x000004b4,0x0000059c,0x000002e9,0x000200f9,
0x000002ed,0x000200f8,0x000002ed,0x000700f5,0x00000018,0x000005de,0x000005a5,0x00000466,
0x000005df,0x000002ec,0x000200f9,0x000002ee,0x000200f8,0x000002ee,0x000700f5,0x00000018,
0x000005dd,0x000005a8,0x00000414,0x000005de,0x000002ed,0x00050085,0x00000018,0x000002f2,
0x000005dd,0x00000279,0x0003003e,0x0000027c,0x000002f2,0x000100fd,0x00010038
};

View File

@ -0,0 +1,6 @@
#include "VULKAN_PixelShader_Common.incl"
float4 main(PixelShaderInput input) : SV_TARGET
{
return AdvancedPixelShader(input);
}

View File

@ -0,0 +1,47 @@
// 1113.1.1
#pragma once
const uint32_t VULKAN_PixelShader_Colors[] = {
0x07230203,0x00010000,0x0008000b,0x000000a7,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000049,0x0000004d,0x00030010,
0x00000004,0x00000007,0x00030003,0x00000005,0x000001f4,0x00040005,0x00000004,0x6e69616d,
0x00000000,0x00050005,0x00000018,0x736e6f43,0x746e6174,0x00000073,0x00070006,0x00000018,
0x00000000,0x47526373,0x756f5f42,0x74757074,0x00000000,0x00070006,0x00000018,0x00000001,
0x74786574,0x5f657275,0x65707974,0x00000000,0x00060006,0x00000018,0x00000002,0x75706e69,
0x79745f74,0x00006570,0x00060006,0x00000018,0x00000003,0x6f6c6f63,0x63735f72,0x00656c61,
0x00070006,0x00000018,0x00000004,0x656e6f74,0x5f70616d,0x6874656d,0x0000646f,0x00070006,
0x00000018,0x00000005,0x656e6f74,0x5f70616d,0x74636166,0x0031726f,0x00070006,0x00000018,
0x00000006,0x656e6f74,0x5f70616d,0x74636166,0x0032726f,0x00070006,0x00000018,0x00000007,
0x5f726473,0x74696877,0x6f705f65,0x00746e69,0x00050006,0x00000018,0x00000008,0x66666f59,
0x00746573,0x00050006,0x00000018,0x00000009,0x656f6352,0x00006666,0x00050006,0x00000018,
0x0000000a,0x656f6347,0x00006666,0x00050006,0x00000018,0x0000000b,0x656f6342,0x00006666,
0x00030005,0x0000001a,0x00000000,0x00050005,0x00000049,0x75706e69,0x6f632e74,0x00726f6c,
0x00070005,0x0000004d,0x746e6540,0x6f507972,0x4f746e69,0x75707475,0x00000074,0x00050048,
0x00000018,0x00000000,0x00000023,0x00000000,0x00050048,0x00000018,0x00000001,0x00000023,
0x00000004,0x00050048,0x00000018,0x00000002,0x00000023,0x00000008,0x00050048,0x00000018,
0x00000003,0x00000023,0x0000000c,0x00050048,0x00000018,0x00000004,0x00000023,0x00000010,
0x00050048,0x00000018,0x00000005,0x00000023,0x00000014,0x00050048,0x00000018,0x00000006,
0x00000023,0x00000018,0x00050048,0x00000018,0x00000007,0x00000023,0x0000001c,0x00050048,
0x00000018,0x00000008,0x00000023,0x00000020,0x00050048,0x00000018,0x00000009,0x00000023,
0x00000030,0x00050048,0x00000018,0x0000000a,0x00000023,0x00000040,0x00050048,0x00000018,
0x0000000b,0x00000023,0x00000050,0x00030047,0x00000018,0x00000002,0x00040047,0x0000001a,
0x00000022,0x00000000,0x00040047,0x0000001a,0x00000021,0x00000004,0x00040047,0x00000049,
0x0000001e,0x00000001,0x00040047,0x0000004d,0x0000001e,0x00000000,0x00020013,0x00000002,
0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,0x00000020,0x00040017,0x00000007,
0x00000006,0x00000004,0x00040017,0x00000015,0x00000006,0x00000003,0x000e001e,0x00000018,
0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,
0x00000007,0x00000007,0x00000007,0x00000007,0x00040020,0x00000019,0x00000002,0x00000018,
0x0004003b,0x00000019,0x0000001a,0x00000002,0x00040015,0x0000001b,0x00000020,0x00000001,
0x0004002b,0x0000001b,0x0000001c,0x00000003,0x00040020,0x0000001d,0x00000002,0x00000006,
0x0004002b,0x00000006,0x00000033,0x3f800000,0x00040020,0x0000003f,0x00000001,0x00000007,
0x0004003b,0x0000003f,0x00000049,0x00000001,0x00040020,0x0000004c,0x00000003,0x00000007,
0x0004003b,0x0000004c,0x0000004d,0x00000003,0x0006002c,0x00000015,0x000000a5,0x00000033,
0x00000033,0x00000033,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
0x00000005,0x0004003d,0x00000007,0x0000004a,0x00000049,0x00050041,0x0000001d,0x00000084,
0x0000001a,0x0000001c,0x0004003d,0x00000006,0x00000085,0x00000084,0x0005008e,0x00000015,
0x00000086,0x000000a5,0x00000085,0x00050051,0x00000006,0x00000088,0x00000086,0x00000000,
0x00050051,0x00000006,0x0000008a,0x00000086,0x00000001,0x00050051,0x00000006,0x0000008c,
0x00000086,0x00000002,0x00070050,0x00000007,0x000000a6,0x00000088,0x0000008a,0x0000008c,
0x00000033,0x00050085,0x00000007,0x0000007e,0x000000a6,0x0000004a,0x0003003e,0x0000004d,
0x0000007e,0x000100fd,0x00010038
};

View File

@ -0,0 +1,7 @@
#include "VULKAN_PixelShader_Common.incl"
float4 main(PixelShaderInput input) : SV_TARGET0
{
return GetOutputColor(1.0) * input.color;
}

View File

@ -0,0 +1,235 @@
SamplerState sampler0 : register(s0);
Texture2D texture0 : register(t1);
Texture2D texture1 : register(t2);
Texture2D texture2 : register(t3);
struct PixelShaderInput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
// These should mirror the definitions in SDL_render_d3d12.c
static const float TONEMAP_NONE = 0;
static const float TONEMAP_LINEAR = 1;
static const float TONEMAP_CHROME = 2;
static const float TEXTURETYPE_NONE = 0;
static const float TEXTURETYPE_RGB = 1;
static const float TEXTURETYPE_NV12 = 2;
static const float TEXTURETYPE_NV21 = 3;
static const float TEXTURETYPE_YUV = 4;
static const float INPUTTYPE_UNSPECIFIED = 0;
static const float INPUTTYPE_SRGB = 1;
static const float INPUTTYPE_SCRGB = 2;
static const float INPUTTYPE_HDR10 = 3;
cbuffer Constants : register(b4)
{
float scRGB_output;
float texture_type;
float input_type;
float color_scale;
float tonemap_method;
float tonemap_factor1;
float tonemap_factor2;
float sdr_white_point;
float4 Yoffset;
float4 Rcoeff;
float4 Gcoeff;
float4 Bcoeff;
};
static const float3x3 mat709to2020 = {
{ 0.627404, 0.329283, 0.043313 },
{ 0.069097, 0.919541, 0.011362 },
{ 0.016391, 0.088013, 0.895595 }
};
static const float3x3 mat2020to709 = {
{ 1.660496, -0.587656, -0.072840 },
{ -0.124547, 1.132895, -0.008348 },
{ -0.018154, -0.100597, 1.118751 }
};
float sRGBtoLinear(float v)
{
if (v <= 0.04045) {
v = (v / 12.92);
} else {
v = pow(abs(v + 0.055) / 1.055, 2.4);
}
return v;
}
float sRGBfromLinear(float v)
{
if (v <= 0.0031308) {
v = (v * 12.92);
} else {
v = (pow(abs(v), 1.0 / 2.4) * 1.055 - 0.055);
}
return v;
}
float3 PQtoLinear(float3 v)
{
const float c1 = 0.8359375;
const float c2 = 18.8515625;
const float c3 = 18.6875;
const float oo_m1 = 1.0 / 0.1593017578125;
const float oo_m2 = 1.0 / 78.84375;
float3 num = max(pow(abs(v), oo_m2) - c1, 0.0);
float3 den = c2 - c3 * pow(abs(v), oo_m2);
return (10000.0 * pow(abs(num / den), oo_m1) / sdr_white_point);
}
float3 ApplyTonemap(float3 v)
{
if (tonemap_method == TONEMAP_LINEAR) {
v *= tonemap_factor1;
} else if (tonemap_method == TONEMAP_CHROME) {
if (input_type == INPUTTYPE_SCRGB) {
// Convert to BT.2020 colorspace for tone mapping
v = mul(mat709to2020, v);
}
float vmax = max(v.r, max(v.g, v.b));
if (vmax > 0.0) {
float scale = (1.0 + tonemap_factor1 * vmax) / (1.0 + tonemap_factor2 * vmax);
v *= scale;
}
if (input_type == INPUTTYPE_SCRGB) {
// Convert to BT.709 colorspace after tone mapping
v = mul(mat2020to709, v);
}
}
return v;
}
float4 GetInputColor(PixelShaderInput input)
{
float4 rgba;
if (texture_type == TEXTURETYPE_NONE) {
rgba = 1.0;
} else if (texture_type == TEXTURETYPE_RGB) {
rgba = texture0.Sample(sampler0, input.tex);
} else if (texture_type == TEXTURETYPE_NV12) {
float3 yuv;
yuv.x = texture0.Sample(sampler0, input.tex).r;
yuv.yz = texture1.Sample(sampler0, input.tex).rg;
yuv += Yoffset.xyz;
rgba.r = dot(yuv, Rcoeff.xyz);
rgba.g = dot(yuv, Gcoeff.xyz);
rgba.b = dot(yuv, Bcoeff.xyz);
rgba.a = 1.0;
} else if (texture_type == TEXTURETYPE_NV21) {
float3 yuv;
yuv.x = texture0.Sample(sampler0, input.tex).r;
yuv.yz = texture1.Sample(sampler0, input.tex).gr;
yuv += Yoffset.xyz;
rgba.r = dot(yuv, Rcoeff.xyz);
rgba.g = dot(yuv, Gcoeff.xyz);
rgba.b = dot(yuv, Bcoeff.xyz);
rgba.a = 1.0;
} else if (texture_type == TEXTURETYPE_YUV) {
float3 yuv;
yuv.x = texture0.Sample(sampler0, input.tex).r;
yuv.y = texture1.Sample(sampler0, input.tex).r;
yuv.z = texture2.Sample(sampler0, input.tex).r;
yuv += Yoffset.xyz;
rgba.r = dot(yuv, Rcoeff.xyz);
rgba.g = dot(yuv, Gcoeff.xyz);
rgba.b = dot(yuv, Bcoeff.xyz);
rgba.a = 1.0;
} else {
// Error!
rgba.r = 1.0;
rgba.g = 0.0;
rgba.b = 0.0;
rgba.a = 1.0;
}
return rgba;
}
float4 GetOutputColor(float4 rgba)
{
float4 output;
output.rgb = rgba.rgb * color_scale;
output.a = rgba.a;
return output;
}
float3 GetOutputColorFromSRGB(float3 rgb)
{
float3 output;
if (scRGB_output) {
rgb.r = sRGBtoLinear(rgb.r);
rgb.g = sRGBtoLinear(rgb.g);
rgb.b = sRGBtoLinear(rgb.b);
}
output.rgb = rgb * color_scale;
return output;
}
float3 GetOutputColorFromLinear(float3 rgb)
{
float3 output;
output.rgb = rgb * color_scale;
if (!scRGB_output) {
output.r = sRGBfromLinear(output.r);
output.g = sRGBfromLinear(output.g);
output.b = sRGBfromLinear(output.b);
output.rgb = saturate(output.rgb);
}
return output;
}
float4 AdvancedPixelShader(PixelShaderInput input)
{
float4 rgba = GetInputColor(input);
float4 output;
if (input_type == INPUTTYPE_HDR10) {
rgba.rgb = PQtoLinear(rgba.rgb);
}
if (tonemap_method != TONEMAP_NONE) {
rgba.rgb = ApplyTonemap(rgba.rgb);
}
if (input_type == INPUTTYPE_SRGB) {
output.rgb = GetOutputColorFromSRGB(rgba.rgb);
output.a = rgba.a;
} else if (input_type == INPUTTYPE_SCRGB) {
output.rgb = GetOutputColorFromLinear(rgba.rgb);
output.a = rgba.a;
} else if (input_type == INPUTTYPE_HDR10) {
rgba.rgb = mul(mat2020to709, rgba.rgb);
output.rgb = GetOutputColorFromLinear(rgba.rgb);
output.a = rgba.a;
} else {
output = GetOutputColor(rgba);
}
return output * input.color;
}

View File

@ -0,0 +1,60 @@
// 1113.1.1
#pragma once
const uint32_t VULKAN_PixelShader_Textures[] = {
0x07230203,0x00010000,0x0008000b,0x000000b3,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000051,0x00000054,0x00000058,
0x00030010,0x00000004,0x00000007,0x00030003,0x00000005,0x000001f4,0x00040005,0x00000004,
0x6e69616d,0x00000000,0x00050005,0x00000018,0x736e6f43,0x746e6174,0x00000073,0x00070006,
0x00000018,0x00000000,0x47526373,0x756f5f42,0x74757074,0x00000000,0x00070006,0x00000018,
0x00000001,0x74786574,0x5f657275,0x65707974,0x00000000,0x00060006,0x00000018,0x00000002,
0x75706e69,0x79745f74,0x00006570,0x00060006,0x00000018,0x00000003,0x6f6c6f63,0x63735f72,
0x00656c61,0x00070006,0x00000018,0x00000004,0x656e6f74,0x5f70616d,0x6874656d,0x0000646f,
0x00070006,0x00000018,0x00000005,0x656e6f74,0x5f70616d,0x74636166,0x0031726f,0x00070006,
0x00000018,0x00000006,0x656e6f74,0x5f70616d,0x74636166,0x0032726f,0x00070006,0x00000018,
0x00000007,0x5f726473,0x74696877,0x6f705f65,0x00746e69,0x00050006,0x00000018,0x00000008,
0x66666f59,0x00746573,0x00050006,0x00000018,0x00000009,0x656f6352,0x00006666,0x00050006,
0x00000018,0x0000000a,0x656f6347,0x00006666,0x00050006,0x00000018,0x0000000b,0x656f6342,
0x00006666,0x00030005,0x0000001a,0x00000000,0x00050005,0x00000035,0x74786574,0x30657275,
0x00000000,0x00050005,0x00000039,0x706d6173,0x3072656c,0x00000000,0x00050005,0x00000051,
0x75706e69,0x65742e74,0x00000078,0x00050005,0x00000054,0x75706e69,0x6f632e74,0x00726f6c,
0x00070005,0x00000058,0x746e6540,0x6f507972,0x4f746e69,0x75707475,0x00000074,0x00050048,
0x00000018,0x00000000,0x00000023,0x00000000,0x00050048,0x00000018,0x00000001,0x00000023,
0x00000004,0x00050048,0x00000018,0x00000002,0x00000023,0x00000008,0x00050048,0x00000018,
0x00000003,0x00000023,0x0000000c,0x00050048,0x00000018,0x00000004,0x00000023,0x00000010,
0x00050048,0x00000018,0x00000005,0x00000023,0x00000014,0x00050048,0x00000018,0x00000006,
0x00000023,0x00000018,0x00050048,0x00000018,0x00000007,0x00000023,0x0000001c,0x00050048,
0x00000018,0x00000008,0x00000023,0x00000020,0x00050048,0x00000018,0x00000009,0x00000023,
0x00000030,0x00050048,0x00000018,0x0000000a,0x00000023,0x00000040,0x00050048,0x00000018,
0x0000000b,0x00000023,0x00000050,0x00030047,0x00000018,0x00000002,0x00040047,0x0000001a,
0x00000022,0x00000000,0x00040047,0x0000001a,0x00000021,0x00000004,0x00040047,0x00000035,
0x00000022,0x00000000,0x00040047,0x00000035,0x00000021,0x00000001,0x00040047,0x00000039,
0x00000022,0x00000000,0x00040047,0x00000039,0x00000021,0x00000000,0x00040047,0x00000051,
0x0000001e,0x00000000,0x00040047,0x00000054,0x0000001e,0x00000001,0x00040047,0x00000058,
0x0000001e,0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,
0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040017,0x0000000d,
0x00000006,0x00000002,0x00040017,0x00000015,0x00000006,0x00000003,0x000e001e,0x00000018,
0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,0x00000006,
0x00000007,0x00000007,0x00000007,0x00000007,0x00040020,0x00000019,0x00000002,0x00000018,
0x0004003b,0x00000019,0x0000001a,0x00000002,0x00040015,0x0000001b,0x00000020,0x00000001,
0x0004002b,0x0000001b,0x0000001c,0x00000003,0x00040020,0x0000001d,0x00000002,0x00000006,
0x00090019,0x00000033,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,0x00000001,
0x00000000,0x00040020,0x00000034,0x00000000,0x00000033,0x0004003b,0x00000034,0x00000035,
0x00000000,0x0002001a,0x00000037,0x00040020,0x00000038,0x00000000,0x00000037,0x0004003b,
0x00000038,0x00000039,0x00000000,0x0003001b,0x0000003b,0x00000033,0x00040020,0x0000004c,
0x00000001,0x00000007,0x00040020,0x00000050,0x00000001,0x0000000d,0x0004003b,0x00000050,
0x00000051,0x00000001,0x0004003b,0x0000004c,0x00000054,0x00000001,0x00040020,0x00000057,
0x00000003,0x00000007,0x0004003b,0x00000057,0x00000058,0x00000003,0x00050036,0x00000002,
0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003d,0x0000000d,0x00000052,
0x00000051,0x0004003d,0x00000007,0x00000055,0x00000054,0x0004003d,0x00000033,0x00000081,
0x00000035,0x0004003d,0x00000037,0x00000082,0x00000039,0x00050056,0x0000003b,0x00000083,
0x00000081,0x00000082,0x00050057,0x00000007,0x00000086,0x00000083,0x00000052,0x0008004f,
0x00000015,0x0000008f,0x00000086,0x00000086,0x00000000,0x00000001,0x00000002,0x00050041,
0x0000001d,0x00000090,0x0000001a,0x0000001c,0x0004003d,0x00000006,0x00000091,0x00000090,
0x0005008e,0x00000015,0x00000092,0x0000008f,0x00000091,0x00050051,0x00000006,0x00000094,
0x00000092,0x00000000,0x00050051,0x00000006,0x00000096,0x00000092,0x00000001,0x00050051,
0x00000006,0x00000098,0x00000092,0x00000002,0x00050051,0x00000006,0x0000009a,0x00000086,
0x00000003,0x00070050,0x00000007,0x000000b2,0x00000094,0x00000096,0x00000098,0x0000009a,
0x00050085,0x00000007,0x0000008a,0x000000b2,0x00000055,0x0003003e,0x00000058,0x0000008a,
0x000100fd,0x00010038
};

View File

@ -0,0 +1,6 @@
#include "VULKAN_PixelShader_Common.incl"
float4 main(PixelShaderInput input) : SV_TARGET
{
return GetOutputColor(texture0.Sample(sampler0, input.tex)) * input.color;
}

View File

@ -0,0 +1,48 @@
// 1113.1.1
#pragma once
const uint32_t VULKAN_VertexShader[] = {
0x07230203,0x00010000,0x0008000b,0x000000a1,0x00000000,0x00020011,0x00000001,0x0006000b,
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
0x000b000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000003c,0x00000040,0x00000044,
0x00000056,0x00000059,0x0000005c,0x00030003,0x00000005,0x000001f4,0x00040005,0x00000004,
0x6e69616d,0x00000000,0x00060005,0x0000001e,0x68737570,0x736e6f43,0x746e6174,0x00000073,
0x00050006,0x0000001e,0x00000000,0x65646f6d,0x0000006c,0x00080006,0x0000001e,0x00000001,
0x6a6f7270,0x69746365,0x6e416e6f,0x65695664,0x00000077,0x00060005,0x00000020,0x68737570,
0x736e6f43,0x746e6174,0x00000073,0x00050005,0x0000003c,0x75706e69,0x6f702e74,0x00000073,
0x00050005,0x00000040,0x75706e69,0x65742e74,0x00000078,0x00050005,0x00000044,0x75706e69,
0x6f632e74,0x00726f6c,0x00080005,0x00000056,0x746e6540,0x6f507972,0x4f746e69,0x75707475,
0x6f702e74,0x00000073,0x00080005,0x00000059,0x746e6540,0x6f507972,0x4f746e69,0x75707475,
0x65742e74,0x00000078,0x00080005,0x0000005c,0x746e6540,0x6f507972,0x4f746e69,0x75707475,
0x6f632e74,0x00726f6c,0x00040048,0x0000001e,0x00000000,0x00000005,0x00050048,0x0000001e,
0x00000000,0x00000023,0x00000000,0x00050048,0x0000001e,0x00000000,0x00000007,0x00000010,
0x00040048,0x0000001e,0x00000001,0x00000005,0x00050048,0x0000001e,0x00000001,0x00000023,
0x00000040,0x00050048,0x0000001e,0x00000001,0x00000007,0x00000010,0x00030047,0x0000001e,
0x00000002,0x00040047,0x0000003c,0x0000001e,0x00000000,0x00040047,0x00000040,0x0000001e,
0x00000001,0x00040047,0x00000044,0x0000001e,0x00000002,0x00040047,0x00000056,0x0000000b,
0x00000000,0x00040047,0x00000059,0x0000001e,0x00000000,0x00040047,0x0000005c,0x0000001e,
0x00000001,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,
0x00000020,0x00040017,0x00000007,0x00000006,0x00000003,0x00040017,0x00000008,0x00000006,
0x00000002,0x00040017,0x00000009,0x00000006,0x00000004,0x00040015,0x00000013,0x00000020,
0x00000001,0x0004002b,0x00000013,0x00000014,0x00000000,0x0004002b,0x00000006,0x00000018,
0x3f800000,0x00040018,0x0000001d,0x00000009,0x00000004,0x0004001e,0x0000001e,0x0000001d,
0x0000001d,0x00040020,0x0000001f,0x00000009,0x0000001e,0x0004003b,0x0000001f,0x00000020,
0x00000009,0x00040020,0x00000021,0x00000009,0x0000001d,0x0004002b,0x00000013,0x00000026,
0x00000001,0x00040020,0x0000003b,0x00000001,0x00000007,0x0004003b,0x0000003b,0x0000003c,
0x00000001,0x00040020,0x0000003f,0x00000001,0x00000008,0x0004003b,0x0000003f,0x00000040,
0x00000001,0x00040020,0x00000043,0x00000001,0x00000009,0x0004003b,0x00000043,0x00000044,
0x00000001,0x00040020,0x00000055,0x00000003,0x00000009,0x0004003b,0x00000055,0x00000056,
0x00000003,0x00040020,0x00000058,0x00000003,0x00000008,0x0004003b,0x00000058,0x00000059,
0x00000003,0x0004003b,0x00000055,0x0000005c,0x00000003,0x00050036,0x00000002,0x00000004,
0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003d,0x00000007,0x0000003d,0x0000003c,
0x0004003d,0x00000008,0x00000041,0x00000040,0x0004003d,0x00000009,0x00000045,0x00000044,
0x00050051,0x00000006,0x00000065,0x0000003d,0x00000000,0x00050051,0x00000006,0x00000066,
0x0000003d,0x00000001,0x00050051,0x00000006,0x00000067,0x0000003d,0x00000002,0x00070050,
0x00000009,0x00000068,0x00000065,0x00000066,0x00000067,0x00000018,0x00050041,0x00000021,
0x00000069,0x00000020,0x00000014,0x0004003d,0x0000001d,0x0000006a,0x00000069,0x00050091,
0x00000009,0x0000006c,0x0000006a,0x00000068,0x00050041,0x00000021,0x0000006d,0x00000020,
0x00000026,0x0004003d,0x0000001d,0x0000006e,0x0000006d,0x00050091,0x00000009,0x00000070,
0x0000006e,0x0000006c,0x00050051,0x00000006,0x00000052,0x00000070,0x00000001,0x0004007f,
0x00000006,0x00000053,0x00000052,0x00060052,0x00000009,0x000000a0,0x00000053,0x00000070,
0x00000001,0x0003003e,0x00000056,0x000000a0,0x0003003e,0x00000059,0x00000041,0x0003003e,
0x0000005c,0x00000045,0x000100fd,0x00010038
};

View File

@ -0,0 +1,41 @@
#pragma pack_matrix( row_major )
struct VertexShaderConstants
{
matrix model;
matrix projectionAndView;
};
[[vk::push_constant]]
ConstantBuffer<VertexShaderConstants> pushConstants;
struct VertexShaderInput
{
float3 pos : POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
struct VertexShaderOutput
{
float4 pos : SV_POSITION;
float2 tex : TEXCOORD0;
float4 color : COLOR0;
};
VertexShaderOutput mainColor(VertexShaderInput input)
{
VertexShaderOutput output;
float4 pos = float4(input.pos, 1.0f);
// Transform the vertex position into projected space.
pos = mul(pos, pushConstants.model);
pos = mul(pos, pushConstants.projectionAndView);
output.pos = pos;
// Pass through texture coordinates and color values without transformation
output.tex = input.tex;
output.color = input.color;
return output;
}

View File

@ -0,0 +1,5 @@
glslangValidator -D --sep main -e main -S frag --target-env vulkan1.0 --vn VULKAN_PixelShader_Colors -o VULKAN_PixelShader_Colors.h VULKAN_PixelShader_Colors.hlsl
glslangValidator -D --sep main -e main -S frag --target-env vulkan1.0 --vn VULKAN_PixelShader_Textures -o VULKAN_PixelShader_Textures.h VULKAN_PixelShader_Textures.hlsl
glslangValidator -D --sep main -e main -S frag --target-env vulkan1.0 --vn VULKAN_PixelShader_Advanced -o VULKAN_PixelShader_Advanced.h VULKAN_PixelShader_Advanced.hlsl
glslangValidator -D --sep mainColor -e main -S vert --iy --target-env vulkan1.0 --vn VULKAN_VertexShader -o VULKAN_VertexShader.h VULKAN_VertexShader.hlsl