mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-11 03:11:28 -10:00
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.
51 lines
1.0 KiB
C++
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
|