Commit db17b5d4 by Nicolas Capens

Remove image size rounding to 4x4 multiple.

Bug 21935792 Surface::size() already takes into account that compressed images need their dimensions rounding up to whole 4x4 tiles. Change-Id: Ie6b7b5d23294e8d3c85b3b362670cfe0c569585d Reviewed-on: https://swiftshader-review.googlesource.com/3571Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 850c9462
...@@ -2378,10 +2378,11 @@ namespace sw ...@@ -2378,10 +2378,11 @@ namespace sw
void *Surface::allocateBuffer(int width, int height, int depth, Format format) void *Surface::allocateBuffer(int width, int height, int depth, Format format)
{ {
int width4 = (width + 3) & ~3; // Render targets require 2x2 quads
int height4 = (height + 3) & ~3; int width2 = (width + 1) & ~1;
int height2 = (height + 1) & ~1;
return allocateZero(size(width4, height4, depth, format)); return allocateZero(size(width2, height2, depth, format));
} }
void Surface::memfill4(void *buffer, int pattern, int bytes) void Surface::memfill4(void *buffer, int pattern, int bytes)
......
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