mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
@@ -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