Files
LibretroAdmin 58e6a6005d Video: pointer and size instead of std::span
Texture bytes travel as a TexBytes, a pointer and a size, where they
were a std::span<const u8>: TMEM and RAM runs into TextureInfo and its
mip levels, and the texel decoders the software renderer samples
through. Reads past the end still give zeros, now through three small
readers in TextureDecoder_Common, and TexBytesSkip() steps past a level
as SafeSubspan() did.

LoadPNGTexture() takes a pointer and a size. Metal's bounding box,
which the build does not compile, gets the Read() and Write() the other
backends have. GraphicsModGroup sorted its mods with std::ranges::sort,
whose <algorithm> came in through SpanUtils.h; an insertion sort by
weight takes its place, keeping mods of equal weight in load order.
2026-11-10 21:44:07 +01:00

51 lines
1.0 KiB
C++

// Copyright 2022 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include <optional>
#include <string_view>
#include <vector>
#include "Common/CommonTypes.h"
#include "Common/Matrix.h"
#include "Common/SmallVector.h"
#include "VideoCommon/Assets/TextureAsset.h"
namespace GraphicsModActionData
{
struct DrawStarted
{
const Common::SmallVector<u32, 8>& texture_units;
bool* skip;
};
struct PreEFB
{
u32 texture_width;
u32 texture_height;
bool* skip;
u32* scaled_width;
u32* scaled_height;
};
struct Projection
{
Common::Matrix44* matrix;
};
struct TextureLoad
{
std::string_view texture_name;
};
struct TextureCreate
{
std::string_view texture_name;
u32 texture_width;
u32 texture_height;
std::vector<VideoCommon::CachedAsset<VideoCommon::TextureAsset>>* custom_textures;
// Dependencies needed to reload the texture and trigger this create again
std::vector<VideoCommon::CachedAsset<VideoCommon::CustomAsset>>* additional_dependencies;
};
} // namespace GraphicsModActionData