mirror of
https://github.com/servo/servo.git
synced 2025-06-18 21:34:30 +00:00
Auto merge of #27173 - kunalmohan:gpu-queue-write, r=kvark
Implement GPUQueue write methods and update wgpu-core <!-- Please describe your changes on the following line: --> Implements `GPUQueue.writeBuffer` and `GPUQueue.writeTexture`. r?@kvark --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #___ (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
f2e6f34a2b
9 changed files with 214 additions and 27 deletions
26
Cargo.lock
generated
26
Cargo.lock
generated
|
@ -164,11 +164,11 @@ checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ash"
|
name = "ash"
|
||||||
version = "0.30.0"
|
version = "0.31.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "69daec0742947f33a85931fa3cb0ce5f07929159dcbd1f0cbb5b2912e2978509"
|
checksum = "c69a8137596e84c22d57f3da1b5de1d4230b1742a710091c85f4d7ce50f00f38"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libloading 0.5.2",
|
"libloading 0.6.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1791,9 +1791,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-dx12"
|
name = "gfx-backend-dx12"
|
||||||
version = "0.5.7"
|
version = "0.5.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6e1a979a793023717bcaa7511c8cbb449bab550c093737c98674a659a2bbaf73"
|
checksum = "05218b5c94539f22ac7d6feb4b2482431b89f6cc897132494701ac48619218d7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"d3d12",
|
"d3d12",
|
||||||
|
@ -1846,9 +1846,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-backend-vulkan"
|
name = "gfx-backend-vulkan"
|
||||||
version = "0.5.8"
|
version = "0.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "04af900c2597587b35e801e9d3f91fd8078cc06067421a22caa640ad2b1bc53e"
|
checksum = "5f2e8bb53e5bea0bfec7035462a75717cd04d733963a225c816339a671ef108b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.5.1",
|
"arrayvec 0.5.1",
|
||||||
"ash",
|
"ash",
|
||||||
|
@ -1866,7 +1866,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-descriptor"
|
name = "gfx-descriptor"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx-extras?rev=0f7dac1b05813948fa0e5999c4fe6473f0c98f9b#0f7dac1b05813948fa0e5999c4fe6473f0c98f9b"
|
source = "git+https://github.com/gfx-rs/gfx-extras?rev=6387d81773e29be2220cb15186ceb875ed88303b#6387d81773e29be2220cb15186ceb875ed88303b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fxhash",
|
"fxhash",
|
||||||
"gfx-hal",
|
"gfx-hal",
|
||||||
|
@ -1875,9 +1875,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-hal"
|
name = "gfx-hal"
|
||||||
version = "0.5.2"
|
version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f13e8fd6aaa8f50146b9519999432e097da43466749d8863c53409322c705339"
|
checksum = "a18534b23d4c262916231511309bc1f307c74cda8dcb68b93a10ca213a22814b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
|
@ -1886,7 +1886,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gfx-memory"
|
name = "gfx-memory"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
source = "git+https://github.com/gfx-rs/gfx-extras?rev=0f7dac1b05813948fa0e5999c4fe6473f0c98f9b#0f7dac1b05813948fa0e5999c4fe6473f0c98f9b"
|
source = "git+https://github.com/gfx-rs/gfx-extras?rev=6387d81773e29be2220cb15186ceb875ed88303b#6387d81773e29be2220cb15186ceb875ed88303b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"fxhash",
|
"fxhash",
|
||||||
"gfx-hal",
|
"gfx-hal",
|
||||||
|
@ -6571,7 +6571,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wgpu-core"
|
name = "wgpu-core"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/gfx-rs/wgpu#177a0b39acde46f86fc46e3e63be16283a2da399"
|
source = "git+https://github.com/gfx-rs/wgpu#349c02104948fea7aee38c3e7dc197427b1f2414"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec 0.5.1",
|
"arrayvec 0.5.1",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
|
@ -6600,7 +6600,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "wgpu-types"
|
name = "wgpu-types"
|
||||||
version = "0.5.0"
|
version = "0.5.0"
|
||||||
source = "git+https://github.com/gfx-rs/wgpu#177a0b39acde46f86fc46e3e63be16283a2da399"
|
source = "git+https://github.com/gfx-rs/wgpu#349c02104948fea7aee38c3e7dc197427b1f2414"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -81,7 +81,7 @@ impl GPUAdapterMethods for GPUAdapter {
|
||||||
let promise = Promise::new_in_current_realm(&self.global(), comp);
|
let promise = Promise::new_in_current_realm(&self.global(), comp);
|
||||||
let sender = response_async(&promise, self);
|
let sender = response_async(&promise, self);
|
||||||
let desc = wgt::DeviceDescriptor {
|
let desc = wgt::DeviceDescriptor {
|
||||||
extensions: wgt::Extensions::empty(),
|
features: wgt::Features::empty(),
|
||||||
limits: wgt::Limits {
|
limits: wgt::Limits {
|
||||||
max_bind_groups: descriptor.limits.maxBindGroups,
|
max_bind_groups: descriptor.limits.maxBindGroups,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
|
@ -874,7 +874,7 @@ pub fn convert_texture_view_dimension(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn convert_texture_size_to_dict(size: &GPUExtent3D) -> GPUExtent3DDict {
|
pub fn convert_texture_size_to_dict(size: &GPUExtent3D) -> GPUExtent3DDict {
|
||||||
match *size {
|
match *size {
|
||||||
GPUExtent3D::GPUExtent3DDict(ref dict) => GPUExtent3DDict {
|
GPUExtent3D::GPUExtent3DDict(ref dict) => GPUExtent3DDict {
|
||||||
width: dict.width,
|
width: dict.width,
|
||||||
|
@ -889,7 +889,7 @@ fn convert_texture_size_to_dict(size: &GPUExtent3D) -> GPUExtent3DDict {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn convert_texture_size_to_wgt(size: &GPUExtent3DDict) -> wgt::Extent3d {
|
pub fn convert_texture_size_to_wgt(size: &GPUExtent3DDict) -> wgt::Extent3d {
|
||||||
wgt::Extent3d {
|
wgt::Extent3d {
|
||||||
width: size.width,
|
width: size.width,
|
||||||
height: size.height,
|
height: size.height,
|
||||||
|
|
|
@ -3,15 +3,24 @@
|
||||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
use crate::dom::bindings::cell::DomRefCell;
|
use crate::dom::bindings::cell::DomRefCell;
|
||||||
|
use crate::dom::bindings::codegen::Bindings::GPUBufferBinding::GPUSize64;
|
||||||
use crate::dom::bindings::codegen::Bindings::GPUQueueBinding::GPUQueueMethods;
|
use crate::dom::bindings::codegen::Bindings::GPUQueueBinding::GPUQueueMethods;
|
||||||
|
use crate::dom::bindings::codegen::Bindings::GPUTextureBinding::{
|
||||||
|
GPUExtent3D, GPUOrigin3D, GPUTextureCopyView, GPUTextureDataLayout,
|
||||||
|
};
|
||||||
|
use crate::dom::bindings::error::{Error, Fallible};
|
||||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||||
use crate::dom::bindings::root::DomRoot;
|
use crate::dom::bindings::root::DomRoot;
|
||||||
use crate::dom::bindings::str::DOMString;
|
use crate::dom::bindings::str::DOMString;
|
||||||
use crate::dom::globalscope::GlobalScope;
|
use crate::dom::globalscope::GlobalScope;
|
||||||
use crate::dom::gpubuffer::GPUBufferState;
|
use crate::dom::gpubuffer::{GPUBuffer, GPUBufferState};
|
||||||
use crate::dom::gpucommandbuffer::GPUCommandBuffer;
|
use crate::dom::gpucommandbuffer::GPUCommandBuffer;
|
||||||
|
use crate::dom::gpudevice::{convert_texture_size_to_dict, convert_texture_size_to_wgt};
|
||||||
use dom_struct::dom_struct;
|
use dom_struct::dom_struct;
|
||||||
use webgpu::{WebGPU, WebGPUQueue, WebGPURequest};
|
use ipc_channel::ipc::IpcSharedMemory;
|
||||||
|
use js::rust::CustomAutoRooterGuard;
|
||||||
|
use js::typedarray::ArrayBuffer;
|
||||||
|
use webgpu::{wgpu::command as wgpu_com, wgt, WebGPU, WebGPUQueue, WebGPURequest};
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
pub struct GPUQueue {
|
pub struct GPUQueue {
|
||||||
|
@ -69,4 +78,105 @@ impl GPUQueueMethods for GPUQueue {
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// https://gpuweb.github.io/gpuweb/#dom-gpuqueue-writebuffer
|
||||||
|
#[allow(unsafe_code)]
|
||||||
|
fn WriteBuffer(
|
||||||
|
&self,
|
||||||
|
buffer: &GPUBuffer,
|
||||||
|
buffer_offset: GPUSize64,
|
||||||
|
data: CustomAutoRooterGuard<ArrayBuffer>,
|
||||||
|
data_offset: GPUSize64,
|
||||||
|
size: Option<GPUSize64>,
|
||||||
|
) -> Fallible<()> {
|
||||||
|
let bytes = data.to_vec();
|
||||||
|
let content_size = if let Some(s) = size {
|
||||||
|
s
|
||||||
|
} else {
|
||||||
|
bytes.len() as GPUSize64 - data_offset
|
||||||
|
};
|
||||||
|
let valid = data_offset + content_size <= bytes.len() as u64 &&
|
||||||
|
buffer.state() == GPUBufferState::Unmapped &&
|
||||||
|
content_size % wgt::COPY_BUFFER_ALIGNMENT == 0 &&
|
||||||
|
buffer_offset % wgt::COPY_BUFFER_ALIGNMENT == 0 &&
|
||||||
|
buffer.is_valid();
|
||||||
|
|
||||||
|
if !valid {
|
||||||
|
return Err(Error::Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
let final_data = IpcSharedMemory::from_bytes(
|
||||||
|
&bytes[data_offset as usize..(data_offset + content_size) as usize],
|
||||||
|
);
|
||||||
|
if let Err(e) = self.channel.0.send(WebGPURequest::WriteBuffer {
|
||||||
|
queue_id: self.queue.0,
|
||||||
|
buffer_id: buffer.id().0,
|
||||||
|
buffer_offset,
|
||||||
|
data: final_data,
|
||||||
|
}) {
|
||||||
|
warn!("Failed to send WriteBuffer({:?}) ({})", buffer.id(), e);
|
||||||
|
return Err(Error::Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
/// https://gpuweb.github.io/gpuweb/#dom-gpuqueue-writetexture
|
||||||
|
fn WriteTexture(
|
||||||
|
&self,
|
||||||
|
destination: &GPUTextureCopyView,
|
||||||
|
data: CustomAutoRooterGuard<ArrayBuffer>,
|
||||||
|
data_layout: &GPUTextureDataLayout,
|
||||||
|
size: GPUExtent3D,
|
||||||
|
) -> Fallible<()> {
|
||||||
|
let bytes = data.to_vec();
|
||||||
|
let valid = data_layout.offset <= data.len() as u64 && destination.texture.is_valid();
|
||||||
|
|
||||||
|
if !valid {
|
||||||
|
return Err(Error::Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
let texture_cv = wgpu_com::TextureCopyView {
|
||||||
|
texture: destination.texture.id().0,
|
||||||
|
mip_level: destination.mipLevel,
|
||||||
|
origin: match destination.origin {
|
||||||
|
GPUOrigin3D::RangeEnforcedUnsignedLongSequence(ref v) => wgt::Origin3d {
|
||||||
|
x: v[0],
|
||||||
|
y: v[1],
|
||||||
|
z: v[2],
|
||||||
|
},
|
||||||
|
GPUOrigin3D::GPUOrigin3DDict(ref d) => wgt::Origin3d {
|
||||||
|
x: d.x,
|
||||||
|
y: d.y,
|
||||||
|
z: d.z,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
let texture_layout = wgt::TextureDataLayout {
|
||||||
|
offset: data_layout.offset as wgt::BufferAddress,
|
||||||
|
bytes_per_row: data_layout.bytesPerRow,
|
||||||
|
rows_per_image: data_layout.rowsPerImage,
|
||||||
|
};
|
||||||
|
|
||||||
|
let write_size = convert_texture_size_to_wgt(&convert_texture_size_to_dict(&size));
|
||||||
|
let final_data = IpcSharedMemory::from_bytes(&bytes);
|
||||||
|
|
||||||
|
if let Err(e) = self.channel.0.send(WebGPURequest::WriteTexture {
|
||||||
|
queue_id: self.queue.0,
|
||||||
|
texture_cv,
|
||||||
|
data_layout: texture_layout,
|
||||||
|
size: write_size,
|
||||||
|
data: final_data,
|
||||||
|
}) {
|
||||||
|
warn!(
|
||||||
|
"Failed to send WriteTexture({:?}) ({})",
|
||||||
|
destination.texture.id().0,
|
||||||
|
e
|
||||||
|
);
|
||||||
|
return Err(Error::Operation);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,10 @@ impl GPUTexture {
|
||||||
pub fn id(&self) -> WebGPUTexture {
|
pub fn id(&self) -> WebGPUTexture {
|
||||||
self.texture
|
self.texture
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_valid(&self) -> bool {
|
||||||
|
self.valid.get()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl GPUTextureMethods for GPUTexture {
|
impl GPUTextureMethods for GPUTexture {
|
||||||
|
|
|
@ -20,5 +20,3 @@ dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef unsigned long long GPUSize64;
|
typedef unsigned long long GPUSize64;
|
||||||
|
|
||||||
typedef sequence<any> GPUMappedBuffer;
|
|
||||||
|
|
|
@ -7,10 +7,23 @@
|
||||||
interface GPUQueue {
|
interface GPUQueue {
|
||||||
void submit(sequence<GPUCommandBuffer> commandBuffers);
|
void submit(sequence<GPUCommandBuffer> commandBuffers);
|
||||||
|
|
||||||
// GPUFence createFence(optional GPUFenceDescriptor descriptor = {});
|
//GPUFence createFence(optional GPUFenceDescriptor descriptor = {});
|
||||||
// void signal(GPUFence fence, unsigned long long signalValue);
|
//void signal(GPUFence fence, GPUFenceValue signalValue);
|
||||||
|
|
||||||
// void copyImageBitmapToTexture(
|
[Throws] void writeBuffer(
|
||||||
|
GPUBuffer buffer,
|
||||||
|
GPUSize64 bufferOffset,
|
||||||
|
/*[AllowShared]*/ ArrayBuffer data,
|
||||||
|
optional GPUSize64 dataOffset = 0,
|
||||||
|
optional GPUSize64 size);
|
||||||
|
|
||||||
|
[Throws] void writeTexture(
|
||||||
|
GPUTextureCopyView destination,
|
||||||
|
/*[AllowShared]*/ ArrayBuffer data,
|
||||||
|
GPUTextureDataLayout dataLayout,
|
||||||
|
GPUExtent3D size);
|
||||||
|
|
||||||
|
//void copyImageBitmapToTexture(
|
||||||
// GPUImageBitmapCopyView source,
|
// GPUImageBitmapCopyView source,
|
||||||
// GPUTextureCopyView destination,
|
// GPUTextureCopyView destination,
|
||||||
// GPUExtent3D copySize);
|
// GPUExtent3D copySize);
|
||||||
|
|
|
@ -92,3 +92,22 @@ dictionary GPUExtent3DDict {
|
||||||
};
|
};
|
||||||
typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
|
typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
|
||||||
typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
|
typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
|
||||||
|
|
||||||
|
dictionary GPUTextureCopyView {
|
||||||
|
required GPUTexture texture;
|
||||||
|
GPUIntegerCoordinate mipLevel = 0;
|
||||||
|
GPUOrigin3D origin = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary GPUTextureDataLayout {
|
||||||
|
GPUSize64 offset = 0;
|
||||||
|
required GPUSize32 bytesPerRow;
|
||||||
|
GPUSize32 rowsPerImage = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
dictionary GPUOrigin3DDict {
|
||||||
|
GPUIntegerCoordinate x = 0;
|
||||||
|
GPUIntegerCoordinate y = 0;
|
||||||
|
GPUIntegerCoordinate z = 0;
|
||||||
|
};
|
||||||
|
typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
|
||||||
|
|
|
@ -208,6 +208,19 @@ pub enum WebGPURequest {
|
||||||
external_id: u64,
|
external_id: u64,
|
||||||
buffer_size: usize,
|
buffer_size: usize,
|
||||||
},
|
},
|
||||||
|
WriteBuffer {
|
||||||
|
queue_id: id::QueueId,
|
||||||
|
buffer_id: id::BufferId,
|
||||||
|
buffer_offset: u64,
|
||||||
|
data: IpcSharedMemory,
|
||||||
|
},
|
||||||
|
WriteTexture {
|
||||||
|
queue_id: id::QueueId,
|
||||||
|
texture_cv: TextureCopyView,
|
||||||
|
data_layout: wgt::TextureDataLayout,
|
||||||
|
size: wgt::Extent3d,
|
||||||
|
data: IpcSharedMemory,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize, Serialize)]
|
#[derive(Debug, Deserialize, Serialize)]
|
||||||
|
@ -745,7 +758,7 @@ impl<'a> WGPU<'a> {
|
||||||
} => {
|
} => {
|
||||||
let adapter_id = match self.global.pick_adapter(
|
let adapter_id = match self.global.pick_adapter(
|
||||||
&options,
|
&options,
|
||||||
wgt::UnsafeExtensions::disallow(),
|
wgt::UnsafeFeatures::disallow(),
|
||||||
wgpu::instance::AdapterInputs::IdSet(&ids, |id| id.backend()),
|
wgpu::instance::AdapterInputs::IdSet(&ids, |id| id.backend()),
|
||||||
) {
|
) {
|
||||||
Some(id) => id,
|
Some(id) => id,
|
||||||
|
@ -1023,6 +1036,36 @@ impl<'a> WGPU<'a> {
|
||||||
gfx_select!(buffer_id => global.buffer_unmap(buffer_id));
|
gfx_select!(buffer_id => global.buffer_unmap(buffer_id));
|
||||||
self.present_buffer_maps.remove(&buffer_id);
|
self.present_buffer_maps.remove(&buffer_id);
|
||||||
},
|
},
|
||||||
|
WebGPURequest::WriteBuffer {
|
||||||
|
queue_id,
|
||||||
|
buffer_id,
|
||||||
|
buffer_offset,
|
||||||
|
data,
|
||||||
|
} => {
|
||||||
|
let global = &self.global;
|
||||||
|
gfx_select!(queue_id => global.queue_write_buffer(
|
||||||
|
queue_id,
|
||||||
|
buffer_id,
|
||||||
|
buffer_offset as wgt::BufferAddress,
|
||||||
|
&data
|
||||||
|
));
|
||||||
|
},
|
||||||
|
WebGPURequest::WriteTexture {
|
||||||
|
queue_id,
|
||||||
|
texture_cv,
|
||||||
|
data_layout,
|
||||||
|
size,
|
||||||
|
data,
|
||||||
|
} => {
|
||||||
|
let global = &self.global;
|
||||||
|
gfx_select!(queue_id => global.queue_write_texture(
|
||||||
|
queue_id,
|
||||||
|
&texture_cv,
|
||||||
|
&data,
|
||||||
|
&data_layout,
|
||||||
|
&size
|
||||||
|
));
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue