diff --git a/Cargo.lock b/Cargo.lock index d1197971c..53ae2c625 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2621,14 +2621,16 @@ dependencies = [ [[package]] name = "naga_oil" version = "0.4.2" -source = "git+https://github.com/Dinnerbone/naga_oil?rev=c073f6fdf0560a74480140abc50295f9e0d9aa57#c073f6fdf0560a74480140abc50295f9e0d9aa57" +source = "git+https://github.com/robtfm/naga_oil?rev=7976b701fdf4069802f380f0f58acb99abc167ec#7976b701fdf4069802f380f0f58acb99abc167ec" dependencies = [ "bit-set", "codespan-reporting", "data-encoding", "naga", + "once_cell", "regex", "regex-syntax", + "rustc-hash", "thiserror", "tracing", ] diff --git a/render/wgpu/Cargo.toml b/render/wgpu/Cargo.toml index c0abe113f..091fcb33e 100644 --- a/render/wgpu/Cargo.toml +++ b/render/wgpu/Cargo.toml @@ -18,7 +18,7 @@ enum-map = "2.4.2" fnv = "1.0.7" swf = { path = "../../swf" } image = { version = "0.24.5", default-features = false } -naga_oil = { git = "https://github.com/Dinnerbone/naga_oil", rev = "c073f6fdf0560a74480140abc50295f9e0d9aa57" } +naga_oil = { git = "https://github.com/robtfm/naga_oil", rev = "7976b701fdf4069802f380f0f58acb99abc167ec", features = ["override_any"] } ouroboros = "0.15.5" typed-arena = "2.0.2" once_cell = "1.17.0" diff --git a/render/wgpu/shaders/bitmap.wgsl b/render/wgpu/shaders/bitmap.wgsl index 517fc682f..48f0686c1 100644 --- a/render/wgpu/shaders/bitmap.wgsl +++ b/render/wgpu/shaders/bitmap.wgsl @@ -25,7 +25,7 @@ fn main_vertex(in: common::VertexInput) -> VertexOutput { #if use_push_constants == true var transforms = pc.transforms; #endif - let matrix_ = textureTransforms.matrix_; + let matrix_ = textureTransforms.texture_matrix; let uv = (mat3x3(matrix_[0].xyz, matrix_[1].xyz, matrix_[2].xyz) * vec3(in.position, 1.0)).xy; let pos = common::globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); return VertexOutput(pos, uv); diff --git a/render/wgpu/shaders/common.wgsl b/render/wgpu/shaders/common.wgsl index 67fa3579c..db8206888 100644 --- a/render/wgpu/shaders/common.wgsl +++ b/render/wgpu/shaders/common.wgsl @@ -28,7 +28,7 @@ struct ColorTransforms { struct TextureTransforms { /// The transform matrix of the gradient or texture. /// Transforms from object space to UV space. - matrix_: mat4x4, + texture_matrix: mat4x4, }; struct PushConstants { diff --git a/render/wgpu/shaders/copy.wgsl b/render/wgpu/shaders/copy.wgsl index 25bc66cce..a14b386b4 100644 --- a/render/wgpu/shaders/copy.wgsl +++ b/render/wgpu/shaders/copy.wgsl @@ -21,7 +21,7 @@ struct VertexOutput { @vertex fn main_vertex(in: common::VertexInput) -> VertexOutput { - let matrix_ = textureTransforms.matrix_; + let matrix_ = textureTransforms.texture_matrix; let uv = (mat3x3(matrix_[0].xyz, matrix_[1].xyz, matrix_[2].xyz) * vec3(in.position, 1.0)).xy; let pos = common::globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); return VertexOutput(pos, uv); diff --git a/render/wgpu/shaders/copy_srgb.wgsl b/render/wgpu/shaders/copy_srgb.wgsl index 3049bba8c..e41e1bec9 100644 --- a/render/wgpu/shaders/copy_srgb.wgsl +++ b/render/wgpu/shaders/copy_srgb.wgsl @@ -21,7 +21,7 @@ struct VertexOutput { @vertex fn main_vertex(in: common::VertexInput) -> VertexOutput { - let matrix_ = textureTransforms.matrix_; + let matrix_ = textureTransforms.texture_matrix; let uv = (mat3x3(matrix_[0].xyz, matrix_[1].xyz, matrix_[2].xyz) * vec3(in.position, 1.0)).xy; let pos = common::globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); return VertexOutput(pos, uv); diff --git a/render/wgpu/shaders/gradient/common.wgsl b/render/wgpu/shaders/gradient/common.wgsl index 49ede3932..2bd7f35be 100644 --- a/render/wgpu/shaders/gradient/common.wgsl +++ b/render/wgpu/shaders/gradient/common.wgsl @@ -64,7 +64,7 @@ fn main_vertex(in: common::VertexInput) -> VertexOutput { #if use_push_constants == true var transforms = pc.transforms; #endif - let matrix_ = textureTransforms.matrix_; + let matrix_ = textureTransforms.texture_matrix; let uv = (mat3x3(matrix_[0].xyz, matrix_[1].xyz, matrix_[2].xyz) * vec3(in.position, 1.0)).xy; let pos = common::globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); return VertexOutput(pos, uv); diff --git a/render/wgpu/src/shaders.rs b/render/wgpu/src/shaders.rs index 89eb7cbcc..05053c6cc 100644 --- a/render/wgpu/src/shaders.rs +++ b/render/wgpu/src/shaders.rs @@ -122,7 +122,7 @@ fn make_shader( shader_defs: shader_defs.clone(), ..Default::default() }) - .unwrap_or_else(|_| panic!("{name} failed to compile")), + .unwrap_or_else(|e| panic!("{name} failed to compile: {e}\n{e:?}")), )), }) }