aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/gputexture.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2024-08-30 13:23:17 +0200
committerGitHub <noreply@github.com>2024-08-30 11:23:17 +0000
commit817a91f2acafd839a83bd8f627475fc1f29494c2 (patch)
tree32adc82082551f1d0d695f583076ac794aa388c4 /components/script/dom/gputexture.rs
parent83a40c51809cdac3c7d58731b555dc95cdc5c5bf (diff)
downloadservo-817a91f2acafd839a83bd8f627475fc1f29494c2.tar.gz
servo-817a91f2acafd839a83bd8f627475fc1f29494c2.zip
webgpu: Clean up `GPUCommandEncoders` and add some validation (#33223)
* TextureUsages::from_bits_retain Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Fixup CreateBindGroupLayout Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * GPUExtent3D checking and converting Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * Cleanup GPUCommandEncoders and some TODOs Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * validate gpuorigin3d Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * validate GPUColor Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * set good expect Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/gputexture.rs')
-rw-r--r--components/script/dom/gputexture.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/components/script/dom/gputexture.rs b/components/script/dom/gputexture.rs
index 9547f173d48..61ab4231951 100644
--- a/components/script/dom/gputexture.rs
+++ b/components/script/dom/gputexture.rs
@@ -12,7 +12,7 @@ use webgpu::{wgt, WebGPU, WebGPURequest, WebGPUTexture, WebGPUTextureView};
use super::bindings::error::Fallible;
use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::WebGPUBinding::{
- GPUExtent3DDict, GPUTextureAspect, GPUTextureDimension, GPUTextureFormat, GPUTextureMethods,
+ GPUTextureAspect, GPUTextureDimension, GPUTextureFormat, GPUTextureMethods,
GPUTextureViewDescriptor,
};
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
@@ -33,8 +33,9 @@ pub struct GPUTexture {
#[ignore_malloc_size_of = "channels are hard"]
#[no_trace]
channel: WebGPU,
- #[ignore_malloc_size_of = "defined in webgpu"]
- texture_size: GPUExtent3DDict,
+ #[ignore_malloc_size_of = "defined in wgpu"]
+ #[no_trace]
+ texture_size: wgt::Extent3d,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
@@ -49,7 +50,7 @@ impl GPUTexture {
texture: WebGPUTexture,
device: &GPUDevice,
channel: WebGPU,
- texture_size: GPUExtent3DDict,
+ texture_size: wgt::Extent3d,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
@@ -79,7 +80,7 @@ impl GPUTexture {
texture: WebGPUTexture,
device: &GPUDevice,
channel: WebGPU,
- texture_size: GPUExtent3DDict,
+ texture_size: wgt::Extent3d,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
@@ -230,7 +231,7 @@ impl GPUTextureMethods for GPUTexture {
/// <https://gpuweb.github.io/gpuweb/#dom-gputexture-depthorarraylayers>
fn DepthOrArrayLayers(&self) -> u32 {
- self.texture_size.depthOrArrayLayers
+ self.texture_size.depth_or_array_layers
}
/// <https://gpuweb.github.io/gpuweb/#dom-gputexture-miplevelcount>