Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.

Commit f8de7fa

Browse files
committed
Format write_timestamp/main.cpp
1 parent 01e4075 commit f8de7fa

File tree

1 file changed

+22
-23
lines changed
  • application_sandbox/write_timestamp

1 file changed

+22
-23
lines changed

application_sandbox/write_timestamp/main.cpp

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#include <chrono>
16+
1517
#include "application_sandbox/sample_application_framework/sample_application.h"
18+
#include "mathfu/matrix.h"
19+
#include "mathfu/vector.h"
1620
#include "support/entry/entry.h"
1721
#include "vulkan_helpers/buffer_frame_data.h"
1822
#include "vulkan_helpers/helper_functions.h"
1923
#include "vulkan_helpers/vulkan_application.h"
2024
#include "vulkan_helpers/vulkan_model.h"
2125

22-
#include <chrono>
23-
#include "mathfu/matrix.h"
24-
#include "mathfu/vector.h"
25-
2626
using Mat44 = mathfu::Matrix<float, 4, 4>;
2727
using Vector4 = mathfu::Vector<float, 4>;
2828
using Vector3 = mathfu::Vector<float, 3>;
@@ -54,19 +54,19 @@ class WriteTimestampSample
5454
WriteTimestampSample(const entry::EntryData* data,
5555
const VkPhysicalDeviceFeatures& requested_features)
5656
: data_(data),
57-
Sample<WriteTimestampFrameData>(data->allocator(), data, 1, 512, 1,
58-
1, sample_application::SampleOptions()
59-
.EnableDepthBuffer()
60-
.EnableMultisampling(),
57+
Sample<WriteTimestampFrameData>(data->allocator(), data, 1, 512, 1, 1,
58+
sample_application::SampleOptions()
59+
.EnableDepthBuffer()
60+
.EnableMultisampling(),
6161
requested_features),
6262
torus_(data->allocator(), data->logger(), torus_data),
6363
grey_scale_(0u),
6464
num_frames_(0u) {
6565
// Check the timestamp valid bits for the render queue
6666
uint32_t queue_family_index = app()->render_queue().index();
67-
auto queue_family_properties = vulkan::GetQueueFamilyProperties(
68-
data->allocator(), app()->instance(),
69-
app()->device().physical_device());
67+
auto queue_family_properties =
68+
vulkan::GetQueueFamilyProperties(data->allocator(), app()->instance(),
69+
app()->device().physical_device());
7070
timestamp_valid_bits_ =
7171
queue_family_properties[queue_family_index].timestampValidBits;
7272
}
@@ -111,11 +111,11 @@ class WriteTimestampSample
111111
};
112112

113113
pipeline_layout_ = containers::make_unique<vulkan::PipelineLayout>(
114-
data_->allocator(),
115-
app()->CreatePipelineLayout({{
116-
torus_descriptor_set_layouts_[0], torus_descriptor_set_layouts_[1],
117-
torus_descriptor_set_layouts_[2],
118-
}}));
114+
data_->allocator(), app()->CreatePipelineLayout({{
115+
torus_descriptor_set_layouts_[0],
116+
torus_descriptor_set_layouts_[1],
117+
torus_descriptor_set_layouts_[2],
118+
}}));
119119

120120
VkAttachmentReference depth_attachment = {
121121
0, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL};
@@ -163,9 +163,8 @@ class WriteTimestampSample
163163
));
164164

165165
torus_pipeline_ = containers::make_unique<vulkan::VulkanGraphicsPipeline>(
166-
data_->allocator(),
167-
app()->CreateGraphicsPipeline(pipeline_layout_.get(),
168-
render_pass_.get(), 0));
166+
data_->allocator(), app()->CreateGraphicsPipeline(
167+
pipeline_layout_.get(), render_pass_.get(), 0));
169168
torus_pipeline_->AddShader(VK_SHADER_STAGE_VERTEX_BIT, "main",
170169
torus_vertex_shader);
171170
torus_pipeline_->AddShader(VK_SHADER_STAGE_FRAGMENT_BIT, "main",
@@ -239,10 +238,10 @@ class WriteTimestampSample
239238
frame_data->torus_descriptor_set_ =
240239
containers::make_unique<vulkan::DescriptorSet>(
241240
data_->allocator(), app()->AllocateDescriptorSet({
242-
torus_descriptor_set_layouts_[0],
243-
torus_descriptor_set_layouts_[1],
244-
torus_descriptor_set_layouts_[2],
245-
}));
241+
torus_descriptor_set_layouts_[0],
242+
torus_descriptor_set_layouts_[1],
243+
torus_descriptor_set_layouts_[2],
244+
}));
246245

247246
VkDescriptorBufferInfo buffer_infos[2] = {
248247
{

0 commit comments

Comments
 (0)