2017-08-04 15:56:24 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-08-04 15:56:24 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
#include "VideoCommon/ShaderGenCommon.h"
|
|
|
|
#include "VideoCommon/TextureDecoder.h"
|
|
|
|
|
|
|
|
enum class APIType;
|
|
|
|
|
2017-11-25 10:07:14 +00:00
|
|
|
namespace TextureConversionShaderGen
|
|
|
|
{
|
2017-08-04 15:56:24 +00:00
|
|
|
#pragma pack(1)
|
2017-11-25 10:07:14 +00:00
|
|
|
struct UidData
|
2017-08-04 15:56:24 +00:00
|
|
|
{
|
2017-11-25 10:07:14 +00:00
|
|
|
u32 NumValues() const { return sizeof(UidData); }
|
2017-08-04 15:56:24 +00:00
|
|
|
EFBCopyFormat dst_format;
|
|
|
|
|
|
|
|
u32 efb_has_alpha : 1;
|
|
|
|
u32 is_depth_copy : 1;
|
|
|
|
u32 is_intensity : 1;
|
|
|
|
u32 scale_by_half : 1;
|
2018-05-03 04:09:32 +00:00
|
|
|
u32 copy_filter : 1;
|
2017-08-04 15:56:24 +00:00
|
|
|
};
|
|
|
|
#pragma pack()
|
|
|
|
|
2017-11-25 10:07:14 +00:00
|
|
|
using TCShaderUid = ShaderUid<UidData>;
|
|
|
|
|
2019-02-15 01:59:50 +00:00
|
|
|
ShaderCode GenerateVertexShader(APIType api_type);
|
|
|
|
ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data);
|
2017-08-04 15:56:24 +00:00
|
|
|
|
2017-11-25 10:07:14 +00:00
|
|
|
TCShaderUid GetShaderUid(EFBCopyFormat dst_format, bool is_depth_copy, bool is_intensity,
|
2018-05-03 04:09:32 +00:00
|
|
|
bool scale_by_half, bool copy_filter);
|
2017-08-04 15:56:24 +00:00
|
|
|
|
2017-11-25 10:07:14 +00:00
|
|
|
} // namespace TextureConversionShaderGen
|