wined3d: Fix handling of cnd instruction with coissue flag.
This commit is contained in:
parent
2db2303bbc
commit
c9458882a0
|
@ -1630,8 +1630,8 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins)
|
|||
shader_arb_get_dst_param(ins, dst, dst_name);
|
||||
shader_arb_get_src_param(ins, &ins->src[1], 1, src_name[1]);
|
||||
|
||||
/* The coissue flag changes the semantic of the cnd instruction in <= 1.3 shaders */
|
||||
if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue)
|
||||
if (shader_version <= WINED3D_SHADER_VERSION(1, 3) && ins->coissue
|
||||
&& ins->dst->write_mask != WINED3DSP_WRITEMASK_3)
|
||||
{
|
||||
shader_addline(buffer, "MOV%s %s, %s;\n", shader_arb_get_modifier(ins), dst_name, src_name[1]);
|
||||
}
|
||||
|
|
|
@ -3029,14 +3029,11 @@ static void shader_glsl_cnd(const struct wined3d_shader_instruction *ins)
|
|||
shader_glsl_add_src_param(ins, &ins->src[1], write_mask, &src1_param);
|
||||
shader_glsl_add_src_param(ins, &ins->src[2], write_mask, &src2_param);
|
||||
|
||||
/* Fun: The D3DSI_COISSUE flag changes the semantic of the cnd instruction for < 1.4 shaders */
|
||||
if (ins->coissue)
|
||||
{
|
||||
if (ins->coissue && ins->dst->write_mask != WINED3DSP_WRITEMASK_3)
|
||||
shader_addline(ins->ctx->buffer, "%s /* COISSUE! */);\n", src1_param.param_str);
|
||||
} else {
|
||||
else
|
||||
shader_addline(ins->ctx->buffer, "%s > 0.5 ? %s : %s);\n",
|
||||
src0_param.param_str, src1_param.param_str, src2_param.param_str);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue