Browse Source

fix build errors 2026-05-20

lizzie/unity-build
lizzie 3 days ago
parent
commit
3163127488
  1. 8
      src/video_core/renderer_vulkan/vk_rasterizer.cpp
  2. 21
      src/video_core/texture_cache/formatter.h

8
src/video_core/renderer_vulkan/vk_rasterizer.cpp

@ -145,7 +145,7 @@ VkRect2D GetScissorState(const Tegra::Engines::Maxwell3D::Regs& regs, size_t ind
return scissor;
}
DrawParams MakeDrawParams(const Tegra::Engines::DrawManager::State& draw_state, u32 num_instances, bool is_indexed) {
DrawParams MakeDrawParams(const Tegra::Engines::Maxwell3D::DrawManager::State& draw_state, u32 num_instances, bool is_indexed) {
DrawParams params{
.base_instance = draw_state.base_instance,
.num_instances = num_instances,
@ -1790,10 +1790,10 @@ void RasterizerVulkan::UpdateVertexInput(Tegra::Engines::Maxwell3D::Regs& regs)
boost::container::static_vector<VkVertexInputBindingDescription2EXT, 32> bindings;
boost::container::static_vector<VkVertexInputAttributeDescription2EXT, 32> attributes;
const u32 max_attributes = u32(std::min<size_t>(Tegra::Engines::Maxwell3D::NumVertexAttributes, device.GetMaxVertexInputAttributes()));
const u32 max_bindings = u32(std::min<size_t>(Tegra::Engines::Maxwell3D::NumVertexArrays, device.GetMaxVertexInputBindings()));
const u32 max_attributes = u32(std::min<size_t>(Tegra::Engines::Maxwell3D::Regs::NumVertexAttributes, device.GetMaxVertexInputAttributes()));
const u32 max_bindings = u32(std::min<size_t>(Tegra::Engines::Maxwell3D::Regs::NumVertexArrays, device.GetMaxVertexInputBindings()));
for (u32 index = 0; index < max_attributes; ++index) {
const Tegra::Engines::Maxwell3D::VertexAttribute attribute{regs.vertex_attrib_format[index]};
const Tegra::Engines::Maxwell3D::Regs::VertexAttribute attribute{regs.vertex_attrib_format[index]};
const u32 binding{attribute.buffer};
if (attribute.constant || binding >= max_bindings) {
continue;

21
src/video_core/texture_cache/formatter.h

@ -15,26 +15,6 @@
#if FMT_VERSION >= 120100
#include <fmt/base.h>
#else
template <>
struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
auto format(VideoCommon::ImageType type, FormatContext& ctx) const {
const string_view name = [type] {
using VideoCommon::ImageType;
switch (type) {
case ImageType::e1D: return "1D";
case ImageType::e2D: return "2D";
case ImageType::e3D: return "3D";
case ImageType::Linear: return "Linear";
case ImageType::Buffer: return "Buffer";
}
return "Invalid";
}();
return formatter<string_view>::format(name, ctx);
}
};
#endif
template <>
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
@ -78,6 +58,7 @@ struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view>
return formatter<string_view>::format(name, ctx);
}
};
#endif
template <>
struct fmt::formatter<VideoCommon::Extent3D> {

Loading…
Cancel
Save