release 0.1.0

This commit is contained in:
InoriRus
2022-05-21 22:04:50 +10:00
parent bc02c0560e
commit a37a9ca253
1056 changed files with 222884 additions and 41332 deletions
@@ -14,36 +14,41 @@ enum class RenderTextureFormat : uint64_t
{
Unknown,
R8G8B8A8Unorm,
B8G8R8A8Unorm
R8G8B8A8Srgb,
B8G8R8A8Unorm,
B8G8R8A8Srgb,
};
class RenderTextureObject: public GpuObject
{
public:
static constexpr int PARAM_FORMAT = 0;
static constexpr int PARAM_WIDTH = 1;
static constexpr int PARAM_HEIGHT = 2;
static constexpr int PARAM_TILED = 3;
static constexpr int PARAM_NEO = 4;
static constexpr int PARAM_PITCH = 5;
static constexpr int PARAM_FORMAT = 0;
static constexpr int PARAM_WIDTH = 1;
static constexpr int PARAM_HEIGHT = 2;
static constexpr int PARAM_TILED = 3;
static constexpr int PARAM_NEO = 4;
static constexpr int PARAM_PITCH = 5;
static constexpr int PARAM_WRITE_BACK = 6;
explicit RenderTextureObject(RenderTextureFormat pixel_format, uint32_t width, uint32_t height, bool tiled, bool neo, uint32_t pitch)
explicit RenderTextureObject(RenderTextureFormat pixel_format, uint32_t width, uint32_t height, bool tiled, bool neo, uint32_t pitch,
bool write_back)
{
params[PARAM_FORMAT] = static_cast<uint64_t>(pixel_format);
params[PARAM_WIDTH] = width;
params[PARAM_HEIGHT] = height;
params[PARAM_TILED] = tiled ? 1 : 0;
params[PARAM_NEO] = neo ? 1 : 0;
params[PARAM_PITCH] = pitch;
check_hash = true;
type = Graphics::GpuMemoryObjectType::RenderTexture;
params[PARAM_FORMAT] = static_cast<uint64_t>(pixel_format);
params[PARAM_WIDTH] = width;
params[PARAM_HEIGHT] = height;
params[PARAM_TILED] = tiled ? 1 : 0;
params[PARAM_NEO] = neo ? 1 : 0;
params[PARAM_PITCH] = pitch;
params[PARAM_WRITE_BACK] = write_back ? 1 : 0;
check_hash = true;
type = Graphics::GpuMemoryObjectType::RenderTexture;
}
bool Equal(const uint64_t* other) const override;
[[nodiscard]] create_func_t GetCreateFunc() const override;
[[nodiscard]] create_from_objects_func_t GetCreateFromObjectsFunc() const override;
[[nodiscard]] write_back_func_t GetWriteBackFunc() const override { return nullptr; };
[[nodiscard]] write_back_func_t GetWriteBackFunc() const override;
[[nodiscard]] delete_func_t GetDeleteFunc() const override;
[[nodiscard]] update_func_t GetUpdateFunc() const override;
};