diff options
author | George Kyriazis <[email protected]> | 2018-04-09 19:47:51 -0500 |
---|---|---|
committer | George Kyriazis <[email protected]> | 2018-04-18 10:51:38 -0500 |
commit | 71239478d3016138e1f467309205984fe799b699 (patch) | |
tree | c603871579af0d998f9ba50ab44f02f7fe3cddd9 /src/gallium/drivers/swr | |
parent | c57b5943171a8069764e66a5178b89dca01f3a0e (diff) |
swr/rast: Fix byte offset for non-indexed draws
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/frontend.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp index 25d1073885d..20768599120 100644 --- a/src/gallium/drivers/swr/rasterizer/core/frontend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/frontend.cpp @@ -1729,13 +1729,14 @@ void ProcessDraw( uint32_t offset; offset = std::min(endVertex-i, (uint32_t) KNOB_SIMD16_WIDTH); #if USE_SIMD16_SHADERS + offset *= 4; // convert from index to address fetchInfo_lo.pLastIndex += offset; #else - fetchInfo_lo.pLastIndex += std::min(offset, (uint32_t) KNOB_SIMD_WIDTH); + fetchInfo_lo.pLastIndex += std::min(offset, (uint32_t) KNOB_SIMD_WIDTH) * 4; // * 4 for converting index to address uint32_t offset2 = std::min(offset, (uint32_t) KNOB_SIMD16_WIDTH)-KNOB_SIMD_WIDTH; assert(offset >= 0); fetchInfo_hi.pLastIndex = fetchInfo_hi.pIndices; - fetchInfo_hi.pLastIndex += offset2; + fetchInfo_hi.pLastIndex += offset2 * 4; // * 4 for converting index to address #endif } // 1. Execute FS/VS for a single SIMD. |