2022-04-06 13:57:54 +00:00
|
|
|
@group(1) @binding(0) var arg_0 : texture_external;
|
|
|
|
|
|
|
|
fn textureLoad2d(texture : texture_external, coords : vec2<i32>) -> vec4<f32> {
|
|
|
|
return textureLoad(texture, coords);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn doTextureLoad() {
|
|
|
|
var res : vec4<f32> = textureLoad2d(arg_0, vec2<i32>());
|
|
|
|
}
|
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@vertex
|
2022-04-06 13:57:54 +00:00
|
|
|
fn vertex_main() -> @builtin(position) vec4<f32> {
|
|
|
|
doTextureLoad();
|
|
|
|
return vec4<f32>();
|
|
|
|
}
|
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@fragment
|
2022-04-06 13:57:54 +00:00
|
|
|
fn fragment_main() {
|
|
|
|
doTextureLoad();
|
|
|
|
}
|
|
|
|
|
2022-06-07 13:55:34 +00:00
|
|
|
@compute @workgroup_size(1)
|
2022-04-06 13:57:54 +00:00
|
|
|
fn compute_main() {
|
|
|
|
doTextureLoad();
|
|
|
|
}
|