Format all code with new clang-format
This commit is contained in:
@@ -83,7 +83,8 @@ BufferCache::BufferCache(RegisterFile* register_file, Memory* memory,
|
||||
descriptor_set_layout_info.pNext = nullptr;
|
||||
descriptor_set_layout_info.flags = 0;
|
||||
VkDescriptorSetLayoutBinding uniform_bindings[] = {
|
||||
vertex_uniform_binding, fragment_uniform_binding,
|
||||
vertex_uniform_binding,
|
||||
fragment_uniform_binding,
|
||||
};
|
||||
descriptor_set_layout_info.bindingCount =
|
||||
static_cast<uint32_t>(xe::countof(uniform_bindings));
|
||||
|
||||
@@ -1158,7 +1158,9 @@ PipelineCache::UpdateStatus PipelineCache::UpdateRasterizationState(
|
||||
// Vulkan only supports both matching.
|
||||
assert_true(front_poly_mode == back_poly_mode);
|
||||
static const VkPolygonMode kFillModes[3] = {
|
||||
VK_POLYGON_MODE_POINT, VK_POLYGON_MODE_LINE, VK_POLYGON_MODE_FILL,
|
||||
VK_POLYGON_MODE_POINT,
|
||||
VK_POLYGON_MODE_LINE,
|
||||
VK_POLYGON_MODE_FILL,
|
||||
};
|
||||
state_info.polygonMode = kFillModes[front_poly_mode];
|
||||
} else {
|
||||
|
||||
@@ -223,7 +223,9 @@ CachedTileView::CachedTileView(ui::vulkan::VulkanDevice* device,
|
||||
image_view_info.format = image_info.format;
|
||||
// TODO(benvanik): manipulate? may not be able to when attached.
|
||||
image_view_info.components = {
|
||||
VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B,
|
||||
VK_COMPONENT_SWIZZLE_R,
|
||||
VK_COMPONENT_SWIZZLE_G,
|
||||
VK_COMPONENT_SWIZZLE_B,
|
||||
VK_COMPONENT_SWIZZLE_A,
|
||||
};
|
||||
image_view_info.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
|
||||
@@ -746,7 +748,9 @@ bool RenderCache::ParseConfiguration(RenderConfiguration* config) {
|
||||
// Color attachment configuration.
|
||||
if (config->mode_control == ModeControl::kColorDepth) {
|
||||
reg::RB_COLOR_INFO color_info[4] = {
|
||||
regs.rb_color_info, regs.rb_color1_info, regs.rb_color2_info,
|
||||
regs.rb_color_info,
|
||||
regs.rb_color1_info,
|
||||
regs.rb_color2_info,
|
||||
regs.rb_color3_info,
|
||||
};
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
|
||||
@@ -1099,8 +1099,10 @@ void TextureCache::WritebackTexture(Texture* texture) {
|
||||
auto command_buffer = wb_command_pool_->AcquireEntry();
|
||||
|
||||
VkCommandBufferBeginInfo begin_info = {
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, nullptr,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
|
||||
nullptr,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
|
||||
nullptr,
|
||||
};
|
||||
vkBeginCommandBuffer(command_buffer, &begin_info);
|
||||
|
||||
|
||||
@@ -91,7 +91,9 @@ bool VulkanCommandProcessor::SetupContext() {
|
||||
render_cache_ = std::make_unique<RenderCache>(register_file_, device_);
|
||||
|
||||
VkEventCreateInfo info = {
|
||||
VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, nullptr, 0,
|
||||
VK_STRUCTURE_TYPE_EVENT_CREATE_INFO,
|
||||
nullptr,
|
||||
0,
|
||||
};
|
||||
|
||||
VkResult result =
|
||||
@@ -439,7 +441,8 @@ void VulkanCommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
|
||||
nullptr, 1, &barrier);
|
||||
|
||||
VkRect2D src_rect = {
|
||||
{0, 0}, {frontbuffer_width, frontbuffer_height},
|
||||
{0, 0},
|
||||
{frontbuffer_width, frontbuffer_height},
|
||||
};
|
||||
blitter_->BlitTexture2D(
|
||||
copy_commands, current_batch_fence_,
|
||||
@@ -1002,7 +1005,8 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
if (is_color_source) {
|
||||
// Source from a color target.
|
||||
uint32_t color_info[4] = {
|
||||
regs[XE_GPU_REG_RB_COLOR_INFO].u32, regs[XE_GPU_REG_RB_COLOR1_INFO].u32,
|
||||
regs[XE_GPU_REG_RB_COLOR_INFO].u32,
|
||||
regs[XE_GPU_REG_RB_COLOR1_INFO].u32,
|
||||
regs[XE_GPU_REG_RB_COLOR2_INFO].u32,
|
||||
regs[XE_GPU_REG_RB_COLOR3_INFO].u32,
|
||||
};
|
||||
@@ -1112,11 +1116,11 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
VkFilter filter = is_color_source ? VK_FILTER_LINEAR : VK_FILTER_NEAREST;
|
||||
switch (copy_command) {
|
||||
case CopyCommand::kRaw:
|
||||
/*
|
||||
render_cache_->RawCopyToImage(command_buffer, edram_base,
|
||||
texture->image, texture->image_layout, is_color_source, resolve_offset,
|
||||
resolve_extent); break;
|
||||
*/
|
||||
/*
|
||||
render_cache_->RawCopyToImage(command_buffer, edram_base,
|
||||
texture->image, texture->image_layout, is_color_source, resolve_offset,
|
||||
resolve_extent); break;
|
||||
*/
|
||||
|
||||
case CopyCommand::kConvert: {
|
||||
/*
|
||||
|
||||
@@ -27,8 +27,8 @@ namespace xe {
|
||||
namespace gpu {
|
||||
namespace vulkan {
|
||||
|
||||
using xe::ui::vulkan::CheckResult;
|
||||
using xe::ui::RawImage;
|
||||
using xe::ui::vulkan::CheckResult;
|
||||
|
||||
VulkanGraphicsSystem::VulkanGraphicsSystem() {}
|
||||
VulkanGraphicsSystem::~VulkanGraphicsSystem() = default;
|
||||
@@ -50,7 +50,8 @@ X_STATUS VulkanGraphicsSystem::Setup(cpu::Processor* processor,
|
||||
|
||||
// Create our own command pool we can use for captures.
|
||||
VkCommandPoolCreateInfo create_info = {
|
||||
VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, nullptr,
|
||||
VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO,
|
||||
nullptr,
|
||||
VK_COMMAND_POOL_CREATE_TRANSIENT_BIT |
|
||||
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT,
|
||||
device_->queue_family_index(),
|
||||
@@ -90,8 +91,10 @@ std::unique_ptr<RawImage> VulkanGraphicsSystem::Capture() {
|
||||
CheckResult(status, "vkAllocateCommandBuffers");
|
||||
|
||||
VkCommandBufferBeginInfo begin_info = {
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, nullptr,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, nullptr,
|
||||
VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
|
||||
nullptr,
|
||||
VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
|
||||
nullptr,
|
||||
};
|
||||
vkBeginCommandBuffer(cmd, &begin_info);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user