Bug 1551353 - Correctly map PBOs for readback on GLES r=kvark
authorBarret Rennie <barret@brennie.ca>
Tue, 14 May 2019 22:54:19 +0000
changeset 532702 a2fe99cb693af42947db157c030ac85c47002c0d
parent 532701 d33ae89768490ef0deacc089ced0d0a68aa754d0
child 532703 90ff166702b5dd7e9848eef62746457b11d8fe92
push id11270
push userrgurzau@mozilla.com
push dateWed, 15 May 2019 15:07:19 +0000
treeherdermozilla-beta@571bc76da583 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskvark
bugs1551353
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551353 - Correctly map PBOs for readback on GLES r=kvark The implementation of `Device::map_pbo_for_readback` on GLES (e.g., Windows with ANGLE) was using the incorrect enumeration value when attempting to map the buffer into memory. Differential Revision: https://phabricator.services.mozilla.com/D31156
gfx/wr/webrender/src/device/gl.rs
--- a/gfx/wr/webrender/src/device/gl.rs
+++ b/gfx/wr/webrender/src/device/gl.rs
@@ -2417,17 +2417,17 @@ impl Device {
                 self.gl.map_buffer(gl::PIXEL_PACK_BUFFER, gl::READ_ONLY)
             }
 
             gl::GlType::Gles => {
                 self.gl.map_buffer_range(
                     gl::PIXEL_PACK_BUFFER,
                     0,
                     pbo.reserved_size as _,
-                    gl::READ_ONLY)
+                    gl::MAP_READ_BIT)
             }
         };
 
         if buf_ptr.is_null() {
             return None;
         }
 
         let buffer = unsafe { slice::from_raw_parts(buf_ptr as *const u8, pbo.reserved_size) };