DescriptionUse mapped memory for uploading large textures.
When TexImage2D/TexImage3D is called with an image that is larger than
the ring buffer, we had previously fallen back to calling
TexSubImage2D/TexSubImage3D multiple times. This is suboptimal because
we always issue a clear along with TexSubImage calls for security
reasons (the image is not being completely replaced so we do not want
to leak old texture data).
This CL now makes it so it falls back to using mapped memory instead. If
we run out of memory, then we fall back to TexSubImage2D as we did
before.
R=jbauman@chromium.org, piman@chromium.org
BUG=462078
Committed: https://crrev.com/4e297d74fef5371fe545e994aa479c5e7b7eb2f9
Cr-Commit-Position: refs/heads/master@{#333851}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Same fix for TexImage3D, also share uploading code. #
Total comments: 5
Patch Set 3 : Removed old code. #Patch Set 4 : Fixed old unit tests and added new unit tests. #Patch Set 5 : Added method to discard last block in ringbuffer #Patch Set 6 : Discard blocks by simply marking them as padding. #
Total comments: 2
Patch Set 7 : Added new max allocated bytes limit to mapped memory manager #
Total comments: 4
Patch Set 8 : Modified discard to actually modify the blocks #Patch Set 9 : Bad upload, reupload #
Total comments: 6
Patch Set 10 : Simplified how discard is implemented #Patch Set 11 : Added dcheck and improved other error messages #Messages
Total messages: 25 (6 generated)
|