Skip to content

Commit

Permalink
MythComboBufferVulkan: Rename Buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-kendall committed Sep 9, 2020
1 parent 2d6ba11 commit 79b9188
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/vulkan/mythcombobuffervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void MythComboBufferVulkan::PushData(const QMatrix4x4 &Transform, const QRect& S
const QRect& Destination, int Alpha)
{
m_data.push_back({});
Buffer* data = &m_data.back();
VulkanComboBuffer* data = &m_data.back();
data->color[0] = data->color[1] = data->color[2] = 1.0F;

float width = std::min(static_cast<float>(Source.width()), m_width);
Expand Down
8 changes: 4 additions & 4 deletions mythtv/libs/libmythui/vulkan/mythcombobuffervulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
// MythTV
#include "mythuiexp.h"

#define MYTH_PUSHBUFFER_SIZE 112

// Total Buffer size of 112bytes.
// Vulkan spec guarantees 128 bytes for push constants
// Prevent clang-tidy modernize-avoid-c-arrays warnings.
extern "C" {
struct alignas(16) Buffer
struct alignas(16) VulkanComboBuffer
{
float transform [16];
float position [4];
Expand All @@ -23,6 +21,8 @@ struct alignas(16) Buffer
};
}

#define MYTH_PUSHBUFFER_SIZE (sizeof(VulkanComboBuffer))

class MUI_PUBLIC MythComboBufferVulkan
{
public:
Expand All @@ -33,7 +33,7 @@ class MUI_PUBLIC MythComboBufferVulkan
const QRect& Destination, int Alpha);
void PopData(void);

std::vector<Buffer> m_data;
std::vector<VulkanComboBuffer> m_data;
float m_width { 0.0F };
float m_height { 0.0F };
};
Expand Down

0 comments on commit 79b9188

Please sign in to comment.