wined3d: Implement SM5 bfrev 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:
Józef Kucia 2017-01-28 17:14:05 +01:00 committed by Alexandre Julliard
parent 8ef73e88c1
commit 832b7ee727
2 changed files with 5 additions and 4 deletions

View File

@ -10741,9 +10741,9 @@ static void test_uint_shader_instructions(void)
{&ps_bfi, { 2, 3, 4, 5}, {9, 14, 19, 20}, TRUE},
{&ps_bfi, {~0u, ~0u, ~0u, ~0u}, {0xfffffffd, 0xfffffffe, 0xffffffff, 0xfffffffc}, TRUE},
{&ps_bfrev, {0x12345678}, {0x1e6a2c48, 0x12345678, 0x1e6a0000, 0x2c480000}, TRUE},
{&ps_bfrev, {0xffff0000}, {0x0000ffff, 0xffff0000, 0x00000000, 0xffff0000}, TRUE},
{&ps_bfrev, {0xffffffff}, {0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000}, TRUE},
{&ps_bfrev, {0x12345678}, {0x1e6a2c48, 0x12345678, 0x1e6a0000, 0x2c480000}},
{&ps_bfrev, {0xffff0000}, {0x0000ffff, 0xffff0000, 0x00000000, 0xffff0000}},
{&ps_bfrev, {0xffffffff}, {0xffffffff, 0xffffffff, 0xffff0000, 0xffff0000}},
{&ps_ftou, {BITS_NNAN}, { 0, 0}},
{&ps_ftou, {BITS_NAN}, { 0, 0}},

View File

@ -3723,6 +3723,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins)
switch (ins->handler_idx)
{
case WINED3DSIH_ABS: instruction = "abs"; break;
case WINED3DSIH_BFREV: instruction = "bitfieldReverse"; break;
case WINED3DSIH_DSX: instruction = "dFdx"; break;
case WINED3DSIH_DSX_COARSE: instruction = "dFdxCoarse"; break;
case WINED3DSIH_DSX_FINE: instruction = "dFdxFine"; break;
@ -8844,7 +8845,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_ATOMIC_XOR */ NULL,
/* WINED3DSIH_BEM */ shader_glsl_bem,
/* WINED3DSIH_BFI */ NULL,
/* WINED3DSIH_BFREV */ NULL,
/* WINED3DSIH_BFREV */ shader_glsl_map2gl,
/* WINED3DSIH_BREAK */ shader_glsl_break,
/* WINED3DSIH_BREAKC */ shader_glsl_breakc,
/* WINED3DSIH_BREAKP */ shader_glsl_breakp,