summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libpixelflinger/codeflinger/texturing.cpp')
-rw-r--r--libpixelflinger/codeflinger/texturing.cpp105
1 files changed, 0 insertions, 105 deletions
diff --git a/libpixelflinger/codeflinger/texturing.cpp b/libpixelflinger/codeflinger/texturing.cpp
index 81950bfdc..29a3742c1 100644
--- a/libpixelflinger/codeflinger/texturing.cpp
+++ b/libpixelflinger/codeflinger/texturing.cpp
@@ -25,10 +25,6 @@
25 25
26#include "GGLAssembler.h" 26#include "GGLAssembler.h"
27 27
28#ifdef __ARM_ARCH__
29#include <machine/cpu-features.h>
30#endif
31
32namespace android { 28namespace android {
33 29
34// --------------------------------------------------------------------------- 30// ---------------------------------------------------------------------------
@@ -888,106 +884,6 @@ void GGLAssembler::filter24(
888 load(txPtr, texel, 0); 884 load(txPtr, texel, 0);
889} 885}
890 886
891#if __ARM_ARCH__ >= 6
892// ARMv6 version, using UXTB16, and scheduled for Cortex-A8 pipeline
893void GGLAssembler::filter32(
894 const fragment_parts_t& parts,
895 pixel_t& texel, const texture_unit_t& tmu,
896 int U, int V, pointer_t& txPtr,
897 int FRAC_BITS)
898{
899 const int adjust = FRAC_BITS*2 - 8;
900 const int round = 0;
901 const int prescale = 16 - adjust;
902
903 Scratch scratches(registerFile());
904
905 int pixel= scratches.obtain();
906 int dh = scratches.obtain();
907 int u = scratches.obtain();
908 int k = scratches.obtain();
909
910 int temp = scratches.obtain();
911 int dl = scratches.obtain();
912
913 int offsetrt = scratches.obtain();
914 int offsetlb = scratches.obtain();
915
916 int pixellb = offsetlb;
917
918 // RB -> U * V
919 CONTEXT_LOAD(offsetrt, generated_vars.rt);
920 CONTEXT_LOAD(offsetlb, generated_vars.lb);
921 if(!round) {
922 MOV(AL, 0, U, reg_imm(U, LSL, prescale));
923 }
924 ADD(AL, 0, u, offsetrt, offsetlb);
925
926 LDR(AL, pixel, txPtr.reg, reg_scale_pre(u));
927 if (round) {
928 SMULBB(AL, u, U, V);
929 RSB(AL, 0, U, U, imm(1<<FRAC_BITS));
930 } else {
931 SMULWB(AL, u, U, V);
932 RSB(AL, 0, U, U, imm(1<<(FRAC_BITS+prescale)));
933 }
934 UXTB16(AL, temp, pixel, 0);
935 if (round) {
936 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
937 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
938 }
939 LDR(AL, pixellb, txPtr.reg, reg_scale_pre(offsetlb));
940 MUL(AL, 0, dh, temp, u);
941 UXTB16(AL, temp, pixel, 8);
942 MUL(AL, 0, dl, temp, u);
943 RSB(AL, 0, k, u, imm(0x100));
944
945 // LB -> (1-U) * V
946 if (round) {
947 SMULBB(AL, u, U, V);
948 } else {
949 SMULWB(AL, u, U, V);
950 }
951 UXTB16(AL, temp, pixellb, 0);
952 if (round) {
953 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
954 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
955 }
956 MLA(AL, 0, dh, temp, u, dh);
957 UXTB16(AL, temp, pixellb, 8);
958 MLA(AL, 0, dl, temp, u, dl);
959 SUB(AL, 0, k, k, u);
960
961 // LT -> (1-U)*(1-V)
962 RSB(AL, 0, V, V, imm(1<<FRAC_BITS));
963 LDR(AL, pixel, txPtr.reg);
964 if (round) {
965 SMULBB(AL, u, U, V);
966 } else {
967 SMULWB(AL, u, U, V);
968 }
969 UXTB16(AL, temp, pixel, 0);
970 if (round) {
971 ADD(AL, 0, u, u, imm(1<<(adjust-1)));
972 MOV(AL, 0, u, reg_imm(u, LSR, adjust));
973 }
974 MLA(AL, 0, dh, temp, u, dh);
975 UXTB16(AL, temp, pixel, 8);
976 MLA(AL, 0, dl, temp, u, dl);
977
978 // RT -> U*(1-V)
979 LDR(AL, pixel, txPtr.reg, reg_scale_pre(offsetrt));
980 SUB(AL, 0, u, k, u);
981 UXTB16(AL, temp, pixel, 0);
982 MLA(AL, 0, dh, temp, u, dh);
983 UXTB16(AL, temp, pixel, 8);
984 MLA(AL, 0, dl, temp, u, dl);
985
986 UXTB16(AL, dh, dh, 8);
987 UXTB16(AL, dl, dl, 8);
988 ORR(AL, 0, texel.reg, dh, reg_imm(dl, LSL, 8));
989}
990#else
991void GGLAssembler::filter32( 887void GGLAssembler::filter32(
992 const fragment_parts_t& /*parts*/, 888 const fragment_parts_t& /*parts*/,
993 pixel_t& texel, const texture_unit_t& /*tmu*/, 889 pixel_t& texel, const texture_unit_t& /*tmu*/,
@@ -1075,7 +971,6 @@ void GGLAssembler::filter32(
1075 AND(AL, 0, dl, dl, reg_imm(mask, LSL, 8)); 971 AND(AL, 0, dl, dl, reg_imm(mask, LSL, 8));
1076 ORR(AL, 0, texel.reg, dh, dl); 972 ORR(AL, 0, texel.reg, dh, dl);
1077} 973}
1078#endif
1079 974
1080void GGLAssembler::build_texture_environment( 975void GGLAssembler::build_texture_environment(
1081 component_t& fragment, 976 component_t& fragment,