mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Fix build errors related to formatting non-scoped enums
This commit is contained in:
@ -310,13 +310,15 @@ void Renderer::BindBackbuffer(const ClearColor& clear_color)
|
||||
}
|
||||
else
|
||||
{
|
||||
ERROR_LOG_FMT(VIDEO, "Unknown present error {:#010X}, please report.", res);
|
||||
ERROR_LOG_FMT(VIDEO, "Unknown present error {:#010X} {}, please report.",
|
||||
static_cast<u32>(res), VkResultToString(res));
|
||||
m_swap_chain->RecreateSwapChain();
|
||||
}
|
||||
|
||||
res = m_swap_chain->AcquireNextImage();
|
||||
if (res != VK_SUCCESS)
|
||||
PanicAlertFmt("Failed to grab image from swap chain: {:#010X}", res);
|
||||
PanicAlertFmt("Failed to grab image from swap chain: {:#010X} {}", static_cast<u32>(res),
|
||||
VkResultToString(res));
|
||||
}
|
||||
|
||||
// Transition from undefined (or present src, but it can be substituted) to
|
||||
|
@ -66,14 +66,14 @@ void VertexFormat::MapAttributes()
|
||||
|
||||
if (m_decl.position.enable)
|
||||
AddAttribute(
|
||||
SHADER_POSITION_ATTRIB, 0,
|
||||
ShaderAttrib::Position, 0,
|
||||
VarToVkFormat(m_decl.position.type, m_decl.position.components, m_decl.position.integer),
|
||||
m_decl.position.offset);
|
||||
|
||||
for (uint32_t i = 0; i < 3; i++)
|
||||
{
|
||||
if (m_decl.normals[i].enable)
|
||||
AddAttribute(SHADER_NORMAL_ATTRIB + i, 0,
|
||||
AddAttribute(ShaderAttrib::Normal + i, 0,
|
||||
VarToVkFormat(m_decl.normals[i].type, m_decl.normals[i].components,
|
||||
m_decl.normals[i].integer),
|
||||
m_decl.normals[i].offset);
|
||||
@ -82,7 +82,7 @@ void VertexFormat::MapAttributes()
|
||||
for (uint32_t i = 0; i < 2; i++)
|
||||
{
|
||||
if (m_decl.colors[i].enable)
|
||||
AddAttribute(SHADER_COLOR0_ATTRIB + i, 0,
|
||||
AddAttribute(ShaderAttrib::Color0 + i, 0,
|
||||
VarToVkFormat(m_decl.colors[i].type, m_decl.colors[i].components,
|
||||
m_decl.colors[i].integer),
|
||||
m_decl.colors[i].offset);
|
||||
@ -91,14 +91,14 @@ void VertexFormat::MapAttributes()
|
||||
for (uint32_t i = 0; i < 8; i++)
|
||||
{
|
||||
if (m_decl.texcoords[i].enable)
|
||||
AddAttribute(SHADER_TEXTURE0_ATTRIB + i, 0,
|
||||
AddAttribute(ShaderAttrib::TexCoord0 + i, 0,
|
||||
VarToVkFormat(m_decl.texcoords[i].type, m_decl.texcoords[i].components,
|
||||
m_decl.texcoords[i].integer),
|
||||
m_decl.texcoords[i].offset);
|
||||
}
|
||||
|
||||
if (m_decl.posmtx.enable)
|
||||
AddAttribute(SHADER_POSMTX_ATTRIB, 0,
|
||||
AddAttribute(ShaderAttrib::PositionMatrix, 0,
|
||||
VarToVkFormat(m_decl.posmtx.type, m_decl.posmtx.components, m_decl.posmtx.integer),
|
||||
m_decl.posmtx.offset);
|
||||
}
|
||||
@ -118,12 +118,12 @@ void VertexFormat::SetupInputState()
|
||||
m_input_state_info.pVertexAttributeDescriptions = m_attribute_descriptions.data();
|
||||
}
|
||||
|
||||
void VertexFormat::AddAttribute(uint32_t location, uint32_t binding, VkFormat format,
|
||||
void VertexFormat::AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format,
|
||||
uint32_t offset)
|
||||
{
|
||||
ASSERT(m_num_attributes < MAX_VERTEX_ATTRIBUTES);
|
||||
|
||||
m_attribute_descriptions[m_num_attributes].location = location;
|
||||
m_attribute_descriptions[m_num_attributes].location = static_cast<uint32_t>(location);
|
||||
m_attribute_descriptions[m_num_attributes].binding = binding;
|
||||
m_attribute_descriptions[m_num_attributes].format = format;
|
||||
m_attribute_descriptions[m_num_attributes].offset = offset;
|
||||
|
@ -8,6 +8,8 @@
|
||||
#include "VideoBackends/Vulkan/Constants.h"
|
||||
#include "VideoCommon/NativeVertexFormat.h"
|
||||
|
||||
enum class ShaderAttrib : u32;
|
||||
|
||||
namespace Vulkan
|
||||
{
|
||||
class VertexFormat : public ::NativeVertexFormat
|
||||
@ -23,7 +25,7 @@ public:
|
||||
void SetupInputState();
|
||||
|
||||
private:
|
||||
void AddAttribute(uint32_t location, uint32_t binding, VkFormat format, uint32_t offset);
|
||||
void AddAttribute(ShaderAttrib location, uint32_t binding, VkFormat format, uint32_t offset);
|
||||
|
||||
VkVertexInputBindingDescription m_binding_description = {};
|
||||
|
||||
|
Reference in New Issue
Block a user