vkd3d-shader/trace: Add separate id for discard.

Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
This commit is contained in:
Nikolay Sivov 2023-04-20 22:20:33 -04:00 committed by Alexandre Julliard
parent 06cc2e1aee
commit 6da7d16d4c
Notes: Alexandre Julliard 2023-04-26 22:59:12 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/136
4 changed files with 6 additions and 2 deletions

View File

@ -7774,6 +7774,7 @@ static int spirv_compiler_emit_control_flow_instruction(struct spirv_compiler *c
spirv_compiler_emit_retc(compiler, instruction);
break;
case VKD3DSIH_DISCARD:
case VKD3DSIH_TEXKILL:
spirv_compiler_emit_kill(compiler, instruction);
break;
@ -9564,6 +9565,7 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler,
case VKD3DSIH_CONTINUE:
case VKD3DSIH_CONTINUEP:
case VKD3DSIH_DEFAULT:
case VKD3DSIH_DISCARD:
case VKD3DSIH_ELSE:
case VKD3DSIH_ENDIF:
case VKD3DSIH_ENDLOOP:

View File

@ -1091,7 +1091,7 @@ static const struct vkd3d_sm4_opcode_info opcode_table[] =
{VKD3D_SM4_OP_DEFAULT, VKD3DSIH_DEFAULT, "", ""},
{VKD3D_SM4_OP_DERIV_RTX, VKD3DSIH_DSX, "f", "f"},
{VKD3D_SM4_OP_DERIV_RTY, VKD3DSIH_DSY, "f", "f"},
{VKD3D_SM4_OP_DISCARD, VKD3DSIH_TEXKILL, "", "u",
{VKD3D_SM4_OP_DISCARD, VKD3DSIH_DISCARD, "", "u",
shader_sm4_read_conditional_op},
{VKD3D_SM4_OP_DIV, VKD3DSIH_DIV, "f", "ff"},
{VKD3D_SM4_OP_DP2, VKD3DSIH_DP2, "f", "ff"},

View File

@ -109,6 +109,7 @@ static const char * const shader_opcode_names[] =
[VKD3DSIH_DEQ ] = "deq",
[VKD3DSIH_DFMA ] = "dfma",
[VKD3DSIH_DGE ] = "dge",
[VKD3DSIH_DISCARD ] = "discard",
[VKD3DSIH_DIV ] = "div",
[VKD3DSIH_DLT ] = "dlt",
[VKD3DSIH_DMAX ] = "dmax",
@ -1505,9 +1506,9 @@ static void shader_dump_instruction_flags(struct vkd3d_d3d_asm_compiler *compile
{
case VKD3DSIH_BREAKP:
case VKD3DSIH_CONTINUEP:
case VKD3DSIH_DISCARD:
case VKD3DSIH_IF:
case VKD3DSIH_RETP:
case VKD3DSIH_TEXKILL:
switch (ins->flags)
{
case VKD3D_SHADER_CONDITIONAL_OP_NZ: shader_addline(buffer, "_nz"); break;

View File

@ -223,6 +223,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_DEQ,
VKD3DSIH_DFMA,
VKD3DSIH_DGE,
VKD3DSIH_DISCARD,
VKD3DSIH_DIV,
VKD3DSIH_DLT,
VKD3DSIH_DMAX,