Commit 027714e7 by Nicolas Capens Committed by Nicolas Capens

Refactor texture pixel upload offsets.

Apply xoffset, yoffset, and zoffset at image buffer lock so we don't have to pass them down to the row loading functions as parameters. Change-Id: I055549c80b1b207df4c49f6f59ecfb8286736040 Reviewed-on: https://swiftshader-review.googlesource.com/17068Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent eab70768
......@@ -147,9 +147,9 @@ public:
shared = true;
}
virtual void *lock(unsigned int left, unsigned int top, sw::Lock lock)
virtual void *lock(int x, int y, int z, sw::Lock lock)
{
return lockExternal(left, top, 0, lock, sw::PUBLIC);
return lockExternal(x, y, z, lock, sw::PUBLIC);
}
unsigned int getPitch() const
......@@ -325,10 +325,10 @@ private:
sw::Surface::unlockInternal();
}
void *lock(unsigned int left, unsigned int top, sw::Lock lock) override
void *lock(int x, int y, int z, sw::Lock lock) override
{
LOGLOCK("image=%p op=%s lock=%d", this, __FUNCTION__, lock);
(void)sw::Surface::lockExternal(left, top, 0, lock, sw::PUBLIC);
(void)sw::Surface::lockExternal(x, y, z, lock, sw::PUBLIC);
return lockNativeBuffer(GRALLOC_USAGE_SW_READ_OFTEN | GRALLOC_USAGE_SW_WRITE_OFTEN);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment