amd/common: unify cube map coordinate handling between radeonsi and radv
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 10 Jan 2017 14:35:27 +0000 (15:35 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Thu, 12 Jan 2017 23:39:10 +0000 (00:39 +0100)
commita0ce09b4b2a3063e49a02de3d12096cf462d10a3
tree21a73daa17be6d35f9622accd35b43d24293bd1b
parent0ee1ee5fbb93e76dd96c4ccbd45c82ba8382682c
amd/common: unify cube map coordinate handling between radeonsi and radv

Code is taken from a combination of radv (for the more basic functions,
to avoid gallivm dependencies) and radeonsi (for the new and improved
derivative calculations).

v2: add 0.5 offset to tex coords only after derivative calculation

v3:
- really only touch the first three coordinates
- rebase on the removal of the 1.5 --> 0.5 offset change

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (v2)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_util.c
src/amd/common/ac_llvm_util.h
src/amd/common/ac_nir_to_llvm.c
src/gallium/drivers/radeonsi/si_shader.c
src/gallium/drivers/radeonsi/si_shader_internal.h
src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c