diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-04-12 14:18:04 +0200 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2018-04-12 21:28:39 +0200 |
| commit | 40bb9974f21878e64fb03d70e717cb996bf13a29 (patch) | |
| tree | 1d8a9e7eea10820e5d645ad5028e506836b856de /Source/Core/VideoBackends/Vulkan | |
| parent | d27e85e9d70dfb41a5b8880fd3375a0ac9574f5d (diff) | |
Reformat all the things!
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
9 files changed, 46 insertions, 25 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp index 1df851cb7c..1713b0c514 100644 --- a/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp +++ b/Source/Core/VideoBackends/Vulkan/FramebufferManager.cpp @@ -228,7 +228,8 @@ bool FramebufferManager::CreateEFBFramebuffer() } VkImageView framebuffer_attachments[] = { - m_efb_color_texture->GetView(), m_efb_depth_texture->GetView(), + m_efb_color_texture->GetView(), + m_efb_depth_texture->GetView(), }; VkFramebufferCreateInfo framebuffer_info = {VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, diff --git a/Source/Core/VideoBackends/Vulkan/PerfQuery.cpp b/Source/Core/VideoBackends/Vulkan/PerfQuery.cpp index ef47cb9ba2..25334e3eb4 100644 --- a/Source/Core/VideoBackends/Vulkan/PerfQuery.cpp +++ b/Source/Core/VideoBackends/Vulkan/PerfQuery.cpp @@ -52,8 +52,9 @@ bool PerfQuery::Initialize() } g_command_buffer_mgr->AddFencePointCallback( - this, std::bind(&PerfQuery::OnCommandBufferQueued, this, std::placeholders::_1, - std::placeholders::_2), + this, + std::bind(&PerfQuery::OnCommandBufferQueued, this, std::placeholders::_1, + std::placeholders::_2), std::bind(&PerfQuery::OnCommandBufferExecuted, this, std::placeholders::_1)); return true; diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCache.h b/Source/Core/VideoBackends/Vulkan/ShaderCache.h index 1082d0039e..28480569e0 100644 --- a/Source/Core/VideoBackends/Vulkan/ShaderCache.h +++ b/Source/Core/VideoBackends/Vulkan/ShaderCache.h @@ -116,6 +116,7 @@ public: VkShaderModule GetPassthroughVertexShader() const { return m_passthrough_vertex_shader; } VkShaderModule GetScreenQuadGeometryShader() const { return m_screen_quad_geometry_shader; } VkShaderModule GetPassthroughGeometryShader() const { return m_passthrough_geometry_shader; } + private: bool CreatePipelineCache(); bool LoadPipelineCache(); diff --git a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp index c97c56f75d..0633456ceb 100644 --- a/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp +++ b/Source/Core/VideoBackends/Vulkan/ShaderCompiler.cpp @@ -365,7 +365,8 @@ const TBuiltInResource* GetCompilerResourceLimits() /* .MaxCullDistances = */ 8, /* .MaxCombinedClipAndCullDistances = */ 8, /* .MaxSamples = */ 4, - /* .limits = */ { + /* .limits = */ + { /* .nonInductiveForLoops = */ 1, /* .whileLoops = */ 1, /* .doWhileLoops = */ 1, diff --git a/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp b/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp index b659eef0da..cb8e660af2 100644 --- a/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp +++ b/Source/Core/VideoBackends/Vulkan/StreamBuffer.cpp @@ -22,8 +22,9 @@ StreamBuffer::StreamBuffer(VkBufferUsageFlags usage, size_t max_size) { // Add a callback that fires on fence point creation and signal g_command_buffer_mgr->AddFencePointCallback( - this, std::bind(&StreamBuffer::OnCommandBufferQueued, this, std::placeholders::_1, - std::placeholders::_2), + this, + std::bind(&StreamBuffer::OnCommandBufferQueued, this, std::placeholders::_1, + std::placeholders::_2), std::bind(&StreamBuffer::OnCommandBufferExecuted, this, std::placeholders::_1)); } diff --git a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp index eb9cde54ba..6c584fcc95 100644 --- a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp +++ b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp @@ -244,8 +244,9 @@ void TextureConverter::EncodeTextureToMemory(VkImageView src_texture, u8* dest_p // complex down filtering to average all pixels and produce the correct result. bool linear_filter = (scale_by_half && !params.depth) || g_renderer->GetEFBScale() != 1 || params.y_scale > 1.0f; - draw.SetPSSampler(0, src_texture, linear_filter ? g_object_cache->GetLinearSampler() : - g_object_cache->GetPointSampler()); + draw.SetPSSampler(0, src_texture, + linear_filter ? g_object_cache->GetLinearSampler() : + g_object_cache->GetPointSampler()); u32 render_width = bytes_per_row / sizeof(u32); u32 render_height = num_blocks_y; diff --git a/Source/Core/VideoBackends/Vulkan/Util.cpp b/Source/Core/VideoBackends/Vulkan/Util.cpp index 07c0311da1..9e9060c5a3 100644 --- a/Source/Core/VideoBackends/Vulkan/Util.cpp +++ b/Source/Core/VideoBackends/Vulkan/Util.cpp @@ -585,12 +585,18 @@ void UtilityShaderDraw::BindDescriptors() if (set == VK_NULL_HANDLE) PanicAlert("Failed to allocate descriptor set for utility draw"); - set_writes[num_set_writes++] = { - VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, nullptr, set, UBO_DESCRIPTOR_SET_BINDING_VS, 0, 1, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, nullptr, - (m_vs_uniform_buffer.buffer != VK_NULL_HANDLE) ? &m_vs_uniform_buffer : - &dummy_uniform_buffer, - nullptr}; + set_writes[num_set_writes++] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, + nullptr, + set, + UBO_DESCRIPTOR_SET_BINDING_VS, + 0, + 1, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, + nullptr, + (m_vs_uniform_buffer.buffer != VK_NULL_HANDLE) ? + &m_vs_uniform_buffer : + &dummy_uniform_buffer, + nullptr}; if (g_vulkan_context->SupportsGeometryShaders()) { @@ -606,12 +612,18 @@ void UtilityShaderDraw::BindDescriptors() nullptr}; } - set_writes[num_set_writes++] = { - VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, nullptr, set, UBO_DESCRIPTOR_SET_BINDING_PS, 0, 1, - VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, nullptr, - (m_ps_uniform_buffer.buffer != VK_NULL_HANDLE) ? &m_ps_uniform_buffer : - &dummy_uniform_buffer, - nullptr}; + set_writes[num_set_writes++] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, + nullptr, + set, + UBO_DESCRIPTOR_SET_BINDING_PS, + 0, + 1, + VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, + nullptr, + (m_ps_uniform_buffer.buffer != VK_NULL_HANDLE) ? + &m_ps_uniform_buffer : + &dummy_uniform_buffer, + nullptr}; bind_descriptor_sets[DESCRIPTOR_SET_BIND_POINT_UNIFORM_BUFFERS] = set; } diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp index a62238e8a2..cee60012a8 100644 --- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp @@ -131,12 +131,14 @@ void VKTexture::CopyRectangleFromTexture(const AbstractTexture* src, { Texture2D* src_texture = static_cast<const VKTexture*>(src)->GetRawTexIdentifier(); - ASSERT_MSG(VIDEO, static_cast<u32>(src_rect.GetWidth()) <= src_texture->GetWidth() && - static_cast<u32>(src_rect.GetHeight()) <= src_texture->GetHeight(), + ASSERT_MSG(VIDEO, + static_cast<u32>(src_rect.GetWidth()) <= src_texture->GetWidth() && + static_cast<u32>(src_rect.GetHeight()) <= src_texture->GetHeight(), "Source rect is too large for CopyRectangleFromTexture"); - ASSERT_MSG(VIDEO, static_cast<u32>(dst_rect.GetWidth()) <= m_config.width && - static_cast<u32>(dst_rect.GetHeight()) <= m_config.height, + ASSERT_MSG(VIDEO, + static_cast<u32>(dst_rect.GetWidth()) <= m_config.width && + static_cast<u32>(dst_rect.GetHeight()) <= m_config.height, "Dest rect is too large for CopyRectangleFromTexture"); VkImageCopy image_copy = { diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index 77702f436b..9a96aa9e2e 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -552,7 +552,8 @@ bool VulkanContext::CreateDevice(VkSurfaceKHR surface, bool enable_validation_la present_queue_info.pQueuePriorities = queue_priorities; std::array<VkDeviceQueueCreateInfo, 2> queue_infos = {{ - graphics_queue_info, present_queue_info, + graphics_queue_info, + present_queue_info, }}; device_info.queueCreateInfoCount = 1; |
