Reformat all the things!

This commit is contained in:
spycrab
2018-04-12 14:18:04 +02:00
parent d27e85e9d7
commit 40bb9974f2
179 changed files with 1888 additions and 991 deletions

View File

@ -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,

View File

@ -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;

View File

@ -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();

View File

@ -365,7 +365,8 @@ const TBuiltInResource* GetCompilerResourceLimits()
/* .MaxCullDistances = */ 8,
/* .MaxCombinedClipAndCullDistances = */ 8,
/* .MaxSamples = */ 4,
/* .limits = */ {
/* .limits = */
{
/* .nonInductiveForLoops = */ 1,
/* .whileLoops = */ 1,
/* .doWhileLoops = */ 1,

View File

@ -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));
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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 = {

View File

@ -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;