From 0c1a46d70888c08e7a6ae5b17019e58effdda893 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Sat, 13 May 2017 10:02:05 -0500 Subject: [PATCH] Vulkan UI: Set up the blitter. --- src/xenia/ui/vulkan/blitter.cc | 313 ++++++++++++++---- src/xenia/ui/vulkan/blitter.h | 59 +++- .../ui/vulkan/shaders/bin/blit_color_frag.h | 132 ++++---- .../ui/vulkan/shaders/bin/blit_color_frag.spv | Bin 956 -> 1000 bytes .../ui/vulkan/shaders/bin/blit_color_frag.txt | 22 +- .../ui/vulkan/shaders/bin/blit_depth_frag.h | 104 +++--- .../ui/vulkan/shaders/bin/blit_depth_frag.spv | Bin 692 -> 912 bytes .../ui/vulkan/shaders/bin/blit_depth_frag.txt | 14 +- src/xenia/ui/vulkan/shaders/bin/blit_vert.h | 227 +++++++------ src/xenia/ui/vulkan/shaders/bin/blit_vert.spv | Bin 1376 -> 1648 bytes src/xenia/ui/vulkan/shaders/bin/blit_vert.txt | 81 +++-- .../ui/vulkan/shaders/bin/immediate_frag.h | 228 +++++++------ .../ui/vulkan/shaders/bin/immediate_frag.spv | Bin 1324 -> 1524 bytes .../ui/vulkan/shaders/bin/immediate_frag.txt | 14 +- src/xenia/ui/vulkan/shaders/blit.vert | 16 +- src/xenia/ui/vulkan/shaders/blit_color.frag | 5 +- src/xenia/ui/vulkan/shaders/blit_depth.frag | 5 + src/xenia/ui/vulkan/shaders/immediate.frag | 3 + 18 files changed, 783 insertions(+), 440 deletions(-) diff --git a/src/xenia/ui/vulkan/blitter.cc b/src/xenia/ui/vulkan/blitter.cc index d626d64e2..2eb121446 100644 --- a/src/xenia/ui/vulkan/blitter.cc +++ b/src/xenia/ui/vulkan/blitter.cc @@ -9,6 +9,7 @@ #include "xenia/ui/vulkan/blitter.h" #include "xenia/base/math.h" +#include "xenia/ui/vulkan/fenced_pools.h" namespace xe { namespace ui { @@ -20,7 +21,7 @@ namespace vulkan { #include "xenia/ui/vulkan/shaders/bin/blit_vert.h" Blitter::Blitter() {} -Blitter::~Blitter() {} +Blitter::~Blitter() { Shutdown(); } bool Blitter::Initialize(VulkanDevice* device) { device_ = device; @@ -48,8 +49,7 @@ bool Blitter::Initialize(VulkanDevice* device) { CheckResult(result, "vkCreateShaderModule"); // Create the descriptor set layout used for our texture sampler. - // As it changes almost every draw we keep it separate from the uniform buffer - // and cache it on the textures. + // As it changes almost every draw we cache it per texture. VkDescriptorSetLayoutCreateInfo texture_set_layout_info; texture_set_layout_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; @@ -67,8 +67,15 @@ bool Blitter::Initialize(VulkanDevice* device) { nullptr, &descriptor_set_layout_); CheckResult(result, "vkCreateDescriptorSetLayout"); + // Create a descriptor pool + VkDescriptorPoolSize pool_sizes[1]; + pool_sizes[0].descriptorCount = 4096; + pool_sizes[0].type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + descriptor_pool_ = std::make_unique( + *device_, 4096, + std::vector(pool_sizes, std::end(pool_sizes))); + // Create the pipeline layout used for our pipeline. - // If we had multiple pipelines they would share this. VkPipelineLayoutCreateInfo pipeline_layout_info; pipeline_layout_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; pipeline_layout_info.pNext = nullptr; @@ -78,12 +85,17 @@ bool Blitter::Initialize(VulkanDevice* device) { static_cast(xe::countof(set_layouts)); pipeline_layout_info.pSetLayouts = set_layouts; VkPushConstantRange push_constant_ranges[2]; + + // vec4 src_uv push_constant_ranges[0].stageFlags = VK_SHADER_STAGE_VERTEX_BIT; push_constant_ranges[0].offset = 0; - push_constant_ranges[0].size = sizeof(float) * 16; + push_constant_ranges[0].size = sizeof(float) * 4; + + // bool swap_channels push_constant_ranges[1].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT; - push_constant_ranges[1].offset = sizeof(float) * 16; - push_constant_ranges[1].size = sizeof(int); + push_constant_ranges[1].offset = sizeof(float) * 4; + push_constant_ranges[1].size = sizeof(int) * 4; + pipeline_layout_info.pushConstantRangeCount = static_cast(xe::countof(push_constant_ranges)); pipeline_layout_info.pPushConstantRanges = push_constant_ranges; @@ -91,10 +103,44 @@ bool Blitter::Initialize(VulkanDevice* device) { &pipeline_layout_); CheckResult(result, "vkCreatePipelineLayout"); + // Create two samplers. + VkSamplerCreateInfo sampler_create_info = { + VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, + nullptr, + 0, + VK_FILTER_NEAREST, + VK_FILTER_NEAREST, + VK_SAMPLER_MIPMAP_MODE_NEAREST, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE, + 0.f, + VK_FALSE, + 0.f, + VK_FALSE, + VK_COMPARE_OP_NEVER, + 0.f, + 0.f, + VK_BORDER_COLOR_INT_TRANSPARENT_BLACK, + VK_FALSE, + }; + result = + vkCreateSampler(*device_, &sampler_create_info, nullptr, &samp_nearest_); + CheckResult(result, "vkCreateSampler"); + + sampler_create_info.minFilter = VK_FILTER_LINEAR; + sampler_create_info.magFilter = VK_FILTER_LINEAR; + sampler_create_info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR; + result = + vkCreateSampler(*device_, &sampler_create_info, nullptr, &samp_linear_); + CheckResult(result, "vkCreateSampler"); + return true; } void Blitter::Shutdown() { + vkDestroySampler(*device_, samp_nearest_, nullptr); + vkDestroySampler(*device_, samp_linear_, nullptr); vkDestroyShaderModule(*device_, blit_vertex_, nullptr); vkDestroyShaderModule(*device_, blit_color_, nullptr); vkDestroyShaderModule(*device_, blit_depth_, nullptr); @@ -102,64 +148,218 @@ void Blitter::Shutdown() { vkDestroyPipeline(*device_, pipeline_depth_, nullptr); vkDestroyPipelineLayout(*device_, pipeline_layout_, nullptr); vkDestroyDescriptorSetLayout(*device_, descriptor_set_layout_, nullptr); - vkDestroyRenderPass(*device_, render_pass_, nullptr); + + for (auto& pipeline : pipelines_) { + vkDestroyPipeline(*device_, pipeline.second, nullptr); + } + pipelines_.clear(); + + for (auto& pass : render_passes_) { + vkDestroyRenderPass(*device_, pass.second, nullptr); + } + render_passes_.clear(); } -void Blitter::BlitTexture2D(VkCommandBuffer command_buffer, VkImage src_image, - VkImageView src_image_view, VkOffset2D src_offset, - VkExtent2D src_extents, VkImage dst_image, - VkImageView dst_image_view, VkFilter filter, - bool swap_channels) {} +void Blitter::Scavenge() { + if (descriptor_pool_->has_open_batch()) { + descriptor_pool_->EndBatch(); + } -void Blitter::CopyColorTexture2D(VkCommandBuffer command_buffer, + descriptor_pool_->Scavenge(); +} + +void Blitter::BlitTexture2D(VkCommandBuffer command_buffer, VkFence fence, + VkImageView src_image_view, VkRect2D src_rect, + VkExtent2D src_extents, VkFormat dst_image_format, + VkOffset2D dst_offset, VkExtent2D dst_extents, + VkFramebuffer dst_framebuffer, VkFilter filter, + bool color_or_depth, bool swap_channels) { + // Do we need a full draw, or can we cheap out with a blit command? + bool full_draw = swap_channels || true; + if (full_draw) { + if (!descriptor_pool_->has_open_batch()) { + descriptor_pool_->BeginBatch(fence); + } + + // Acquire a render pass. + auto render_pass = GetRenderPass(dst_image_format); + VkRenderPassBeginInfo render_pass_info = { + VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, + nullptr, + render_pass, + dst_framebuffer, + {{dst_offset.x, dst_offset.y}, {dst_extents.width, dst_extents.height}}, + 0, + nullptr, + }; + + vkCmdBeginRenderPass(command_buffer, &render_pass_info, + VK_SUBPASS_CONTENTS_INLINE); + + VkViewport viewport = { + float(dst_offset.x), + float(dst_offset.y), + float(dst_extents.width), + float(dst_extents.height), + 0.f, + 1.f, + }; + vkCmdSetViewport(command_buffer, 0, 1, &viewport); + + VkRect2D scissor = { + dst_offset.x, dst_offset.y, dst_extents.width, dst_extents.height, + }; + vkCmdSetScissor(command_buffer, 0, 1, &scissor); + + // Acquire a pipeline. + auto pipeline = + GetPipeline(render_pass, color_or_depth ? blit_color_ : blit_depth_); + vkCmdBindPipeline(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, + pipeline); + + // Acquire and update a descriptor set for this image. + auto set = descriptor_pool_->AcquireEntry(descriptor_set_layout_); + assert_not_null(set); + + VkWriteDescriptorSet write; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.pNext = nullptr; + write.dstSet = set; + write.dstBinding = 0; + write.dstArrayElement = 0; + write.descriptorCount = 1; + write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; + + VkDescriptorImageInfo image; + image.sampler = filter == VK_FILTER_NEAREST ? samp_nearest_ : samp_linear_; + image.imageView = src_image_view; + image.imageLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + + write.pImageInfo = ℑ + write.pBufferInfo = nullptr; + write.pTexelBufferView = nullptr; + vkUpdateDescriptorSets(*device_, 1, &write, 0, nullptr); + + vkCmdBindDescriptorSets(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, + pipeline_layout_, 0, 1, &set, 0, nullptr); + + VtxPushConstants vtx_constants = { + { + float(src_rect.offset.x) / src_extents.width, + float(src_rect.offset.y) / src_extents.height, + float(src_rect.extent.width) / src_extents.width, + float(src_rect.extent.height) / src_extents.height, + }, + }; + vkCmdPushConstants(command_buffer, pipeline_layout_, + VK_SHADER_STAGE_VERTEX_BIT, 0, sizeof(VtxPushConstants), + &vtx_constants); + + PixPushConstants pix_constants = { + 0, 0, 0, swap_channels ? 1 : 0, + }; + vkCmdPushConstants(command_buffer, pipeline_layout_, + VK_SHADER_STAGE_FRAGMENT_BIT, sizeof(VtxPushConstants), + sizeof(PixPushConstants), &pix_constants); + + vkCmdDraw(command_buffer, 4, 1, 0, 0); + vkCmdEndRenderPass(command_buffer); + } +} + +void Blitter::CopyColorTexture2D(VkCommandBuffer command_buffer, VkFence fence, VkImage src_image, VkImageView src_image_view, VkOffset2D src_offset, VkImage dst_image, VkImageView dst_image_view, VkExtent2D extents, VkFilter filter, bool swap_channels) {} -void Blitter::CopyDepthTexture(VkCommandBuffer command_buffer, +void Blitter::CopyDepthTexture(VkCommandBuffer command_buffer, VkFence fence, VkImage src_image, VkImageView src_image_view, VkOffset2D src_offset, VkImage dst_image, VkImageView dst_image_view, VkExtent2D extents) { } +VkRenderPass Blitter::GetRenderPass(VkFormat format) { + auto pass = render_passes_.find(format); + if (pass != render_passes_.end()) { + return pass->second; + } + + // Create and cache the render pass. + VkRenderPass render_pass = CreateRenderPass(format); + if (render_pass) { + render_passes_[format] = render_pass; + } + + return render_pass; +} + +VkPipeline Blitter::GetPipeline(VkRenderPass render_pass, + VkShaderModule frag_shader) { + auto it = pipelines_.find(std::make_pair(render_pass, frag_shader)); + if (it != pipelines_.end()) { + return it->second; + } + + // Create and cache the pipeline. + VkPipeline pipeline = CreatePipeline(render_pass, frag_shader); + if (pipeline) { + pipelines_[std::make_pair(render_pass, frag_shader)] = pipeline; + } + + return pipeline; +} + VkRenderPass Blitter::CreateRenderPass(VkFormat output_format) { VkAttachmentDescription attachments[1]; std::memset(attachments, 0, sizeof(attachments)); // Output attachment - // TODO(DrChat): Figure out a way to leave the format undefined here. + attachments[0].flags = 0; attachments[0].format = output_format; attachments[0].samples = VK_SAMPLE_COUNT_1_BIT; attachments[0].loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[0].storeOp = VK_ATTACHMENT_STORE_OP_STORE; attachments[0].stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachments[0].stencilStoreOp = VK_ATTACHMENT_STORE_OP_STORE; - attachments[0].initialLayout = VK_IMAGE_LAYOUT_GENERAL; - attachments[0].finalLayout = VK_IMAGE_LAYOUT_GENERAL; - - VkSubpassDescription subpass; - std::memset(&subpass, 0, sizeof(subpass)); - subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; + attachments[0].initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + attachments[0].finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; VkAttachmentReference attach_refs[1]; attach_refs[0].attachment = 0; - attach_refs[0].layout = VK_IMAGE_LAYOUT_GENERAL; - subpass.colorAttachmentCount = 1; - subpass.pColorAttachments = attach_refs; + attach_refs[0].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; - VkRenderPassCreateInfo renderpass; - std::memset(&renderpass, 0, sizeof(renderpass)); - renderpass.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; - renderpass.attachmentCount = 1; - renderpass.pAttachments = attachments; - renderpass.subpassCount = 1; - renderpass.pSubpasses = &subpass; + VkSubpassDescription subpass = { + 0, VK_PIPELINE_BIND_POINT_GRAPHICS, + 0, nullptr, + 1, attach_refs, + nullptr, nullptr, + 0, nullptr, + }; - return nullptr; + VkRenderPassCreateInfo renderpass_info = { + VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, + nullptr, + 0, + 1, + attachments, + 1, + &subpass, + 0, + nullptr, + }; + VkRenderPass renderpass = nullptr; + VkResult result = + vkCreateRenderPass(*device_, &renderpass_info, nullptr, &renderpass); + CheckResult(result, "vkCreateRenderPass"); + + return renderpass; } -VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { +VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass, + VkShaderModule frag_shader) { + VkResult result = VK_SUCCESS; + // Pipeline VkGraphicsPipelineCreateInfo pipeline_info; std::memset(&pipeline_info, 0, sizeof(VkGraphicsPipelineCreateInfo)); @@ -174,25 +374,21 @@ VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { stages[0].module = blit_vertex_; stages[0].pName = "main"; stages[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; - stages[1].stage = VK_SHADER_STAGE_VERTEX_BIT; - stages[1].module = blit_color_; + stages[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT; + stages[1].module = frag_shader; stages[1].pName = "main"; + pipeline_info.pStages = stages; + // Vertex input VkPipelineVertexInputStateCreateInfo vtx_state; std::memset(&vtx_state, 0, sizeof(vtx_state)); vtx_state.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; - - VkVertexInputBindingDescription bindings[1]; - VkVertexInputAttributeDescription attribs[1]; - bindings[0].binding = 0; - bindings[0].stride = 8; - bindings[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX; - - attribs[0].location = 0; - attribs[0].binding = 0; - attribs[0].format = VK_FORMAT_R32G32_SFLOAT; - attribs[0].offset = 0; + vtx_state.flags = 0; + vtx_state.vertexAttributeDescriptionCount = 0; + vtx_state.pVertexAttributeDescriptions = nullptr; + vtx_state.vertexBindingDescriptionCount = 0; + vtx_state.pVertexBindingDescriptions = nullptr; pipeline_info.pVertexInputState = &vtx_state; @@ -202,7 +398,7 @@ VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; input_info.pNext = nullptr; input_info.flags = 0; - input_info.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; + input_info.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; input_info.primitiveRestartEnable = VK_FALSE; pipeline_info.pInputAssemblyState = &input_info; pipeline_info.pTessellationState = nullptr; @@ -224,8 +420,8 @@ VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { rasterization_info.depthClampEnable = VK_FALSE; rasterization_info.rasterizerDiscardEnable = VK_FALSE; rasterization_info.polygonMode = VK_POLYGON_MODE_FILL; - rasterization_info.cullMode = VK_CULL_MODE_BACK_BIT; - rasterization_info.frontFace = VK_FRONT_FACE_CLOCKWISE; + rasterization_info.cullMode = VK_CULL_MODE_NONE; + rasterization_info.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE; rasterization_info.depthBiasEnable = VK_FALSE; rasterization_info.depthBiasConstantFactor = 0; rasterization_info.depthBiasClamp = 0; @@ -252,14 +448,12 @@ VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { blend_info.logicOpEnable = VK_FALSE; blend_info.logicOp = VK_LOGIC_OP_NO_OP; VkPipelineColorBlendAttachmentState blend_attachments[1]; - blend_attachments[0].blendEnable = VK_TRUE; + blend_attachments[0].blendEnable = VK_FALSE; blend_attachments[0].srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA; - blend_attachments[0].dstColorBlendFactor = - VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + blend_attachments[0].dstColorBlendFactor = VK_BLEND_FACTOR_ZERO; blend_attachments[0].colorBlendOp = VK_BLEND_OP_ADD; blend_attachments[0].srcAlphaBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA; - blend_attachments[0].dstAlphaBlendFactor = - VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; + blend_attachments[0].dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; blend_attachments[0].alphaBlendOp = VK_BLEND_OP_ADD; blend_attachments[0].colorWriteMask = 0xF; blend_info.attachmentCount = @@ -280,12 +474,17 @@ VkPipeline Blitter::CreatePipeline(VkRenderPass render_pass) { dynamic_state_info.pDynamicStates = dynamic_states; pipeline_info.pDynamicState = &dynamic_state_info; pipeline_info.layout = pipeline_layout_; - pipeline_info.renderPass = render_pass_; + pipeline_info.renderPass = render_pass; pipeline_info.subpass = 0; pipeline_info.basePipelineHandle = nullptr; pipeline_info.basePipelineIndex = -1; - return nullptr; + VkPipeline pipeline = nullptr; + result = vkCreateGraphicsPipelines(*device_, nullptr, 1, &pipeline_info, + nullptr, &pipeline); + CheckResult(result, "vkCreateGraphicsPipelines"); + + return pipeline; } } // namespace vulkan diff --git a/src/xenia/ui/vulkan/blitter.h b/src/xenia/ui/vulkan/blitter.h index 6eb83cab7..620db0bc1 100644 --- a/src/xenia/ui/vulkan/blitter.h +++ b/src/xenia/ui/vulkan/blitter.h @@ -10,6 +10,7 @@ #ifndef XENIA_UI_VULKAN_BLITTER_H_ #define XENIA_UI_VULKAN_BLITTER_H_ +#include #include #include "xenia/ui/vulkan/vulkan.h" @@ -19,35 +20,55 @@ namespace xe { namespace ui { namespace vulkan { +class DescriptorPool; + class Blitter { public: Blitter(); ~Blitter(); bool Initialize(VulkanDevice* device); + void Scavenge(); void Shutdown(); // Queues commands to blit a texture to another texture. - void BlitTexture2D(VkCommandBuffer command_buffer, VkImage src_image, - VkImageView src_image_view, VkOffset2D src_offset, - VkExtent2D src_extents, VkImage dst_image, - VkImageView dst_image_view, VkFilter filter, - bool swap_channels); + // dst_framebuffer must only have one attachment, the target texture. + void BlitTexture2D(VkCommandBuffer command_buffer, VkFence fence, + VkImageView src_image_view, VkRect2D src_rect, + VkExtent2D src_extents, VkFormat dst_image_format, + VkOffset2D dst_offset, VkExtent2D dst_extents, + VkFramebuffer dst_framebuffer, VkFilter filter, + bool color_or_depth, bool swap_channels); - void CopyColorTexture2D(VkCommandBuffer command_buffer, VkImage src_image, - VkImageView src_image_view, VkOffset2D src_offset, - VkImage dst_image, VkImageView dst_image_view, - VkExtent2D extents, VkFilter filter, - bool swap_channels); - void CopyDepthTexture(VkCommandBuffer command_buffer, VkImage src_image, - VkImageView src_image_view, VkOffset2D src_offset, - VkImage dst_image, VkImageView dst_image_view, - VkExtent2D extents); + void CopyColorTexture2D(VkCommandBuffer command_buffer, VkFence fence, + VkImage src_image, VkImageView src_image_view, + VkOffset2D src_offset, VkImage dst_image, + VkImageView dst_image_view, VkExtent2D extents, + VkFilter filter, bool swap_channels); + void CopyDepthTexture(VkCommandBuffer command_buffer, VkFence fence, + VkImage src_image, VkImageView src_image_view, + VkOffset2D src_offset, VkImage dst_image, + VkImageView dst_image_view, VkExtent2D extents); + + // For framebuffer creation. + VkRenderPass GetRenderPass(VkFormat format); private: - VkRenderPass CreateRenderPass(VkFormat output_format); - VkPipeline CreatePipeline(VkRenderPass render_pass); + struct VtxPushConstants { + float src_uv[4]; // 0x00 + }; + struct PixPushConstants { + int _pad[3]; // 0x10 + int swap; // 0x1C + }; + + VkPipeline GetPipeline(VkRenderPass render_pass, VkShaderModule frag_shader); + VkRenderPass CreateRenderPass(VkFormat output_format); + VkPipeline CreatePipeline(VkRenderPass render_pass, + VkShaderModule frag_shader); + + std::unique_ptr descriptor_pool_ = nullptr; VulkanDevice* device_ = nullptr; VkPipeline pipeline_color_ = nullptr; VkPipeline pipeline_depth_ = nullptr; @@ -55,8 +76,12 @@ class Blitter { VkShaderModule blit_vertex_ = nullptr; VkShaderModule blit_color_ = nullptr; VkShaderModule blit_depth_ = nullptr; + VkSampler samp_linear_ = nullptr; + VkSampler samp_nearest_ = nullptr; VkDescriptorSetLayout descriptor_set_layout_ = nullptr; - VkRenderPass render_pass_ = nullptr; + + std::map render_passes_; + std::map, VkPipeline> pipelines_; }; } // namespace vulkan diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.h b/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.h index 50ef6d10f..d1a735f3b 100644 --- a/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.h +++ b/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.h @@ -16,69 +16,73 @@ const uint8_t blit_color_frag[] = { 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, 0x15, 0x00, 0x00, 0x00, 0x50, 0x75, 0x73, 0x68, + 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, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x73, 0x77, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, - 0x17, 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, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, - 0x15, 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, - 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x03, 0x00, 0x15, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x16, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, - 0x16, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x15, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, - 0x1A, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x02, 0x00, 0x1D, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 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, 0x17, 0x00, 0x00, 0x00, - 0x19, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x1C, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0xAB, 0x00, 0x05, 0x00, - 0x1D, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, - 0x1E, 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, + 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, + 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x16, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x1C, 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, }; diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.spv b/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.spv index 60de2cb10e45e1f09c78bf1f9713ddb6de713bb1..fa5feae3f4499813563f9a5e4474e3fd7a0526c3 100644 GIT binary patch delta 306 zcmXw!I|{;J5QH~x>@3W~M`FM#cmzoy7Fud$DFF*Xh=D{ba|I=*5HDciJv@QnF`U6a zKMcF`?aq?CoUe0z&OH%XpUcDIl$TYOS0%hHmXP!9ifqr?G7Wus$qF(HG`M}XNxM7& z>_RJbfXiefXeowx%|?6IzL?Sju^|I;;a$`iVj_a)Meh8$DL(oRL_WiuK2U6`@_l&b qWB7rZG2hNZ^msN7>k>70{h06sW2rj94;?}e{6K^{hRDJuHR>M>k{R~^ delta 262 zcmX|+Jqp555QHax2KzkYZwy$8cmlDqu(h*JrwCDa5wXe@lpMngSa=Qb3SPm^8T=U- zcIVsO2k#l)!qatZ04(-)HQVO4$nwH6*APHlvWIM^8j!~4*V6n315s)Y52iXgkJ7+L zM3M?qi6*Qc=A*&BPK!;rs~rECk0$$+cIXl3$}L(-ncJ+o*Lx9M^jNj0oPYq;-Q5iJ Xq|T<_QI~y(zVHt^>C<9Kwf4$4)TkHi diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.txt b/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.txt index fc5fdc4b8..0eeeed778 100644 --- a/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.txt +++ b/src/xenia/ui/vulkan/shaders/bin/blit_color_frag.txt @@ -14,13 +14,15 @@ OpName %src_texture "src_texture" OpName %vtx_uv "vtx_uv" OpName %PushConstants "PushConstants" - OpMemberName %PushConstants 0 "swap" + 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 0 + OpMemberDecorate %PushConstants 0 Offset 16 + OpMemberDecorate %PushConstants 1 Offset 28 OpDecorate %PushConstants Block %void = OpTypeVoid %3 = OpTypeFunction %void @@ -35,24 +37,24 @@ %v2float = OpTypeVector %float 2 %_ptr_Input_v2float = OpTypePointer Input %v2float %vtx_uv = OpVariable %_ptr_Input_v2float Input - %uint = OpTypeInt 32 0 -%PushConstants = OpTypeStruct %uint + %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 = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 +%_ptr_PushConstant_int = OpTypePointer PushConstant %int %int_0 = OpConstant %int 0 -%_ptr_PushConstant_uint = OpTypePointer PushConstant %uint %bool = OpTypeBool - %uint_0 = OpConstant %uint 0 %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_uint %push_constants %int_0 - %28 = OpLoad %uint %27 - %31 = OpINotEqual %bool %28 %uint_0 + %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 diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.h b/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.h index 214ff25db..77c1426c8 100644 --- a/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.h +++ b/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.h @@ -2,13 +2,13 @@ // source: blit_depth.frag const uint8_t blit_depth_frag[] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, - 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 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, 0x18, 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, @@ -18,45 +18,63 @@ const uint8_t blit_depth_frag[] = { 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, 0x18, 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, - 0x18, 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, 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x12, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x17, 0x00, 0x00, 0x00, - 0x18, 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, + 0x75, 0x76, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x50, 0x75, 0x73, 0x68, 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, + 0x73, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x5F, 0x70, 0x61, 0x64, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x73, 0x77, 0x61, 0x70, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, + 0x1B, 0x00, 0x00, 0x00, 0x70, 0x75, 0x73, 0x68, 0x5F, 0x63, 0x6F, 0x6E, + 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 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, + 0x48, 0x00, 0x05, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, + 0x19, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x1C, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x02, 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, + 0x15, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x04, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x04, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, + 0x1A, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, + 0x3B, 0x00, 0x04, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, + 0x09, 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, }; diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.spv b/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.spv index b31d25e454a8edbf54d9e2b97b3163dc21e2996a..92660a07fce126acdd8990e9df6349bd6eb65ee4 100644 GIT binary patch delta 315 zcmYk0%?g505QWE|tF;g!2>VkE-yw*WEeu-JK0>4xwJ|}ZWv`Itjp-m>dwFdWUXcVEvW!xi8C-T RFaxm=5L-j}5|ag)>j9At3E%(# diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.txt b/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.txt index 0ef15a102..87e1cb326 100644 --- a/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.txt +++ b/src/xenia/ui/vulkan/shaders/bin/blit_depth_frag.txt @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 1 -; Bound: 25 +; Bound: 30 ; Schema: 0 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" @@ -14,11 +14,18 @@ OpName %gl_FragDepth "gl_FragDepth" 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" OpName %oC "oC" OpDecorate %gl_FragDepth BuiltIn FragDepth OpDecorate %src_texture DescriptorSet 0 OpDecorate %src_texture Binding 0 OpDecorate %vtx_uv Location 0 + OpMemberDecorate %PushConstants 0 Offset 16 + OpMemberDecorate %PushConstants 1 Offset 28 + OpDecorate %PushConstants Block OpDecorate %oC Location 0 %void = OpTypeVoid %3 = OpTypeFunction %void @@ -35,6 +42,11 @@ %v4float = OpTypeVector %float 4 %uint = OpTypeInt 32 0 %uint_0 = OpConstant %uint 0 + %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 %_ptr_Output_v4float = OpTypePointer Output %v4float %oC = OpVariable %_ptr_Output_v4float Output %main = OpFunction %void None %3 diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_vert.h b/src/xenia/ui/vulkan/shaders/bin/blit_vert.h index 3b80a11b8..582bc80a4 100644 --- a/src/xenia/ui/vulkan/shaders/bin/blit_vert.h +++ b/src/xenia/ui/vulkan/shaders/bin/blit_vert.h @@ -2,118 +2,141 @@ // source: blit.vert const uint8_t blit_vert[] = { 0x03, 0x02, 0x23, 0x07, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x08, 0x00, - 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x02, 0x00, + 0x3C, 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, - 0x0D, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x2E, 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, 0x0B, 0x00, 0x00, 0x00, - 0x67, 0x6C, 0x5F, 0x50, 0x65, 0x72, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, - 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, 0x0B, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x6F, 0x73, 0x69, 0x74, - 0x69, 0x6F, 0x6E, 0x00, 0x06, 0x00, 0x07, 0x00, 0x0B, 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, - 0x0B, 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, 0x0B, 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, 0x0D, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x05, 0x00, 0x09, 0x00, 0x00, 0x00, 0x76, 0x66, 0x65, 0x74, 0x63, 0x68, 0x5F, 0x70, 0x6F, 0x73, 0x00, 0x00, - 0x05, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x76, 0x74, 0x78, 0x5F, - 0x75, 0x76, 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, - 0x05, 0x00, 0x06, 0x00, 0x27, 0x00, 0x00, 0x00, 0x70, 0x75, 0x73, 0x68, - 0x5F, 0x63, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0x00, - 0x48, 0x00, 0x05, 0x00, 0x0B, 0x00, 0x00, 0x00, 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, + 0x1F, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, 0x65, 0x72, 0x56, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x06, 0x00, + 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x6C, 0x5F, 0x50, + 0x6F, 0x73, 0x69, 0x74, 0x69, 0x6F, 0x6E, 0x00, 0x06, 0x00, 0x07, 0x00, + 0x1F, 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, 0x1F, 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, 0x1F, 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, + 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x04, 0x00, + 0x2E, 0x00, 0x00, 0x00, 0x76, 0x74, 0x78, 0x5F, 0x75, 0x76, 0x00, 0x00, + 0x05, 0x00, 0x06, 0x00, 0x30, 0x00, 0x00, 0x00, 0x50, 0x75, 0x73, 0x68, + 0x43, 0x6F, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x05, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x73, 0x72, 0x63, 0x5F, 0x75, 0x76, 0x00, 0x00, 0x05, 0x00, 0x06, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x70, 0x75, 0x73, 0x68, 0x5F, 0x63, 0x6F, 0x6E, + 0x73, 0x74, 0x61, 0x6E, 0x74, 0x73, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x16, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, + 0x48, 0x00, 0x05, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x1F, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x48, 0x00, 0x05, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x48, 0x00, 0x05, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, - 0x12, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x04, 0x00, 0x23, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x48, 0x00, 0x05, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x47, 0x00, 0x03, 0x00, 0x25, 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, - 0x15, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x09, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, - 0x0A, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x1E, 0x00, 0x06, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, - 0x20, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x0C, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x15, 0x00, 0x04, 0x00, - 0x0E, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x2B, 0x00, 0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x17, 0x00, 0x04, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x1F, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x47, 0x00, 0x04, 0x00, + 0x2E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x48, 0x00, 0x05, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x47, 0x00, 0x03, 0x00, + 0x30, 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, 0x02, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, - 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x3B, 0x00, 0x04, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x2B, 0x00, 0x04, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, - 0x2C, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, - 0x06, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3F, - 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0xBF, 0x2C, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x1A, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, - 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, - 0x22, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x3B, 0x00, 0x04, 0x00, 0x22, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x03, 0x00, 0x25, 0x00, 0x00, 0x00, - 0x07, 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, - 0x20, 0x00, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, - 0x07, 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, - 0x10, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - 0x85, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, - 0x13, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, - 0x1A, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, - 0x1D, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, - 0x1B, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, - 0x1E, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x20, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, - 0x21, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x28, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, - 0x27, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, - 0x4F, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, - 0x2A, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x03, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x2C, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, - 0x41, 0x00, 0x05, 0x00, 0x28, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, - 0x27, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, - 0x07, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x2D, 0x00, 0x00, 0x00, - 0x4F, 0x00, 0x07, 0x00, 0x10, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, - 0x2E, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x81, 0x00, 0x05, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, - 0x3E, 0x00, 0x03, 0x00, 0x23, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, - 0xFD, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 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, + 0x17, 0x00, 0x04, 0x00, 0x1C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, 0x0A, 0x00, 0x00, 0x00, + 0x1D, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, + 0x1E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1D, 0x00, 0x00, 0x00, + 0x1E, 0x00, 0x06, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x1F, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x00, + 0x21, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x04, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x2B, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x40, 0x2C, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x1C, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x2D, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, + 0x2D, 0x00, 0x00, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x1E, 0x00, 0x03, 0x00, 0x30, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x20, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x30, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x04, 0x00, 0x31, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x1C, 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, 0x08, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x07, 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, 0x3E, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x1B, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x23, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x85, 0x00, 0x05, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x83, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x51, 0x00, 0x05, 0x00, 0x06, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, + 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x07, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x2A, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x29, 0x00, 0x00, 0x00, + 0x0D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, + 0x2B, 0x00, 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, 0x2C, 0x00, 0x00, 0x00, + 0x2A, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x2F, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x35, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x35, 0x00, 0x00, 0x00, + 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x85, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x2F, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x41, 0x00, 0x05, 0x00, + 0x33, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x00, 0x00, 0x3D, 0x00, 0x04, 0x00, 0x1C, 0x00, 0x00, 0x00, + 0x39, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x4F, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, + 0x39, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x81, 0x00, 0x05, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, + 0x37, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x03, 0x00, + 0x2E, 0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0xFD, 0x00, 0x01, 0x00, + 0x38, 0x00, 0x01, 0x00, }; diff --git a/src/xenia/ui/vulkan/shaders/bin/blit_vert.spv b/src/xenia/ui/vulkan/shaders/bin/blit_vert.spv index 5653ae65a42546029eb102fcae53b65bc6417f28..404ac61ea1f1778aaeed858480c9d7b829735b94 100644 GIT binary patch literal 1648 zcmZ9MYfn=_5QZ19prRlm;03W2?;zd)QM?8dG$9c~;@75@qnxC+gdPa-lg9YR{8fH2 z@p;ZUTaDXHcjldUXJ=-o9q6AO3ZakB(eNY`Yb^9*hcFxl^L>3|Yh$6CZ7(b?-IXyC z26CdDQO>!JAfFp)TYVC#Aq&U=pMLhAkSnnM(6g`Bm&m-p)mYAG~jg_`|#7?7Y7uZmK|2VdH7{fDi z%>4{|6|vveHc{&0tEKJRMgLiJ^R*^>GtF*2zC*12BD#EQ_Z{?$&7k>C@r*vjd#mjB zU%&Ti*AOw|n$Km#75j6gFki&FuVRZS#++mKy!UC}E^YJo4sB;e&J5qqMC9H>_jfHO zSKHYZGuDGrm%q##Ive)DWxQV?6?V@$FP@9{+C%>bw4dU)wkgCuKjXAM-|Hn2JbNAy zlOx}A7Z7pz#@3F$S#+@<xzBZ(+vPs=G-EBjB(is0P z4Sy9cCZ6B!oobwBdgq*b?%bKVTQ1ecoV%jmHTTpNHsead&W*cDzBZ1IkLqc5T7UL@ z2gRf-=R!17I)`1Ae?Ey5;+yhY@|wJ?UrFnQ#DP@*>H_5-*WRa2s~Pn_MExu}7Zh9Y z#O!s`IE%Z9*s)yCy*VEz*>U_OLT7v2rM-hr+K=ZKvi4c4*G-F>>0_9kw+2IS#jOiB2kF^CH{pg%GOF+0YI#x`r5fsLC-g^&93q^<(fD=ixX%tAExNaoj;X zuc)FmlrJcsKA0SH_na_aKq$wyJie}&9+rh~XyrUyRS~sX4)*X+x(Th;*RIFB4IKAO z=DH#;_kgG570sC7lo`|^hSst%0aYFkrGZRqLip`2dPqaptzIs7{z`q}avJiXJi^|q~; ooM#sTGDUKpMn1 zhwzPn{K?LYg|_ZcHA+Bn5P%?JRzHxkeQ delta 48 ycmeyuy@pGYnMs+Qfq@YSIT(x?AV83TiGgvWqBi5?9L9ppGE7StH!HAQVFUo1xCh?= diff --git a/src/xenia/ui/vulkan/shaders/bin/immediate_frag.txt b/src/xenia/ui/vulkan/shaders/bin/immediate_frag.txt index 3cae188d2..af0d930ba 100644 --- a/src/xenia/ui/vulkan/shaders/bin/immediate_frag.txt +++ b/src/xenia/ui/vulkan/shaders/bin/immediate_frag.txt @@ -1,9 +1,10 @@ ; SPIR-V ; Version: 1.0 ; Generator: Khronos Glslang Reference Front End; 1 -; Bound: 51 +; Bound: 56 ; Schema: 0 OpCapability Shader + OpCapability Sampled1D %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Fragment %main "main" %out_color %vtx_color %vtx_uv @@ -18,6 +19,8 @@ OpName %vtx_uv "vtx_uv" OpName %tex_color "tex_color" OpName %texture_sampler "texture_sampler" + OpName %tex1D "tex1D" + OpName %tex2D "tex2D" OpDecorate %out_color Location 0 OpDecorate %vtx_color Location 1 OpMemberDecorate %PushConstants 0 Offset 64 @@ -25,6 +28,10 @@ OpDecorate %vtx_uv Location 0 OpDecorate %texture_sampler DescriptorSet 0 OpDecorate %texture_sampler Binding 0 + OpDecorate %tex1D DescriptorSet 0 + OpDecorate %tex1D Binding 1 + OpDecorate %tex2D DescriptorSet 0 + OpDecorate %tex2D Binding 1 %void = OpTypeVoid %3 = OpTypeFunction %void %float = OpTypeFloat 32 @@ -52,6 +59,11 @@ %42 = OpTypeSampledImage %41 %_ptr_UniformConstant_42 = OpTypePointer UniformConstant %42 %texture_sampler = OpVariable %_ptr_UniformConstant_42 UniformConstant + %51 = OpTypeImage %float 1D 0 0 0 1 Unknown + %52 = OpTypeSampledImage %51 +%_ptr_UniformConstant_52 = OpTypePointer UniformConstant %52 + %tex1D = OpVariable %_ptr_UniformConstant_52 UniformConstant + %tex2D = OpVariable %_ptr_UniformConstant_42 UniformConstant %main = OpFunction %void None %3 %5 = OpLabel %tex_color = OpVariable %_ptr_Function_v4float Function diff --git a/src/xenia/ui/vulkan/shaders/blit.vert b/src/xenia/ui/vulkan/shaders/blit.vert index 937c27795..6f5f572d5 100644 --- a/src/xenia/ui/vulkan/shaders/blit.vert +++ b/src/xenia/ui/vulkan/shaders/blit.vert @@ -5,15 +5,23 @@ precision highp float; layout(push_constant) uniform PushConstants { - vec4 src_uv; + // normalized [x, y, w, h] + layout(offset = 0) vec4 src_uv; } push_constants; -layout(location = 0) in vec2 vfetch_pos; layout(location = 0) out vec2 vtx_uv; void main() { - gl_Position = vec4(vfetch_pos.xy * vec2(2.0, -2.0) - - vec2(1.0, -1.0), 0.0, 1.0); + const vec2 vtx_arr[4]=vec2[4]( + vec2(0,0), + vec2(1,0), + vec2(0,1), + vec2(1,1) + ); + + vec2 vfetch_pos = vtx_arr[gl_VertexIndex]; + gl_Position = vec4(vfetch_pos.xy * vec2(2.0, 2.0) - + vec2(1.0, 1.0), 0.0, 1.0); vtx_uv = vfetch_pos.xy * push_constants.src_uv.zw + push_constants.src_uv.xy; } \ No newline at end of file diff --git a/src/xenia/ui/vulkan/shaders/blit_color.frag b/src/xenia/ui/vulkan/shaders/blit_color.frag index 4d136d166..bfa602b7e 100644 --- a/src/xenia/ui/vulkan/shaders/blit_color.frag +++ b/src/xenia/ui/vulkan/shaders/blit_color.frag @@ -5,7 +5,8 @@ precision highp float; layout(push_constant) uniform PushConstants { - bool swap; + layout(offset = 16) vec3 _pad; + layout(offset = 28) int swap; } push_constants; layout(set = 0, binding = 0) uniform sampler2D src_texture; @@ -15,5 +16,5 @@ layout(location = 0) out vec4 oC; void main() { oC = texture(src_texture, vtx_uv); - if (push_constants.swap) oC = oC.bgra; + if (push_constants.swap != 0) oC = oC.bgra; } \ No newline at end of file diff --git a/src/xenia/ui/vulkan/shaders/blit_depth.frag b/src/xenia/ui/vulkan/shaders/blit_depth.frag index 622871de8..9e08f7217 100644 --- a/src/xenia/ui/vulkan/shaders/blit_depth.frag +++ b/src/xenia/ui/vulkan/shaders/blit_depth.frag @@ -4,6 +4,11 @@ #version 450 core precision highp float; +layout(push_constant) uniform PushConstants { + layout(offset = 16) vec3 _pad; + layout(offset = 28) int swap; +} push_constants; + layout(set = 0, binding = 0) uniform sampler2D src_texture; layout(location = 0) in vec2 vtx_uv; diff --git a/src/xenia/ui/vulkan/shaders/immediate.frag b/src/xenia/ui/vulkan/shaders/immediate.frag index 47e0e2a9b..bf505bf46 100644 --- a/src/xenia/ui/vulkan/shaders/immediate.frag +++ b/src/xenia/ui/vulkan/shaders/immediate.frag @@ -10,6 +10,9 @@ layout(push_constant) uniform PushConstants { layout(set = 0, binding = 0) uniform sampler2D texture_sampler; +layout(set = 0, binding = 1) uniform sampler1D tex1D; +layout(set = 0, binding = 1) uniform sampler2D tex2D; + layout(location = 0) in vec2 vtx_uv; layout(location = 1) in vec4 vtx_color;