wined3d: Fix SM4 discard_z instruction.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4e610f059d
commit
f3e612bf16
|
@ -6604,10 +6604,11 @@ static void shader_glsl_texkill(const struct wined3d_shader_instruction *ins)
|
|||
{
|
||||
if (ins->ctx->reg_maps->shader_version.major >= 4)
|
||||
{
|
||||
const char *condition = ins->flags == WINED3D_SHADER_CONDITIONAL_OP_NZ ? "bool" : "!bool";
|
||||
struct glsl_src_param src_param;
|
||||
|
||||
shader_glsl_add_src_param(ins, &ins->src[0], WINED3DSP_WRITEMASK_0, &src_param);
|
||||
shader_addline(ins->ctx->buffer, "if (bool(%s)) discard;\n", src_param.param_str);
|
||||
shader_addline(ins->ctx->buffer, "if (%s(%s)) discard;\n", condition, src_param.param_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2958,7 +2958,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
|
|||
if (ins.handler_idx == WINED3DSIH_BREAKP
|
||||
|| ins.handler_idx == WINED3DSIH_CONTINUEP
|
||||
|| ins.handler_idx == WINED3DSIH_IF
|
||||
|| ins.handler_idx == WINED3DSIH_RETP)
|
||||
|| ins.handler_idx == WINED3DSIH_RETP
|
||||
|| ins.handler_idx == WINED3DSIH_TEXKILL)
|
||||
{
|
||||
switch (ins.flags)
|
||||
{
|
||||
|
|
|
@ -894,7 +894,8 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
|
|||
{WINED3D_SM4_OP_DEFAULT, WINED3DSIH_DEFAULT, "", ""},
|
||||
{WINED3D_SM4_OP_DERIV_RTX, WINED3DSIH_DSX, "f", "f"},
|
||||
{WINED3D_SM4_OP_DERIV_RTY, WINED3DSIH_DSY, "f", "f"},
|
||||
{WINED3D_SM4_OP_DISCARD, WINED3DSIH_TEXKILL, "", "u"},
|
||||
{WINED3D_SM4_OP_DISCARD, WINED3DSIH_TEXKILL, "", "u",
|
||||
shader_sm4_read_conditional_op},
|
||||
{WINED3D_SM4_OP_DIV, WINED3DSIH_DIV, "f", "ff"},
|
||||
{WINED3D_SM4_OP_DP2, WINED3DSIH_DP2, "f", "ff"},
|
||||
{WINED3D_SM4_OP_DP3, WINED3DSIH_DP3, "f", "ff"},
|
||||
|
|
Loading…
Reference in New Issue