зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1695660 - Remove layer_id parameter in attach_read_texture. r=gfx-reviewers,jrmuizel
Depends on D106793 Differential Revision: https://phabricator.services.mozilla.com/D106794
This commit is contained in:
Родитель
8b70e81783
Коммит
d93533a412
|
@ -3151,9 +3151,7 @@ impl Device {
|
|||
}
|
||||
|
||||
/// Attaches the provided texture to the current Read FBO binding.
|
||||
fn attach_read_texture_raw(
|
||||
&mut self, texture_id: gl::GLuint, target: gl::GLuint, _layer_id: i32
|
||||
) {
|
||||
fn attach_read_texture_raw(&mut self, texture_id: gl::GLuint, target: gl::GLuint) {
|
||||
self.gl.framebuffer_texture_2d(
|
||||
gl::READ_FRAMEBUFFER,
|
||||
gl::COLOR_ATTACHMENT0,
|
||||
|
@ -3164,13 +3162,13 @@ impl Device {
|
|||
}
|
||||
|
||||
pub fn attach_read_texture_external(
|
||||
&mut self, texture_id: gl::GLuint, target: ImageBufferKind, layer_id: i32
|
||||
&mut self, texture_id: gl::GLuint, target: ImageBufferKind
|
||||
) {
|
||||
self.attach_read_texture_raw(texture_id, get_gl_target(target), layer_id)
|
||||
self.attach_read_texture_raw(texture_id, get_gl_target(target))
|
||||
}
|
||||
|
||||
pub fn attach_read_texture(&mut self, texture: &Texture, layer_id: i32) {
|
||||
self.attach_read_texture_raw(texture.id, texture.target, layer_id)
|
||||
pub fn attach_read_texture(&mut self, texture: &Texture) {
|
||||
self.attach_read_texture_raw(texture.id, texture.target)
|
||||
}
|
||||
|
||||
fn bind_vao_impl(&mut self, id: gl::GLuint) {
|
||||
|
|
|
@ -5546,7 +5546,7 @@ impl Renderer {
|
|||
|
||||
let rect = device_size_as_framebuffer_size(rect_size).into();
|
||||
|
||||
device.attach_read_texture(texture, 0);
|
||||
device.attach_read_texture(texture);
|
||||
#[cfg(feature = "png")]
|
||||
{
|
||||
let mut png_data;
|
||||
|
@ -5663,7 +5663,7 @@ impl Renderer {
|
|||
ExternalImageType::Buffer => unreachable!(),
|
||||
};
|
||||
info!("\t\tnative texture of target {:?}", target);
|
||||
self.device.attach_read_texture_external(gl_id, target, 0);
|
||||
self.device.attach_read_texture_external(gl_id, target);
|
||||
let data = self.device.read_pixels(&def.descriptor);
|
||||
let short_path = format!("externals/t{}.raw", tex_id);
|
||||
(Some(data), e.insert(short_path).clone())
|
||||
|
|
Загрузка…
Ссылка в новой задаче