mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
32 lines
699 B
Plaintext
32 lines
699 B
Plaintext
// language: metal1.0
|
|
#include <metal_stdlib>
|
|
#include <simd/simd.h>
|
|
|
|
using metal::uint;
|
|
|
|
struct type_2 {
|
|
float member;
|
|
};
|
|
struct type_4 {
|
|
metal::uint2 member;
|
|
};
|
|
|
|
void function(
|
|
device type_2& global,
|
|
device type_4 const& global_1,
|
|
metal::depth2d<float, metal::access::sample> global_2
|
|
) {
|
|
metal::uint2 _e6 = global_1.member;
|
|
float _e7 = global_2.read(metal::uint2(_e6), 0);
|
|
global.member = metal::float4(_e7).x;
|
|
return;
|
|
}
|
|
|
|
kernel void cull_fetch_depth(
|
|
device type_2& global [[user(fake0)]]
|
|
, device type_4 const& global_1 [[user(fake0)]]
|
|
, metal::depth2d<float, metal::access::sample> global_2 [[user(fake0)]]
|
|
) {
|
|
function(global, global_1, global_2);
|
|
}
|