From 125451b9f024ea5845eb6c1b3056bc1f1995cc55 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 12 Feb 2008 11:18:53 -0800 Subject: [PATCH] Remove open-coded fetch functions --- src/mesa/pipe/cell/spu/spu_vertex_fetch.c | 34 +++-------------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/src/mesa/pipe/cell/spu/spu_vertex_fetch.c b/src/mesa/pipe/cell/spu/spu_vertex_fetch.c index f6ffcae90ec..cbd389435e6 100644 --- a/src/mesa/pipe/cell/spu/spu_vertex_fetch.c +++ b/src/mesa/pipe/cell/spu/spu_vertex_fetch.c @@ -99,36 +99,6 @@ fetch_unaligned(qword *dst, unsigned ea, unsigned size) } } -static qword -fetch_R32G32B32A32_FLOAT(const qword *qw) -{ - return *qw; -} - - -static qword -fetch_R32G32B32A32_USCALED(const qword *qw) -{ - return si_cuflt(*qw, 0); -} - - -static qword -fetch_R32G32B32A32_UNORM(const qword *qw) -{ - qword x = si_cuflt(*qw, 0); - vec_float4 scale = spu_splats(1.0f / 255.0f); - - return si_fm(x, (qword) scale); -} - - -static qword -fetch_R32G32B32A32_SSCALED(const qword *qw) -{ - return si_csflt(*qw, 0); -} - #define CVT_32_FLOAT(q) (*q) @@ -285,18 +255,22 @@ FETCH_ATTRIB( R64G64B64_FLOAT, SZ_3, CVT_64_FLOAT ) FETCH_ATTRIB( R64G64_FLOAT, SZ_2, CVT_64_FLOAT ) FETCH_ATTRIB( R64_FLOAT, SZ_1, CVT_64_FLOAT ) +FETCH_ATTRIB( R32G32B32A32_FLOAT, SZ_4, CVT_32_FLOAT ) FETCH_ATTRIB( R32G32B32_FLOAT, SZ_3, CVT_32_FLOAT ) FETCH_ATTRIB( R32G32_FLOAT, SZ_2, CVT_32_FLOAT ) FETCH_ATTRIB( R32_FLOAT, SZ_1, CVT_32_FLOAT ) +FETCH_ATTRIB( R32G32B32A32_USCALED, SZ_4, CVT_32_USCALED ) FETCH_ATTRIB( R32G32B32_USCALED, SZ_3, CVT_32_USCALED ) FETCH_ATTRIB( R32G32_USCALED, SZ_2, CVT_32_USCALED ) FETCH_ATTRIB( R32_USCALED, SZ_1, CVT_32_USCALED ) +FETCH_ATTRIB( R32G32B32A32_SSCALED, SZ_4, CVT_32_SSCALED ) FETCH_ATTRIB( R32G32B32_SSCALED, SZ_3, CVT_32_SSCALED ) FETCH_ATTRIB( R32G32_SSCALED, SZ_2, CVT_32_SSCALED ) FETCH_ATTRIB( R32_SSCALED, SZ_1, CVT_32_SSCALED ) +FETCH_ATTRIB( R32G32B32A32_UNORM, SZ_4, CVT_32_UNORM ) FETCH_ATTRIB( R32G32B32_UNORM, SZ_3, CVT_32_UNORM ) FETCH_ATTRIB( R32G32_UNORM, SZ_2, CVT_32_UNORM ) FETCH_ATTRIB( R32_UNORM, SZ_1, CVT_32_UNORM ) -- 2.30.2