wined3d: Implement [imm_]atomic_{umax, umin} instructions for unsigned integers.
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
a9fdb4a099
commit
0496c8c559
|
@ -13120,9 +13120,7 @@ static void test_atomic_instructions(void)
|
|||
|
||||
todo_wine_if(expected != test->input[j]
|
||||
&& (!strcmp(instructions[j], "atomic_imax")
|
||||
|| !strcmp(instructions[j], "atomic_imin")
|
||||
|| !strcmp(instructions[j], "atomic_umax")
|
||||
|| !strcmp(instructions[j], "atomic_umin")))
|
||||
|| !strcmp(instructions[j], "atomic_imin")))
|
||||
ok(value == expected, "Test %u: Got %#x (%d), expected %#x (%d) for '%s' "
|
||||
"with inputs (%u, %u), (%d), %#x (%d).\n",
|
||||
i, value, value, expected, expected, instructions[j],
|
||||
|
@ -13143,9 +13141,7 @@ static void test_atomic_instructions(void)
|
|||
for (j = 0; j < sizeof(instructions) / sizeof(*instructions); ++j)
|
||||
{
|
||||
BOOL todo_instruction = !strcmp(imm_instructions[j], "imm_atomic_imax")
|
||||
|| !strcmp(imm_instructions[j], "imm_atomic_imin")
|
||||
|| !strcmp(imm_instructions[j], "imm_atomic_umax")
|
||||
|| !strcmp(imm_instructions[j], "imm_atomic_umin");
|
||||
|| !strcmp(imm_instructions[j], "imm_atomic_imin");
|
||||
unsigned int out_value = get_readback_color(&out_rb, j, 0);
|
||||
unsigned int value = get_readback_color(&rb, j, 0);
|
||||
unsigned int expected = test->expected_result[j];
|
||||
|
|
|
@ -5000,6 +5000,24 @@ static void shader_glsl_atomic(const struct wined3d_shader_instruction *ins)
|
|||
case WINED3DSIH_IMM_ATOMIC_OR:
|
||||
op = "imageAtomicOr";
|
||||
break;
|
||||
case WINED3DSIH_ATOMIC_UMAX:
|
||||
case WINED3DSIH_IMM_ATOMIC_UMAX:
|
||||
op = "imageAtomicMax";
|
||||
if (data_type != WINED3D_DATA_UINT)
|
||||
{
|
||||
FIXME("Unhandled opcode %#x for signed integers.\n", ins->handler_idx);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case WINED3DSIH_ATOMIC_UMIN:
|
||||
case WINED3DSIH_IMM_ATOMIC_UMIN:
|
||||
op = "imageAtomicMin";
|
||||
if (data_type != WINED3D_DATA_UINT)
|
||||
{
|
||||
FIXME("Unhandled opcode %#x for signed integers.\n", ins->handler_idx);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case WINED3DSIH_ATOMIC_XOR:
|
||||
case WINED3DSIH_IMM_ATOMIC_XOR:
|
||||
op = "imageAtomicXor";
|
||||
|
@ -9353,8 +9371,8 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
|
|||
/* WINED3DSIH_ATOMIC_IMAX */ NULL,
|
||||
/* WINED3DSIH_ATOMIC_IMIN */ NULL,
|
||||
/* WINED3DSIH_ATOMIC_OR */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_ATOMIC_UMAX */ NULL,
|
||||
/* WINED3DSIH_ATOMIC_UMIN */ NULL,
|
||||
/* WINED3DSIH_ATOMIC_UMAX */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_ATOMIC_UMIN */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_ATOMIC_XOR */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_BEM */ shader_glsl_bem,
|
||||
/* WINED3DSIH_BFI */ shader_glsl_bitwise_op,
|
||||
|
@ -9470,8 +9488,8 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
|
|||
/* WINED3DSIH_IMM_ATOMIC_IMAX */ NULL,
|
||||
/* WINED3DSIH_IMM_ATOMIC_IMIN */ NULL,
|
||||
/* WINED3DSIH_IMM_ATOMIC_OR */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_IMM_ATOMIC_UMAX */ NULL,
|
||||
/* WINED3DSIH_IMM_ATOMIC_UMIN */ NULL,
|
||||
/* WINED3DSIH_IMM_ATOMIC_UMAX */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_IMM_ATOMIC_UMIN */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_IMM_ATOMIC_XOR */ shader_glsl_atomic,
|
||||
/* WINED3DSIH_IMUL */ shader_glsl_imul,
|
||||
/* WINED3DSIH_INE */ shader_glsl_relop,
|
||||
|
|
Loading…
Reference in New Issue