Bug 1695660 - Remove layer index parameter from the upload code. r=gfx-reviewers,jrmuizel

Depends on D106794

Differential Revision: https://phabricator.services.mozilla.com/D106795
This commit is contained in:
Nicolas Silva 2021-03-02 16:54:21 +00:00
Родитель d93533a412
Коммит 1c5bda72d8
4 изменённых файлов: 2 добавлений и 11 удалений

Просмотреть файл

@ -3905,7 +3905,6 @@ pub struct FormatDesc {
#[derive(Debug)]
struct UploadChunk<'a> {
rect: DeviceIntRect,
layer_index: i32,
stride: Option<i32>,
offset: usize,
format_override: Option<ImageFormat>,
@ -4353,7 +4352,6 @@ impl<'a> TextureUploader<'a> {
device: &mut Device,
texture: &'a Texture,
rect: DeviceIntRect,
layer_index: i32,
format_override: Option<ImageFormat>,
mut staging_buffer: UploadStagingBuffer<'a>,
) -> usize {
@ -4361,7 +4359,6 @@ impl<'a> TextureUploader<'a> {
staging_buffer.buffer.chunks.push(UploadChunk {
rect,
layer_index,
stride: Some(staging_buffer.stride as i32),
offset: staging_buffer.offset,
format_override,
@ -4385,7 +4382,6 @@ impl<'a> TextureUploader<'a> {
device: &mut Device,
texture: &'a Texture,
mut rect: DeviceIntRect,
layer_index: i32,
stride: Option<i32>,
format_override: Option<ImageFormat>,
data: *const T,
@ -4426,7 +4422,6 @@ impl<'a> TextureUploader<'a> {
Self::update_impl(device, UploadChunk {
rect,
layer_index,
stride: Some(src_stride as i32),
offset: data as _,
format_override,
@ -4463,7 +4458,7 @@ impl<'a> TextureUploader<'a> {
}
}
self.upload_staged(device, texture, rect, layer_index, format_override, staging_buffer)
self.upload_staged(device, texture, rect, format_override, staging_buffer)
}
}
}

Просмотреть файл

@ -347,7 +347,7 @@ impl GpuCacheTexture {
DeviceIntSize::new(blocks.len() as i32, 1),
);
uploader.upload(device, texture, rect, 0, None, None, blocks.as_ptr(), blocks.len());
uploader.upload(device, texture, rect, None, None, blocks.as_ptr(), blocks.len());
row.clear_dirty();
}

Просмотреть файл

@ -159,7 +159,6 @@ pub fn upload_to_texture_cache(
&mut renderer.device,
texture,
rect,
0,
stride,
format_override,
data.as_ptr(),
@ -188,7 +187,6 @@ pub fn upload_to_texture_cache(
&mut renderer.device,
texture,
DeviceIntRect::from_size(texture.get_dimensions()),
0,
None,
pbo,
);
@ -199,7 +197,6 @@ pub fn upload_to_texture_cache(
&mut renderer.device,
texture,
batch_buffer.upload_rect,
0,
Some(BATCH_UPLOAD_TEXTURE_SIZE.width * bpp),
None,
bytes.as_ptr(),

Просмотреть файл

@ -771,7 +771,6 @@ impl<T> VertexDataTexture<T> {
device,
self.texture(),
rect,
0,
None,
None,
data.as_ptr(),