diff options
author | Nicolai Hähnle <[email protected]> | 2017-01-10 14:54:22 +0100 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2017-01-13 00:39:07 +0100 |
commit | 0ee1ee5fbb93e76dd96c4ccbd45c82ba8382682c (patch) | |
tree | 0d2d073b86ff2765901cbb0ea5713933adb7277c /src/gallium | |
parent | 9f590ee9d9033d72cba70a774902ee2472b9414f (diff) |
radeonsi: only touch first three coordinates in si_prepare_cube_coords
Sourcing coords_arg[4] is actually never correct, since bias is handled
differently in tex_fetch_args anyway.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c index c410a8b540a..11bd45d1b83 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c @@ -1027,7 +1027,7 @@ void si_prepare_cube_coords(struct lp_build_tgsi_context *bld_base, LLVMBuilderRef builder = gallivm->builder; LLVMTypeRef type = bld_base->base.elem_type; struct cube_selection_coords selcoords; - LLVMValueRef coords[4]; + LLVMValueRef coords[3]; LLVMValueRef invma; build_cube_intrinsic(gallivm, coords_arg, &selcoords); @@ -1100,16 +1100,5 @@ void si_prepare_cube_coords(struct lp_build_tgsi_context *bld_base, coords_arg[3], lp_build_const_float(gallivm, 8.0), coords[2]); } - /* Preserve compare/lod/bias. Put it in coords.w. */ - if (opcode == TGSI_OPCODE_TEX2 || - opcode == TGSI_OPCODE_TXB2 || - opcode == TGSI_OPCODE_TXL2) { - coords[3] = coords_arg[4]; - } else if (opcode == TGSI_OPCODE_TXB || - opcode == TGSI_OPCODE_TXL || - target == TGSI_TEXTURE_SHADOWCUBE) { - coords[3] = coords_arg[3]; - } - memcpy(coords_arg, coords, sizeof(coords)); } |