mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
PixelShaderGen: Drop dstAlphaMode constant in shader generation.
It is already stored within the UID.
This commit is contained in:
@ -525,8 +525,7 @@ VkShaderModule ObjectCache::GetGeometryShaderForUid(const GeometryShaderUid& uid
|
||||
return module;
|
||||
}
|
||||
|
||||
VkShaderModule ObjectCache::GetPixelShaderForUid(const PixelShaderUid& uid,
|
||||
DSTALPHA_MODE dstalpha_mode)
|
||||
VkShaderModule ObjectCache::GetPixelShaderForUid(const PixelShaderUid& uid)
|
||||
{
|
||||
auto it = m_ps_cache.shader_map.find(uid);
|
||||
if (it != m_ps_cache.shader_map.end())
|
||||
@ -535,8 +534,7 @@ VkShaderModule ObjectCache::GetPixelShaderForUid(const PixelShaderUid& uid,
|
||||
// Not in the cache, so compile the shader.
|
||||
ShaderCompiler::SPIRVCodeVector spv;
|
||||
VkShaderModule module = VK_NULL_HANDLE;
|
||||
ShaderCode source_code =
|
||||
GeneratePixelShaderCode(dstalpha_mode, APIType::Vulkan, uid.GetUidData());
|
||||
ShaderCode source_code = GeneratePixelShaderCode(APIType::Vulkan, uid.GetUidData());
|
||||
if (ShaderCompiler::CompileFragmentShader(&spv, source_code.GetBuffer().c_str(),
|
||||
source_code.GetBuffer().length()))
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
// Accesses ShaderGen shader caches
|
||||
VkShaderModule GetVertexShaderForUid(const VertexShaderUid& uid);
|
||||
VkShaderModule GetGeometryShaderForUid(const GeometryShaderUid& uid);
|
||||
VkShaderModule GetPixelShaderForUid(const PixelShaderUid& uid, DSTALPHA_MODE dstalpha_mode);
|
||||
VkShaderModule GetPixelShaderForUid(const PixelShaderUid& uid);
|
||||
|
||||
// Static samplers
|
||||
VkSampler GetPointSampler() const { return m_point_sampler; }
|
||||
|
@ -223,7 +223,7 @@ bool StateTracker::CheckForShaderChanges(u32 gx_primitive_type, DSTALPHA_MODE ds
|
||||
|
||||
if (ps_uid != m_ps_uid)
|
||||
{
|
||||
m_pipeline_state.ps = g_object_cache->GetPixelShaderForUid(ps_uid, dstalpha_mode);
|
||||
m_pipeline_state.ps = g_object_cache->GetPixelShaderForUid(ps_uid);
|
||||
m_ps_uid = ps_uid;
|
||||
changed = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user