Skip to content

Commit

Permalink
Fixed using an offset in Blitter::blitFromBuffer()
Browse files Browse the repository at this point in the history
The destination offset wasn't taken into account in the
computation of the source offset, which is necessary
because we compute the source coordinates from the
destination coordinates in the generated routine.

Bug: angleproject:4037 angleproject:4013
Change-Id: Ib9961cec267653c8d33da1847486943f8a670a49
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/37588
Presubmit-Ready: Alexis Hétu <[email protected]>
Tested-by: Alexis Hétu <[email protected]>
Kokoro-Presubmit: kokoro <[email protected]>
Reviewed-by: Antonio Maiorano <[email protected]>
  • Loading branch information
sugoi1 committed Oct 24, 2019
1 parent f8df30f commit 6d69aae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Device/Blitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,10 @@ namespace sw
bufferSlicePitch, // sSliceB
dst->slicePitchBytes(aspect, subresource.mipLevel), // dSliceB

0, 0, 1, 1,
static_cast<float>(-offset.x), // x0
static_cast<float>(-offset.y), // y0
1.0f, // w
1.0f, // h

offset.y, // y0d
static_cast<int>(offset.y + extent.height), // y1d
Expand Down

0 comments on commit 6d69aae

Please sign in to comment.