Skip to content
Commit b638eb5d authored by Ian Romanick's avatar Ian Romanick Committed by Emil Velikov
Browse files

intel/fs: Fix extract_u8 of an odd byte from a 64-bit integer



In the old code, we would generate the exact same instruction for
extract_u8(some_u64, 0) and extract_u8(some_u64, 1).  The mask-a-word
trick only works for even numbered bytes.

This fixes the (new) piglit test
tests/spec/arb_gpu_shader_int64/execution/fs-ushr-and-mask.shader_test.

v2: Use a SHR instead of an AND.  This saves an instruction compared to
using two moves.  Suggested by Jason.

Fixes: 6ac2d169 ("i965/fs: Fix extract_i8/u8 to a 64-bit destination")
Reviewed-by: default avatarJason Ekstrand <jason@jlekstrand.net>
(cherry picked from commit 55e6454d)
[Emil: byte -> byte->u32[0] ]
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent 8448ece4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment