Skip to content

Commit

Permalink
qa
Browse files Browse the repository at this point in the history
  • Loading branch information
tomadamatkinson committed Mar 11, 2024
1 parent 4083891 commit 45b687d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 18 deletions.
21 changes: 9 additions & 12 deletions components/core/include/core/util/profiling.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,22 @@
#include "core/util/error.hpp"

#ifdef TRACY_ENABLE
#include <tracy/Tracy.hpp>
# include <tracy/Tracy.hpp>
#endif




#ifdef TRACY_ENABLE
// malloc and free are used by Tracy to provide memory profiling
void *operator new(size_t count);
void operator delete(void *ptr) noexcept;

// Tracy a scope
#define PROFILE_SCOPE(name) ZoneScopedN(name)
# define PROFILE_SCOPE(name) ZoneScopedN(name)

// Trace a function
#define PROFILE_FUNCTION() ZoneScoped
# define PROFILE_FUNCTION() ZoneScoped
#else
#define PROFILE_SCOPE(name)
#define PROFILE_FUNCTION()
# define PROFILE_SCOPE(name)
# define PROFILE_FUNCTION()
#endif

// The type of plot to use
Expand Down Expand Up @@ -116,10 +113,10 @@ class Plot
private:
static void update_tracy_plot(const char *name, T value)
{
#ifdef TRACY_ENABLE
TracyPlot(name, value);
TracyPlotConfig(name, TO_TRACY_PLOT_FORMAT(PT), true, true, 0);
#endif
#ifdef TRACY_ENABLE
TracyPlot(name, value);
TracyPlotConfig(name, TO_TRACY_PLOT_FORMAT(PT), true, true, 0);
#endif
}

static Plot *get_instance()
Expand Down
2 changes: 1 addition & 1 deletion framework/hpp_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ bool HPPGui::update_buffers()

void HPPGui::update_buffers(vkb::core::HPPCommandBuffer &command_buffer) const
{
ImDrawData *draw_data = ImGui::GetDrawData();
ImDrawData *draw_data = ImGui::GetDrawData();
vkb::rendering::HPPRenderFrame &render_frame = sample.get_render_context().get_active_frame();

if (!draw_data || (draw_data->TotalVtxCount == 0) || (draw_data->TotalIdxCount == 0))
Expand Down
4 changes: 2 additions & 2 deletions framework/hpp_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct HPPFont
}

std::vector<uint8_t> data;
ImFont *handle = nullptr;
ImFont *handle = nullptr;
std::string name;
float size = 0.0f;
};
Expand Down Expand Up @@ -257,7 +257,7 @@ class HPPGui

private:
PushConstBlock push_const_block;
HPPVulkanSample &sample;
HPPVulkanSample &sample;
std::unique_ptr<vkb::core::HPPBuffer> vertex_buffer;
std::unique_ptr<vkb::core::HPPBuffer> index_buffer;
size_t last_vertex_buffer_size = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void OpenCLInteropArm::prepare_pipelines()
vertex_input_state.vertexBindingDescriptionCount = vkb::to_u32(vertex_input_bindings.size());
vertex_input_state.pVertexBindingDescriptions = vertex_input_bindings.data();
vertex_input_state.vertexAttributeDescriptionCount = vkb::to_u32(
vertex_input_attributes.size());
vertex_input_attributes.size());
vertex_input_state.pVertexAttributeDescriptions = vertex_input_attributes.data();

VkGraphicsPipelineCreateInfo pipeline_create_info =
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/open_gl_interop/open_gl_interop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ void OpenGLInterop::prepare_pipelines()
vertex_input_state.vertexBindingDescriptionCount = vkb::to_u32(vertex_input_bindings.size());
vertex_input_state.pVertexBindingDescriptions = vertex_input_bindings.data();
vertex_input_state.vertexAttributeDescriptionCount = vkb::to_u32(
vertex_input_attributes.size());
vertex_input_attributes.size());
vertex_input_state.pVertexAttributeDescriptions = vertex_input_attributes.data();

VkGraphicsPipelineCreateInfo pipeline_create_info =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ void MultithreadingRenderPasses::MainSubpass::draw(vkb::CommandBuffer &command_b
assert(!shadow_render_target.get_views().empty());
command_buffer.bind_image(shadow_render_target.get_views()[0], *shadowmap_sampler, 0, 5, 0);

auto &render_frame = get_render_context().get_active_frame();
auto &render_frame = get_render_context().get_active_frame();
vkb::BufferAllocation shadow_buffer = render_frame.allocate_buffer(VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT, sizeof(glm::mat4));
shadow_buffer.update(shadow_uniform);
// Bind the shadowmap uniform to the proper set nd binding in shader
Expand Down

0 comments on commit 45b687d

Please sign in to comment.