[SPIR-V] xb genspirv > buildshaders + opt + remap + .xesl

This commit is contained in:
Triang3l
2022-02-05 17:07:07 +03:00
parent ea992eda1f
commit 4480437a3d
106 changed files with 9649 additions and 14355 deletions

View File

@@ -18,10 +18,12 @@ namespace vulkan {
using util::CheckResult;
// Generated with `xenia-build genspirv`.
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_color_frag.h"
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_depth_frag.h"
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_vert.h"
// Generated with `xb buildshaders`.
namespace shaders {
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_color_ps.h"
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_depth_ps.h"
#include "xenia/ui/vulkan/shaders/bytecode/vulkan_spirv/blit_vs.h"
} // namespace shaders
Blitter::Blitter(const VulkanProvider& provider) : provider_(provider) {}
Blitter::~Blitter() { Shutdown(); }
@@ -35,8 +37,8 @@ VkResult Blitter::Initialize() {
VkShaderModuleCreateInfo shader_create_info;
std::memset(&shader_create_info, 0, sizeof(shader_create_info));
shader_create_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
shader_create_info.codeSize = sizeof(blit_vert);
shader_create_info.pCode = reinterpret_cast<const uint32_t*>(blit_vert);
shader_create_info.codeSize = sizeof(shaders::blit_vs);
shader_create_info.pCode = shaders::blit_vs;
status = dfn.vkCreateShaderModule(device, &shader_create_info, nullptr,
&blit_vertex_);
CheckResult(status, "vkCreateShaderModule");
@@ -46,8 +48,8 @@ VkResult Blitter::Initialize() {
provider_.SetDeviceObjectName(VK_OBJECT_TYPE_SHADER_MODULE,
uint64_t(blit_vertex_), "S(B): Vertex");
shader_create_info.codeSize = sizeof(blit_color_frag);
shader_create_info.pCode = reinterpret_cast<const uint32_t*>(blit_color_frag);
shader_create_info.codeSize = sizeof(shaders::blit_color_ps);
shader_create_info.pCode = shaders::blit_color_ps;
status = dfn.vkCreateShaderModule(device, &shader_create_info, nullptr,
&blit_color_);
CheckResult(status, "vkCreateShaderModule");
@@ -57,8 +59,8 @@ VkResult Blitter::Initialize() {
provider_.SetDeviceObjectName(VK_OBJECT_TYPE_SHADER_MODULE,
uint64_t(blit_color_), "S(B): Color");
shader_create_info.codeSize = sizeof(blit_depth_frag);
shader_create_info.pCode = reinterpret_cast<const uint32_t*>(blit_depth_frag);
shader_create_info.codeSize = sizeof(shaders::blit_depth_ps);
shader_create_info.pCode = shaders::blit_depth_ps;
status = dfn.vkCreateShaderModule(device, &shader_create_info, nullptr,
&blit_depth_);
CheckResult(status, "vkCreateShaderModule");

View File

@@ -1,88 +0,0 @@
// generated from `xb genspirv`
// source: blit_color.frag
const uint8_t blit_color_frag[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x00, 0x08, 0x00,
0x24, 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, 0x11, 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, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x6F, 0x43, 0x00, 0x00,
0x05, 0x00, 0x05, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x73, 0x72, 0x63, 0x5F,
0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x05, 0x00, 0x04, 0x00,
0x11, 0x00, 0x00, 0x00, 0x76, 0x74, 0x78, 0x5F, 0x75, 0x76, 0x00, 0x00,
0x05, 0x00, 0x06, 0x00, 0x16, 0x00, 0x00, 0x00, 0x50, 0x75, 0x73, 0x68,
0x43, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0x00, 0x00,
0x06, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x5F, 0x70, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00,
0x16, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x73, 0x77, 0x61, 0x70,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x18, 0x00, 0x00, 0x00,
0x70, 0x75, 0x73, 0x68, 0x5F, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E,
0x74, 0x73, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x09, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00,
0x47, 0x00, 0x03, 0x00, 0x16, 0x00, 0x00, 0x00, 0x02, 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, 0x19, 0x00, 0x09, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x03, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00,
0x15, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x15, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00,
0x17, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
0x2B, 0x00, 0x04, 0x00, 0x15, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1A, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00,
0x15, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x14, 0x00, 0x02, 0x00, 0x1E, 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, 0x0B, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x57, 0x00, 0x05, 0x00,
0x07, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00,
0x13, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, 0x1A, 0x00, 0x00, 0x00,
0x1B, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00,
0x3D, 0x00, 0x04, 0x00, 0x15, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00,
0x1B, 0x00, 0x00, 0x00, 0xAB, 0x00, 0x05, 0x00, 0x1E, 0x00, 0x00, 0x00,
0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00,
0xF7, 0x00, 0x03, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xFA, 0x00, 0x04, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x21, 0x00, 0x00, 0x00, 0xF8, 0x00, 0x02, 0x00, 0x20, 0x00, 0x00, 0x00,
0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x09, 0x00, 0x07, 0x00, 0x00, 0x00,
0x23, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00,
0x23, 0x00, 0x00, 0x00, 0xF9, 0x00, 0x02, 0x00, 0x21, 0x00, 0x00, 0x00,
0xF8, 0x00, 0x02, 0x00, 0x21, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00,
0x38, 0x00, 0x01, 0x00,
};

View File

@@ -1,67 +0,0 @@
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 36
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %oC %vtx_uv
OpExecutionMode %main OriginUpperLeft
OpSource GLSL 450
OpName %main "main"
OpName %oC "oC"
OpName %src_texture "src_texture"
OpName %vtx_uv "vtx_uv"
OpName %PushConstants "PushConstants"
OpMemberName %PushConstants 0 "_pad"
OpMemberName %PushConstants 1 "swap"
OpName %push_constants "push_constants"
OpDecorate %oC Location 0
OpDecorate %src_texture DescriptorSet 0
OpDecorate %src_texture Binding 0
OpDecorate %vtx_uv Location 0
OpMemberDecorate %PushConstants 0 Offset 32
OpMemberDecorate %PushConstants 1 Offset 44
OpDecorate %PushConstants Block
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%oC = OpVariable %_ptr_Output_v4float Output
%10 = OpTypeImage %float 2D 0 0 0 1 Unknown
%11 = OpTypeSampledImage %10
%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
%src_texture = OpVariable %_ptr_UniformConstant_11 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Input_v2float = OpTypePointer Input %v2float
%vtx_uv = OpVariable %_ptr_Input_v2float Input
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%PushConstants = OpTypeStruct %v3float %int
%_ptr_PushConstant_PushConstants = OpTypePointer PushConstant %PushConstants
%push_constants = OpVariable %_ptr_PushConstant_PushConstants PushConstant
%int_1 = OpConstant %int 1
%_ptr_PushConstant_int = OpTypePointer PushConstant %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%main = OpFunction %void None %3
%5 = OpLabel
%14 = OpLoad %11 %src_texture
%18 = OpLoad %v2float %vtx_uv
%19 = OpImageSampleImplicitLod %v4float %14 %18
OpStore %oC %19
%27 = OpAccessChain %_ptr_PushConstant_int %push_constants %int_1
%28 = OpLoad %int %27
%31 = OpINotEqual %bool %28 %int_0
OpSelectionMerge %33 None
OpBranchConditional %31 %32 %33
%32 = OpLabel
%34 = OpLoad %v4float %oC
%35 = OpVectorShuffle %v4float %34 %34 2 1 0 3
OpStore %oC %35
OpBranch %33
%33 = OpLabel
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,99 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24608
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %4841 %5592
OpExecutionMode %5663 OriginUpperLeft
OpDecorate %4841 Location 0
OpDecorate %5164 DescriptorSet 0
OpDecorate %5164 Binding 0
OpDecorate %5592 Location 0
OpMemberDecorate %_struct_1019 0 Offset 32
OpMemberDecorate %_struct_1019 1 Offset 44
OpDecorate %_struct_1019 Block
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%4841 = OpVariable %_ptr_Output_v4float Output
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%510 = OpTypeSampledImage %150
%_ptr_UniformConstant_510 = OpTypePointer UniformConstant %510
%5164 = OpVariable %_ptr_UniformConstant_510 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Input_v2float = OpTypePointer Input %v2float
%5592 = OpVariable %_ptr_Input_v2float Input
%v3float = OpTypeVector %float 3
%int = OpTypeInt 32 1
%_struct_1019 = OpTypeStruct %v3float %int
%_ptr_PushConstant__struct_1019 = OpTypePointer PushConstant %_struct_1019
%3463 = OpVariable %_ptr_PushConstant__struct_1019 PushConstant
%int_1 = OpConstant %int 1
%_ptr_PushConstant_int = OpTypePointer PushConstant %int
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%5663 = OpFunction %void None %1282
%24607 = OpLabel
%21248 = OpLoad %510 %5164
%19293 = OpLoad %v2float %5592
%8148 = OpImageSampleImplicitLod %v4float %21248 %19293
OpStore %4841 %8148
%20291 = OpAccessChain %_ptr_PushConstant_int %3463 %int_1
%11639 = OpLoad %int %20291
%12913 = OpINotEqual %bool %11639 %int_0
OpSelectionMerge %19578 None
OpBranchConditional %12913 %13163 %19578
%13163 = OpLabel
%9669 = OpLoad %v4float %4841
%6737 = OpVectorShuffle %v4float %9669 %9669 2 1 0 3
OpStore %4841 %6737
OpBranch %19578
%19578 = OpLabel
OpReturn
OpFunctionEnd
#endif
const uint32_t blit_color_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006020, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0007000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x000012E9, 0x000015D8, 0x00030010,
0x0000161F, 0x00000007, 0x00040047, 0x000012E9, 0x0000001E, 0x00000000,
0x00040047, 0x0000142C, 0x00000022, 0x00000000, 0x00040047, 0x0000142C,
0x00000021, 0x00000000, 0x00040047, 0x000015D8, 0x0000001E, 0x00000000,
0x00050048, 0x000003FB, 0x00000000, 0x00000023, 0x00000020, 0x00050048,
0x000003FB, 0x00000001, 0x00000023, 0x0000002C, 0x00030047, 0x000003FB,
0x00000002, 0x00020013, 0x00000008, 0x00030021, 0x00000502, 0x00000008,
0x00030016, 0x0000000D, 0x00000020, 0x00040017, 0x0000001D, 0x0000000D,
0x00000004, 0x00040020, 0x0000029A, 0x00000003, 0x0000001D, 0x0004003B,
0x0000029A, 0x000012E9, 0x00000003, 0x00090019, 0x00000096, 0x0000000D,
0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000,
0x0003001B, 0x000001FE, 0x00000096, 0x00040020, 0x0000047B, 0x00000000,
0x000001FE, 0x0004003B, 0x0000047B, 0x0000142C, 0x00000000, 0x00040017,
0x00000013, 0x0000000D, 0x00000002, 0x00040020, 0x00000290, 0x00000001,
0x00000013, 0x0004003B, 0x00000290, 0x000015D8, 0x00000001, 0x00040017,
0x00000018, 0x0000000D, 0x00000003, 0x00040015, 0x0000000C, 0x00000020,
0x00000001, 0x0004001E, 0x000003FB, 0x00000018, 0x0000000C, 0x00040020,
0x00000678, 0x00000009, 0x000003FB, 0x0004003B, 0x00000678, 0x00000D87,
0x00000009, 0x0004002B, 0x0000000C, 0x00000A0E, 0x00000001, 0x00040020,
0x00000289, 0x00000009, 0x0000000C, 0x0004002B, 0x0000000C, 0x00000A0B,
0x00000000, 0x00020014, 0x00000009, 0x00050036, 0x00000008, 0x0000161F,
0x00000000, 0x00000502, 0x000200F8, 0x0000601F, 0x0004003D, 0x000001FE,
0x00005300, 0x0000142C, 0x0004003D, 0x00000013, 0x00004B5D, 0x000015D8,
0x00050057, 0x0000001D, 0x00001FD4, 0x00005300, 0x00004B5D, 0x0003003E,
0x000012E9, 0x00001FD4, 0x00050041, 0x00000289, 0x00004F43, 0x00000D87,
0x00000A0E, 0x0004003D, 0x0000000C, 0x00002D77, 0x00004F43, 0x000500AB,
0x00000009, 0x00003271, 0x00002D77, 0x00000A0B, 0x000300F7, 0x00004C7A,
0x00000000, 0x000400FA, 0x00003271, 0x0000336B, 0x00004C7A, 0x000200F8,
0x0000336B, 0x0004003D, 0x0000001D, 0x000025C5, 0x000012E9, 0x0009004F,
0x0000001D, 0x00001A51, 0x000025C5, 0x000025C5, 0x00000002, 0x00000001,
0x00000000, 0x00000003, 0x0003003E, 0x000012E9, 0x00001A51, 0x000200F9,
0x00004C7A, 0x000200F8, 0x00004C7A, 0x000100FD, 0x00010038,
};

View File

@@ -1,59 +0,0 @@
// generated from `xb genspirv`
// source: blit_depth.frag
const uint8_t blit_depth_frag[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x00, 0x08, 0x00,
0x1E, 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, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x69, 0x6E, 0x00, 0x00, 0x00, 0x00,
0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00,
0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x10, 0x00, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0C, 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, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00,
0x67, 0x6C, 0x5F, 0x46, 0x72, 0x61, 0x67, 0x44, 0x65, 0x70, 0x74, 0x68,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x0C, 0x00, 0x00, 0x00,
0x73, 0x72, 0x63, 0x5F, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00,
0x05, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, 0x76, 0x74, 0x78, 0x5F,
0x75, 0x76, 0x00, 0x00, 0x05, 0x00, 0x03, 0x00, 0x1D, 0x00, 0x00, 0x00,
0x6F, 0x43, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x0C, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x1D, 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, 0x20, 0x00, 0x04, 0x00,
0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0x09, 0x00, 0x09, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x03, 0x00, 0x0A, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x17, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x17, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x1C, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00,
0x1C, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x03, 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, 0x3D, 0x00, 0x04, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x57, 0x00, 0x05, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00,
0x06, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00,
};

View File

@@ -1,46 +0,0 @@
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 30
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragDepth %vtx_uv %oC
OpExecutionMode %main OriginUpperLeft
OpExecutionMode %main DepthReplacing
OpSource GLSL 450
OpName %main "main"
OpName %gl_FragDepth "gl_FragDepth"
OpName %src_texture "src_texture"
OpName %vtx_uv "vtx_uv"
OpName %oC "oC"
OpDecorate %gl_FragDepth BuiltIn FragDepth
OpDecorate %src_texture DescriptorSet 0
OpDecorate %src_texture Binding 0
OpDecorate %vtx_uv Location 0
OpDecorate %oC Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Output_float = OpTypePointer Output %float
%gl_FragDepth = OpVariable %_ptr_Output_float Output
%9 = OpTypeImage %float 2D 0 0 0 1 Unknown
%10 = OpTypeSampledImage %9
%_ptr_UniformConstant_10 = OpTypePointer UniformConstant %10
%src_texture = OpVariable %_ptr_UniformConstant_10 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Input_v2float = OpTypePointer Input %v2float
%vtx_uv = OpVariable %_ptr_Input_v2float Input
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%oC = OpVariable %_ptr_Output_v4float Output
%main = OpFunction %void None %3
%5 = OpLabel
%13 = OpLoad %10 %src_texture
%17 = OpLoad %v2float %vtx_uv
%19 = OpImageSampleImplicitLod %v4float %13 %17
%22 = OpCompositeExtract %float %19 0
OpStore %gl_FragDepth %22
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,70 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 24608
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %5663 "main" %gl_FragDepth %5592 %4841
OpExecutionMode %5663 OriginUpperLeft
OpExecutionMode %5663 DepthReplacing
OpDecorate %gl_FragDepth BuiltIn FragDepth
OpDecorate %5164 DescriptorSet 0
OpDecorate %5164 Binding 0
OpDecorate %5592 Location 0
OpDecorate %4841 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%_ptr_Output_float = OpTypePointer Output %float
%gl_FragDepth = OpVariable %_ptr_Output_float Output
%150 = OpTypeImage %float 2D 0 0 0 1 Unknown
%510 = OpTypeSampledImage %150
%_ptr_UniformConstant_510 = OpTypePointer UniformConstant %510
%5164 = OpVariable %_ptr_UniformConstant_510 UniformConstant
%v2float = OpTypeVector %float 2
%_ptr_Input_v2float = OpTypePointer Input %v2float
%5592 = OpVariable %_ptr_Input_v2float Input
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%4841 = OpVariable %_ptr_Output_v4float Output
%5663 = OpFunction %void None %1282
%24607 = OpLabel
%21248 = OpLoad %510 %5164
%19654 = OpLoad %v2float %5592
%23875 = OpImageSampleImplicitLod %v4float %21248 %19654
%15662 = OpCompositeExtract %float %23875 0
OpStore %gl_FragDepth %15662
OpReturn
OpFunctionEnd
#endif
const uint32_t blit_depth_ps[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006020, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0008000F, 0x00000004,
0x0000161F, 0x6E69616D, 0x00000000, 0x000011F3, 0x000015D8, 0x000012E9,
0x00030010, 0x0000161F, 0x00000007, 0x00030010, 0x0000161F, 0x0000000C,
0x00040047, 0x000011F3, 0x0000000B, 0x00000016, 0x00040047, 0x0000142C,
0x00000022, 0x00000000, 0x00040047, 0x0000142C, 0x00000021, 0x00000000,
0x00040047, 0x000015D8, 0x0000001E, 0x00000000, 0x00040047, 0x000012E9,
0x0000001E, 0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040020, 0x0000028A,
0x00000003, 0x0000000D, 0x0004003B, 0x0000028A, 0x000011F3, 0x00000003,
0x00090019, 0x00000096, 0x0000000D, 0x00000001, 0x00000000, 0x00000000,
0x00000000, 0x00000001, 0x00000000, 0x0003001B, 0x000001FE, 0x00000096,
0x00040020, 0x0000047B, 0x00000000, 0x000001FE, 0x0004003B, 0x0000047B,
0x0000142C, 0x00000000, 0x00040017, 0x00000013, 0x0000000D, 0x00000002,
0x00040020, 0x00000290, 0x00000001, 0x00000013, 0x0004003B, 0x00000290,
0x000015D8, 0x00000001, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004,
0x00040020, 0x0000029A, 0x00000003, 0x0000001D, 0x0004003B, 0x0000029A,
0x000012E9, 0x00000003, 0x00050036, 0x00000008, 0x0000161F, 0x00000000,
0x00000502, 0x000200F8, 0x0000601F, 0x0004003D, 0x000001FE, 0x00005300,
0x0000142C, 0x0004003D, 0x00000013, 0x00004CC6, 0x000015D8, 0x00050057,
0x0000001D, 0x00005D43, 0x00005300, 0x00004CC6, 0x00050051, 0x0000000D,
0x00003D2E, 0x00005D43, 0x00000000, 0x0003003E, 0x000011F3, 0x00003D2E,
0x000100FD, 0x00010038,
};

View File

@@ -1,149 +0,0 @@
// generated from `xb genspirv`
// source: blit.vert
const uint8_t blit_vert[] = {
0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x0A, 0x00, 0x08, 0x00,
0x4C, 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, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x69, 0x6E, 0x00, 0x00, 0x00, 0x00,
0x16, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x42, 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, 0x06, 0x00, 0x16, 0x00, 0x00, 0x00,
0x67, 0x6C, 0x5F, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6E, 0x64,
0x65, 0x78, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00,
0x69, 0x6E, 0x64, 0x65, 0x78, 0x61, 0x62, 0x6C, 0x65, 0x00, 0x00, 0x00,
0x05, 0x00, 0x06, 0x00, 0x25, 0x00, 0x00, 0x00, 0x50, 0x75, 0x73, 0x68,
0x43, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0x00, 0x00,
0x06, 0x00, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x73, 0x72, 0x63, 0x5F, 0x75, 0x76, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00,
0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x73, 0x74, 0x5F,
0x75, 0x76, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x27, 0x00, 0x00, 0x00,
0x70, 0x75, 0x73, 0x68, 0x5F, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E,
0x74, 0x73, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00,
0x67, 0x6C, 0x5F, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78,
0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x6F, 0x73, 0x69, 0x74,
0x69, 0x6F, 0x6E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x30, 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,
0x30, 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, 0x30, 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, 0x32, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, 0x42, 0x00, 0x00, 0x00,
0x76, 0x74, 0x78, 0x5F, 0x75, 0x76, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00,
0x16, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00,
0x48, 0x00, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
0x10, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x30, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x48, 0x00, 0x05, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x0B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00,
0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x30, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x47, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x47, 0x00, 0x04, 0x00, 0x42, 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,
0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2B, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00,
0x06, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
0x0D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00,
0x06, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F,
0x2C, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x05, 0x00,
0x07, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x07, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x0E, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
0x12, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00,
0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x04, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00,
0x07, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00,
0x06, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x17, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x04, 0x00, 0x25, 0x00, 0x00, 0x00,
0x22, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x26, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x04, 0x00, 0x26, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
0x09, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00,
0x28, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00,
0x29, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x2C, 0x00, 0x07, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x00, 0x00,
0x2E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00,
0x2F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00,
0x1E, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00,
0x06, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00,
0x20, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x30, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00,
0x32, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00,
0x14, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x00, 0x04, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x22, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x41, 0x00, 0x00, 0x00,
0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00,
0x41, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x03, 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, 0x3B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00,
0x19, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00,
0x14, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00,
0x3E, 0x00, 0x03, 0x00, 0x19, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
0x41, 0x00, 0x05, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00,
0x19, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00,
0x07, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00,
0x41, 0x00, 0x05, 0x00, 0x29, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00,
0x27, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00,
0x22, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00,
0x85, 0x00, 0x05, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00,
0x2B, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00,
0x07, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00,
0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x83, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x35, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00,
0x07, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00,
0x2D, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x85, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00,
0x1B, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00,
0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00,
0x3A, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00,
0x3C, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00,
0x3B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00,
0x22, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00,
0x3D, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00,
0x41, 0x00, 0x05, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x32, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00,
0x40, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00,
0x29, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
0x33, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00,
0x45, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00,
0x07, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
0x45, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
0x85, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00,
0x1B, 0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00,
0x07, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x81, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00,
0x47, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00,
0x42, 0x00, 0x00, 0x00, 0x4B, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00,
0x38, 0x00, 0x01, 0x00,
};

View File

@@ -1,99 +0,0 @@
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 76
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %gl_VertexIndex %_ %vtx_uv
OpSource GLSL 450
OpName %main "main"
OpName %gl_VertexIndex "gl_VertexIndex"
OpName %indexable "indexable"
OpName %PushConstants "PushConstants"
OpMemberName %PushConstants 0 "src_uv"
OpMemberName %PushConstants 1 "dst_uv"
OpName %push_constants "push_constants"
OpName %gl_PerVertex "gl_PerVertex"
OpMemberName %gl_PerVertex 0 "gl_Position"
OpMemberName %gl_PerVertex 1 "gl_PointSize"
OpMemberName %gl_PerVertex 2 "gl_ClipDistance"
OpMemberName %gl_PerVertex 3 "gl_CullDistance"
OpName %_ ""
OpName %vtx_uv "vtx_uv"
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
OpMemberDecorate %PushConstants 0 Offset 0
OpMemberDecorate %PushConstants 1 Offset 16
OpDecorate %PushConstants Block
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance
OpDecorate %gl_PerVertex Block
OpDecorate %vtx_uv Location 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_v2float_uint_4 = OpTypeArray %v2float %uint_4
%float_0 = OpConstant %float 0
%14 = OpConstantComposite %v2float %float_0 %float_0
%float_1 = OpConstant %float 1
%16 = OpConstantComposite %v2float %float_1 %float_0
%17 = OpConstantComposite %v2float %float_0 %float_1
%18 = OpConstantComposite %v2float %float_1 %float_1
%19 = OpConstantComposite %_arr_v2float_uint_4 %14 %16 %17 %18
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
%_ptr_Function__arr_v2float_uint_4 = OpTypePointer Function %_arr_v2float_uint_4
%float_2 = OpConstant %float 2
%v4float = OpTypeVector %float 4
%PushConstants = OpTypeStruct %v4float %v4float
%_ptr_PushConstant_PushConstants = OpTypePointer PushConstant %PushConstants
%push_constants = OpVariable %_ptr_PushConstant_PushConstants PushConstant
%int_1 = OpConstant %int 1
%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float
%44 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
%int_0 = OpConstant %int 0
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_ptr_Output_v2float = OpTypePointer Output %v2float
%vtx_uv = OpVariable %_ptr_Output_v2float Output
%main = OpFunction %void None %3
%5 = OpLabel
%indexable = OpVariable %_ptr_Function__arr_v2float_uint_4 Function
%23 = OpLoad %int %gl_VertexIndex
OpStore %indexable %19
%26 = OpAccessChain %_ptr_Function_v2float %indexable %23
%27 = OpLoad %v2float %26
%42 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_1
%43 = OpLoad %v4float %42
%45 = OpFMul %v4float %43 %44
%53 = OpVectorShuffle %v2float %45 %45 0 1
%54 = OpFSub %v2float %53 %18
%57 = OpVectorShuffle %v2float %45 %45 2 3
%58 = OpFMul %v2float %27 %57
%59 = OpFAdd %v2float %54 %58
%60 = OpCompositeExtract %float %59 0
%61 = OpCompositeExtract %float %59 1
%62 = OpCompositeConstruct %v4float %60 %61 %float_0 %float_1
%64 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %64 %62
%68 = OpAccessChain %_ptr_PushConstant_v4float %push_constants %int_0
%69 = OpLoad %v4float %68
%70 = OpVectorShuffle %v2float %69 %69 2 3
%71 = OpFMul %v2float %27 %70
%74 = OpVectorShuffle %v2float %69 %69 0 1
%75 = OpFAdd %v2float %71 %74
OpStore %vtx_uv %75
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,149 @@
// Generated with `xb buildshaders`.
#if 0
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 10
; Bound: 25137
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %5663 "main" %gl_VertexIndex %4930 %5592
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
OpMemberDecorate %_struct_1080 0 Offset 0
OpMemberDecorate %_struct_1080 1 Offset 16
OpDecorate %_struct_1080 Block
OpMemberDecorate %_struct_1589 0 BuiltIn Position
OpMemberDecorate %_struct_1589 1 BuiltIn PointSize
OpMemberDecorate %_struct_1589 2 BuiltIn ClipDistance
OpMemberDecorate %_struct_1589 3 BuiltIn CullDistance
OpDecorate %_struct_1589 Block
OpDecorate %5592 Location 0
%void = OpTypeVoid
%1282 = OpTypeFunction %void
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%_ptr_Function_v2float = OpTypePointer Function %v2float
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_v2float_uint_4 = OpTypeArray %v2float %uint_4
%float_0 = OpConstant %float 0
%1823 = OpConstantComposite %v2float %float_0 %float_0
%float_1 = OpConstant %float 1
%312 = OpConstantComposite %v2float %float_1 %float_0
%889 = OpConstantComposite %v2float %float_0 %float_1
%768 = OpConstantComposite %v2float %float_1 %float_1
%809 = OpConstantComposite %_arr_v2float_uint_4 %1823 %312 %889 %768
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
%_ptr_Function__arr_v2float_uint_4 = OpTypePointer Function %_arr_v2float_uint_4
%float_2 = OpConstant %float 2
%v4float = OpTypeVector %float 4
%_struct_1080 = OpTypeStruct %v4float %v4float
%_ptr_PushConstant__struct_1080 = OpTypePointer PushConstant %_struct_1080
%3463 = OpVariable %_ptr_PushConstant__struct_1080 PushConstant
%int_1 = OpConstant %int 1
%_ptr_PushConstant_v4float = OpTypePointer PushConstant %v4float
%2243 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_struct_1589 = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1
%_ptr_Output__struct_1589 = OpTypePointer Output %_struct_1589
%4930 = OpVariable %_ptr_Output__struct_1589 Output
%int_0 = OpConstant %int 0
%_ptr_Output_v4float = OpTypePointer Output %v4float
%_ptr_Output_v2float = OpTypePointer Output %v2float
%5592 = OpVariable %_ptr_Output_v2float Output
%5663 = OpFunction %void None %1282
%24953 = OpLabel
%5238 = OpVariable %_ptr_Function__arr_v2float_uint_4 Function
%24173 = OpLoad %int %gl_VertexIndex
OpStore %5238 %809
%16679 = OpAccessChain %_ptr_Function_v2float %5238 %24173
%7372 = OpLoad %v2float %16679
%21446 = OpAccessChain %_ptr_PushConstant_v4float %3463 %int_1
%10986 = OpLoad %v4float %21446
%7772 = OpFMul %v4float %10986 %2243
%17065 = OpVectorShuffle %v2float %7772 %7772 0 1
%22600 = OpFSub %v2float %17065 %768
%7156 = OpVectorShuffle %v2float %7772 %7772 2 3
%20491 = OpFMul %v2float %7372 %7156
%18197 = OpFAdd %v2float %22600 %20491
%10599 = OpCompositeExtract %float %18197 0
%13956 = OpCompositeExtract %float %18197 1
%18260 = OpCompositeConstruct %v4float %10599 %13956 %float_0 %float_1
%8483 = OpAccessChain %_ptr_Output_v4float %4930 %int_0
OpStore %8483 %18260
%20171 = OpAccessChain %_ptr_PushConstant_v4float %3463 %int_0
%6318 = OpLoad %v4float %20171
%7688 = OpVectorShuffle %v2float %6318 %6318 2 3
%18797 = OpFMul %v2float %7372 %7688
%18691 = OpVectorShuffle %v2float %6318 %6318 0 1
%25136 = OpFAdd %v2float %18797 %18691
OpStore %5592 %25136
OpReturn
OpFunctionEnd
#endif
const uint32_t blit_vs[] = {
0x07230203, 0x00010000, 0x0008000A, 0x00006231, 0x00000000, 0x00020011,
0x00000001, 0x0006000B, 0x00000001, 0x4C534C47, 0x6474732E, 0x3035342E,
0x00000000, 0x0003000E, 0x00000000, 0x00000001, 0x0008000F, 0x00000000,
0x0000161F, 0x6E69616D, 0x00000000, 0x00001029, 0x00001342, 0x000015D8,
0x00040047, 0x00001029, 0x0000000B, 0x0000002A, 0x00050048, 0x00000438,
0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000438, 0x00000001,
0x00000023, 0x00000010, 0x00030047, 0x00000438, 0x00000002, 0x00050048,
0x00000635, 0x00000000, 0x0000000B, 0x00000000, 0x00050048, 0x00000635,
0x00000001, 0x0000000B, 0x00000001, 0x00050048, 0x00000635, 0x00000002,
0x0000000B, 0x00000003, 0x00050048, 0x00000635, 0x00000003, 0x0000000B,
0x00000004, 0x00030047, 0x00000635, 0x00000002, 0x00040047, 0x000015D8,
0x0000001E, 0x00000000, 0x00020013, 0x00000008, 0x00030021, 0x00000502,
0x00000008, 0x00030016, 0x0000000D, 0x00000020, 0x00040017, 0x00000013,
0x0000000D, 0x00000002, 0x00040020, 0x00000290, 0x00000007, 0x00000013,
0x00040015, 0x0000000B, 0x00000020, 0x00000000, 0x0004002B, 0x0000000B,
0x00000A16, 0x00000004, 0x0004001C, 0x00000276, 0x00000013, 0x00000A16,
0x0004002B, 0x0000000D, 0x00000A0C, 0x00000000, 0x0005002C, 0x00000013,
0x0000071F, 0x00000A0C, 0x00000A0C, 0x0004002B, 0x0000000D, 0x0000008A,
0x3F800000, 0x0005002C, 0x00000013, 0x00000138, 0x0000008A, 0x00000A0C,
0x0005002C, 0x00000013, 0x00000379, 0x00000A0C, 0x0000008A, 0x0005002C,
0x00000013, 0x00000300, 0x0000008A, 0x0000008A, 0x0007002C, 0x00000276,
0x00000329, 0x0000071F, 0x00000138, 0x00000379, 0x00000300, 0x00040015,
0x0000000C, 0x00000020, 0x00000001, 0x00040020, 0x00000289, 0x00000001,
0x0000000C, 0x0004003B, 0x00000289, 0x00001029, 0x00000001, 0x00040020,
0x000004F3, 0x00000007, 0x00000276, 0x0004002B, 0x0000000D, 0x00000018,
0x40000000, 0x00040017, 0x0000001D, 0x0000000D, 0x00000004, 0x0004001E,
0x00000438, 0x0000001D, 0x0000001D, 0x00040020, 0x000006B5, 0x00000009,
0x00000438, 0x0004003B, 0x000006B5, 0x00000D87, 0x00000009, 0x0004002B,
0x0000000C, 0x00000A0E, 0x00000001, 0x00040020, 0x0000029A, 0x00000009,
0x0000001D, 0x0007002C, 0x0000001D, 0x000008C3, 0x00000018, 0x00000018,
0x00000018, 0x00000018, 0x0004002B, 0x0000000B, 0x00000A0D, 0x00000001,
0x0004001C, 0x000002E3, 0x0000000D, 0x00000A0D, 0x0006001E, 0x00000635,
0x0000001D, 0x0000000D, 0x000002E3, 0x000002E3, 0x00040020, 0x000008B2,
0x00000003, 0x00000635, 0x0004003B, 0x000008B2, 0x00001342, 0x00000003,
0x0004002B, 0x0000000C, 0x00000A0B, 0x00000000, 0x00040020, 0x0000029B,
0x00000003, 0x0000001D, 0x00040020, 0x00000291, 0x00000003, 0x00000013,
0x0004003B, 0x00000291, 0x000015D8, 0x00000003, 0x00050036, 0x00000008,
0x0000161F, 0x00000000, 0x00000502, 0x000200F8, 0x00006179, 0x0004003B,
0x000004F3, 0x00001476, 0x00000007, 0x0004003D, 0x0000000C, 0x00005E6D,
0x00001029, 0x0003003E, 0x00001476, 0x00000329, 0x00050041, 0x00000290,
0x00004127, 0x00001476, 0x00005E6D, 0x0004003D, 0x00000013, 0x00001CCC,
0x00004127, 0x00050041, 0x0000029A, 0x000053C6, 0x00000D87, 0x00000A0E,
0x0004003D, 0x0000001D, 0x00002AEA, 0x000053C6, 0x00050085, 0x0000001D,
0x00001E5C, 0x00002AEA, 0x000008C3, 0x0007004F, 0x00000013, 0x000042A9,
0x00001E5C, 0x00001E5C, 0x00000000, 0x00000001, 0x00050083, 0x00000013,
0x00005848, 0x000042A9, 0x00000300, 0x0007004F, 0x00000013, 0x00001BF4,
0x00001E5C, 0x00001E5C, 0x00000002, 0x00000003, 0x00050085, 0x00000013,
0x0000500B, 0x00001CCC, 0x00001BF4, 0x00050081, 0x00000013, 0x00004715,
0x00005848, 0x0000500B, 0x00050051, 0x0000000D, 0x00002967, 0x00004715,
0x00000000, 0x00050051, 0x0000000D, 0x00003684, 0x00004715, 0x00000001,
0x00070050, 0x0000001D, 0x00004754, 0x00002967, 0x00003684, 0x00000A0C,
0x0000008A, 0x00050041, 0x0000029B, 0x00002123, 0x00001342, 0x00000A0B,
0x0003003E, 0x00002123, 0x00004754, 0x00050041, 0x0000029A, 0x00004ECB,
0x00000D87, 0x00000A0B, 0x0004003D, 0x0000001D, 0x000018AE, 0x00004ECB,
0x0007004F, 0x00000013, 0x00001E08, 0x000018AE, 0x000018AE, 0x00000002,
0x00000003, 0x00050085, 0x00000013, 0x0000496D, 0x00001CCC, 0x00001E08,
0x0007004F, 0x00000013, 0x00004903, 0x000018AE, 0x000018AE, 0x00000000,
0x00000001, 0x00050081, 0x00000013, 0x00006230, 0x0000496D, 0x00004903,
0x0003003E, 0x000015D8, 0x00006230, 0x000100FD, 0x00010038,
};

View File

@@ -25,8 +25,10 @@ namespace ui {
namespace vulkan {
// Generated with `xb buildshaders`.
#include "xenia/ui/shaders/bytecode/vulkan_spirv/immediate_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/immediate_vert.h"
namespace shaders {
#include "xenia/ui/shaders/bytecode/vulkan_spirv/immediate_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/immediate_vs.h"
} // namespace shaders
VulkanImmediateDrawer::VulkanImmediateTexture::~VulkanImmediateTexture() {
if (immediate_drawer_) {
@@ -578,8 +580,8 @@ bool VulkanImmediateDrawer::EnsurePipelinesCreatedForCurrentRenderPass() {
VkPipelineShaderStageCreateInfo stages[2] = {};
stages[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
stages[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
stages[0].module = util::CreateShaderModule(provider_, immediate_vert,
sizeof(immediate_vert));
stages[0].module = util::CreateShaderModule(provider_, shaders::immediate_vs,
sizeof(shaders::immediate_vs));
if (stages[0].module == VK_NULL_HANDLE) {
XELOGE("VulkanImmediateDrawer: Failed to create the vertex shader module");
return false;
@@ -587,8 +589,8 @@ bool VulkanImmediateDrawer::EnsurePipelinesCreatedForCurrentRenderPass() {
stages[0].pName = "main";
stages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
stages[1].module = util::CreateShaderModule(provider_, immediate_frag,
sizeof(immediate_frag));
stages[1].module = util::CreateShaderModule(provider_, shaders::immediate_ps,
sizeof(shaders::immediate_ps));
if (stages[1].module == VK_NULL_HANDLE) {
XELOGE(
"VulkanImmediateDrawer: Failed to create the fragment shader module");

View File

@@ -60,16 +60,16 @@ namespace vulkan {
// Generated with `xb buildshaders`.
namespace shaders {
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_bilinear_dither_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_bilinear_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_resample_dither_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_resample_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_sharpen_dither_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_sharpen_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_easu_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_rcas_dither_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_rcas_frag.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_triangle_strip_rect_vert.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_bilinear_dither_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_bilinear_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_resample_dither_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_resample_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_sharpen_dither_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_cas_sharpen_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_easu_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_rcas_dither_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_ffx_fsr_rcas_ps.h"
#include "xenia/ui/shaders/bytecode/vulkan_spirv/guest_output_triangle_strip_rect_vs.h"
} // namespace shaders
VulkanPresenter::PaintContext::Submission::~Submission() {
@@ -2213,9 +2213,9 @@ bool VulkanPresenter::InitializeSurfaceIndependent() {
shader_module_create_info.pNext = nullptr;
shader_module_create_info.flags = 0;
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_triangle_strip_rect_vert);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_triangle_strip_rect_vert);
sizeof(shaders::guest_output_triangle_strip_rect_vs);
shader_module_create_info.pCode =
shaders::guest_output_triangle_strip_rect_vs;
if (dfn.vkCreateShaderModule(device, &shader_module_create_info, nullptr,
&guest_output_paint_vs_) != VK_SUCCESS) {
XELOGE(
@@ -2229,57 +2229,54 @@ bool VulkanPresenter::InitializeSurfaceIndependent() {
switch (guest_output_paint_effect) {
case GuestOutputPaintEffect::kBilinear:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_bilinear_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_bilinear_frag);
sizeof(shaders::guest_output_bilinear_ps);
shader_module_create_info.pCode = shaders::guest_output_bilinear_ps;
break;
case GuestOutputPaintEffect::kBilinearDither:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_bilinear_dither_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_bilinear_dither_frag);
sizeof(shaders::guest_output_bilinear_dither_ps);
shader_module_create_info.pCode =
shaders::guest_output_bilinear_dither_ps;
break;
case GuestOutputPaintEffect::kCasSharpen:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_cas_sharpen_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_cas_sharpen_frag);
sizeof(shaders::guest_output_ffx_cas_sharpen_ps);
shader_module_create_info.pCode =
shaders::guest_output_ffx_cas_sharpen_ps;
break;
case GuestOutputPaintEffect::kCasSharpenDither:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_cas_sharpen_dither_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_cas_sharpen_dither_frag);
sizeof(shaders::guest_output_ffx_cas_sharpen_dither_ps);
shader_module_create_info.pCode =
shaders::guest_output_ffx_cas_sharpen_dither_ps;
break;
case GuestOutputPaintEffect::kCasResample:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_cas_resample_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_cas_resample_frag);
sizeof(shaders::guest_output_ffx_cas_resample_ps);
shader_module_create_info.pCode =
shaders::guest_output_ffx_cas_resample_ps;
break;
case GuestOutputPaintEffect::kCasResampleDither:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_cas_resample_dither_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_cas_resample_dither_frag);
sizeof(shaders::guest_output_ffx_cas_resample_dither_ps);
shader_module_create_info.pCode =
shaders::guest_output_ffx_cas_resample_dither_ps;
break;
case GuestOutputPaintEffect::kFsrEasu:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_fsr_easu_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_fsr_easu_frag);
sizeof(shaders::guest_output_ffx_fsr_easu_ps);
shader_module_create_info.pCode = shaders::guest_output_ffx_fsr_easu_ps;
break;
case GuestOutputPaintEffect::kFsrRcas:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_fsr_rcas_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_fsr_rcas_frag);
sizeof(shaders::guest_output_ffx_fsr_rcas_ps);
shader_module_create_info.pCode = shaders::guest_output_ffx_fsr_rcas_ps;
break;
case GuestOutputPaintEffect::kFsrRcasDither:
shader_module_create_info.codeSize =
sizeof(shaders::guest_output_ffx_fsr_rcas_dither_frag);
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(
shaders::guest_output_ffx_fsr_rcas_dither_frag);
sizeof(shaders::guest_output_ffx_fsr_rcas_dither_ps);
shader_module_create_info.pCode =
shaders::guest_output_ffx_fsr_rcas_dither_ps;
break;
default:
// Not supported by this implementation.

View File

@@ -155,13 +155,14 @@ bool CreateDedicatedAllocationImage(const VulkanProvider& provider,
VkDeviceSize* memory_size_out = nullptr);
inline VkShaderModule CreateShaderModule(const VulkanProvider& provider,
const void* code, size_t code_size) {
const uint32_t* code,
size_t code_size_bytes) {
VkShaderModuleCreateInfo shader_module_create_info;
shader_module_create_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
shader_module_create_info.pNext = nullptr;
shader_module_create_info.flags = 0;
shader_module_create_info.codeSize = code_size;
shader_module_create_info.pCode = reinterpret_cast<const uint32_t*>(code);
shader_module_create_info.codeSize = code_size_bytes;
shader_module_create_info.pCode = code;
VkShaderModule shader_module;
return provider.dfn().vkCreateShaderModule(
provider.device(), &shader_module_create_info, nullptr,