Skip to content

Commit

Permalink
Enfoce alignment of empty const_frames
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaspandersson authored and deadbeef84 committed Aug 14, 2024
1 parent 9e46ef3 commit f02504c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/accelerator/ogl/image/image_mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "../util/device.h"
#include "../util/texture.h"

#include <boost/align/aligned_allocator.hpp>

#include <common/array.h>
#include <common/bit_depth.h>
#include <common/future.h>
Expand Down Expand Up @@ -91,7 +93,7 @@ class image_renderer
const core::video_format_desc& format_desc)
{
if (layers.empty()) { // Bypass GPU with empty frame.
static const std::vector<uint8_t> buffer(max_frame_size_, 0);
static const std::vector<uint8_t, boost::alignment::aligned_allocator<uint8_t, 32>> buffer(max_frame_size_, 0);
return make_ready_future(array<const std::uint8_t>(buffer.data(), format_desc.size, true));
}

Expand Down

0 comments on commit f02504c

Please sign in to comment.