mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
VideoCommon: Create a namespace for TextureConversionShaderGen.
This commit is contained in:
@ -510,7 +510,8 @@ void TextureCache::CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_copy,
|
||||
|
||||
glViewport(0, 0, destination_texture->GetConfig().width, destination_texture->GetConfig().height);
|
||||
|
||||
auto uid = GetTextureConverterShaderUid(dst_format, is_depth_copy, is_intensity, scale_by_half);
|
||||
auto uid = TextureConversionShaderGen::GetShaderUid(dst_format, is_depth_copy, is_intensity,
|
||||
scale_by_half);
|
||||
|
||||
auto it = m_efb_copy_programs.emplace(uid, EFBCopyShader());
|
||||
EFBCopyShader& shader = it.first->second;
|
||||
@ -518,7 +519,7 @@ void TextureCache::CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_copy,
|
||||
|
||||
if (created)
|
||||
{
|
||||
ShaderCode code = GenerateTextureConverterShaderCode(APIType::OpenGL, uid.GetUidData());
|
||||
ShaderCode code = TextureConversionShaderGen::GenerateShader(APIType::OpenGL, uid.GetUidData());
|
||||
|
||||
std::string geo_program = "";
|
||||
char prefix = 'f';
|
||||
|
@ -86,7 +86,7 @@ private:
|
||||
GLuint position_uniform;
|
||||
};
|
||||
|
||||
std::map<TextureConverterShaderUid, EFBCopyShader> m_efb_copy_programs;
|
||||
std::map<TextureConversionShaderGen::TCShaderUid, EFBCopyShader> m_efb_copy_programs;
|
||||
|
||||
SHADER m_colorCopyProgram;
|
||||
GLuint m_colorCopyPositionUniform;
|
||||
|
@ -307,7 +307,8 @@ void TextureCache::CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_copy,
|
||||
texture->GetRawTexIdentifier()->TransitionToLayout(command_buffer,
|
||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL);
|
||||
|
||||
auto uid = GetTextureConverterShaderUid(dst_format, is_depth_copy, is_intensity, scale_by_half);
|
||||
auto uid = TextureConversionShaderGen::GetShaderUid(dst_format, is_depth_copy, is_intensity,
|
||||
scale_by_half);
|
||||
|
||||
auto it = m_efb_copy_to_tex_shaders.emplace(uid, VkShaderModule(VK_NULL_HANDLE));
|
||||
VkShaderModule& shader = it.first->second;
|
||||
@ -316,7 +317,8 @@ void TextureCache::CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_copy,
|
||||
if (created)
|
||||
{
|
||||
std::string source = g_shader_cache->GetUtilityShaderHeader();
|
||||
source += GenerateTextureConverterShaderCode(APIType::Vulkan, uid.GetUidData()).GetBuffer();
|
||||
source +=
|
||||
TextureConversionShaderGen::GenerateShader(APIType::Vulkan, uid.GetUidData()).GetBuffer();
|
||||
|
||||
shader = Util::CompileAndCreateFragmentShader(source);
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
std::unique_ptr<TextureConverter> m_texture_converter;
|
||||
|
||||
VkShaderModule m_copy_shader = VK_NULL_HANDLE;
|
||||
std::map<TextureConverterShaderUid, VkShaderModule> m_efb_copy_to_tex_shaders;
|
||||
std::map<TextureConversionShaderGen::TCShaderUid, VkShaderModule> m_efb_copy_to_tex_shaders;
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
||||
|
Reference in New Issue
Block a user