mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 15:55:31 +01:00
Merge pull request #10488 from JosJuice/logic-ops-logic
PixelShaderGen: Check uid_data for use_shader_logic_op
This commit is contained in:
commit
56a98532e1
@ -944,9 +944,9 @@ ShaderCode GeneratePixelShaderCode(APIType api_type, const ShaderHostConfig& hos
|
||||
(!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_DUAL_SOURCE_BLENDING) ||
|
||||
uid_data->useDstAlpha);
|
||||
const bool use_shader_blend =
|
||||
!use_dual_source && (uid_data->useDstAlpha && host_config.backend_shader_framebuffer_fetch);
|
||||
const bool use_shader_logic_op =
|
||||
!host_config.backend_logic_op && host_config.backend_shader_framebuffer_fetch;
|
||||
!use_dual_source && uid_data->useDstAlpha && host_config.backend_shader_framebuffer_fetch;
|
||||
const bool use_shader_logic_op = !host_config.backend_logic_op && uid_data->logic_op_enable &&
|
||||
host_config.backend_shader_framebuffer_fetch;
|
||||
|
||||
if (api_type == APIType::OpenGL || api_type == APIType::Vulkan)
|
||||
{
|
||||
@ -1948,8 +1948,6 @@ static void WriteFog(ShaderCode& out, const pixel_shader_uid_data* uid_data)
|
||||
}
|
||||
|
||||
static void WriteLogicOp(ShaderCode& out, const pixel_shader_uid_data* uid_data)
|
||||
{
|
||||
if (uid_data->logic_op_enable)
|
||||
{
|
||||
static constexpr std::array<const char*, 16> logic_op_mode{
|
||||
"int4(0, 0, 0, 0)", // CLEAR
|
||||
@ -1973,7 +1971,6 @@ static void WriteLogicOp(ShaderCode& out, const pixel_shader_uid_data* uid_data)
|
||||
out.Write("\tint4 fb_value = iround(initial_ocol0 * 255.0);\n");
|
||||
out.Write("\tprev = {};\n", logic_op_mode[uid_data->logic_op_mode]);
|
||||
}
|
||||
}
|
||||
|
||||
static void WriteColor(ShaderCode& out, APIType api_type, const pixel_shader_uid_data* uid_data,
|
||||
bool use_dual_source)
|
||||
|
Loading…
x
Reference in New Issue
Block a user