mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-20 22:41:07 +01:00
1 parent
3d10678a91
commit
06ee8a6862
2 files changed
+5
-12
No files matched your search
@@ -868,9 +868,6 @@ impl Interface {
|
||||
_ => continue,
|
||||
};
|
||||
let ty = match module.types[var.ty].inner {
|
||||
naga::TypeInner::Struct { members: _, span } => ResourceType::Buffer {
|
||||
size: wgt::BufferSize::new(span as u64).unwrap(),
|
||||
},
|
||||
naga::TypeInner::Image {
|
||||
dim,
|
||||
arrayed,
|
||||
@@ -884,10 +881,9 @@ impl Interface {
|
||||
naga::TypeInner::Array { stride, .. } => ResourceType::Buffer {
|
||||
size: wgt::BufferSize::new(stride as u64).unwrap(),
|
||||
},
|
||||
ref other => {
|
||||
log::error!("Unexpected resource type: {:?}", other);
|
||||
continue;
|
||||
}
|
||||
ref other => ResourceType::Buffer {
|
||||
size: wgt::BufferSize::new(other.size(&module.constants) as u64).unwrap(),
|
||||
},
|
||||
};
|
||||
let handle = resources.append(
|
||||
Resource {
|
||||
|
||||
@@ -3,12 +3,9 @@ struct VertexOutput {
|
||||
@builtin(position) position: vec4<f32>,
|
||||
};
|
||||
|
||||
struct Locals {
|
||||
transform: mat4x4<f32>
|
||||
};
|
||||
@group(0)
|
||||
@binding(0)
|
||||
var<uniform> r_locals: Locals;
|
||||
var<uniform> transform: mat4x4<f32>;
|
||||
|
||||
@vertex
|
||||
fn vs_main(
|
||||
@@ -17,7 +14,7 @@ fn vs_main(
|
||||
) -> VertexOutput {
|
||||
var result: VertexOutput;
|
||||
result.tex_coord = tex_coord;
|
||||
result.position = r_locals.transform * position;
|
||||
result.position = transform * position;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user