From b8c47175672063e45229b7cf82b79d1e97ec2943 Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Wed, 10 Aug 2016 13:20:30 -0600 Subject: [PATCH] swr: [rasterizer core] change scale on VP matrix element gathers Was 1, which led to pulling denorms for non-zero indices. Changed to sizeof(float). Signed-off-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/core/frontend.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.h b/src/gallium/drivers/swr/rasterizer/core/frontend.h index 5e7762af2d5..367d1998b91 100644 --- a/src/gallium/drivers/swr/rasterizer/core/frontend.h +++ b/src/gallium/drivers/swr/rasterizer/core/frontend.h @@ -224,12 +224,12 @@ INLINE void viewportTransform(simdvector *v, const SWR_VIEWPORT_MATRICES & vpMatrices, simdscalari vViewportIdx) { // perform a gather of each matrix element based on the viewport array indexes - simdscalar m00 = _simd_i32gather_ps(&vpMatrices.m00[0], vViewportIdx, 1); - simdscalar m30 = _simd_i32gather_ps(&vpMatrices.m30[0], vViewportIdx, 1); - simdscalar m11 = _simd_i32gather_ps(&vpMatrices.m11[0], vViewportIdx, 1); - simdscalar m31 = _simd_i32gather_ps(&vpMatrices.m31[0], vViewportIdx, 1); - simdscalar m22 = _simd_i32gather_ps(&vpMatrices.m22[0], vViewportIdx, 1); - simdscalar m32 = _simd_i32gather_ps(&vpMatrices.m32[0], vViewportIdx, 1); + simdscalar m00 = _simd_i32gather_ps(&vpMatrices.m00[0], vViewportIdx, 4); + simdscalar m30 = _simd_i32gather_ps(&vpMatrices.m30[0], vViewportIdx, 4); + simdscalar m11 = _simd_i32gather_ps(&vpMatrices.m11[0], vViewportIdx, 4); + simdscalar m31 = _simd_i32gather_ps(&vpMatrices.m31[0], vViewportIdx, 4); + simdscalar m22 = _simd_i32gather_ps(&vpMatrices.m22[0], vViewportIdx, 4); + simdscalar m32 = _simd_i32gather_ps(&vpMatrices.m32[0], vViewportIdx, 4); for (uint32_t i = 0; i < NumVerts; ++i) { -- 2.30.2