blob: 5fb4ac428e0379fa7c5c1412718a8a7690d984eb [file] [log] [blame]
James Price085093d2024-06-06 02:09:47 +00001#include <metal_stdlib>
2using namespace metal;
3struct tint_module_vars_struct {
4 device float4* prevent_dce;
5};
dan sinclairf1f381a2023-11-22 09:44:15 +00006
James Price085093d2024-06-06 02:09:47 +00007void fwidth_d2ab9a(tint_module_vars_struct tint_module_vars) {
8 float4 res = fwidth(float4(1.0f));
9 (*tint_module_vars.prevent_dce) = res;
dan sinclairf1f381a2023-11-22 09:44:15 +000010}
James Price085093d2024-06-06 02:09:47 +000011fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
12 tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
13 fwidth_d2ab9a(tint_module_vars);
dan sinclairf1f381a2023-11-22 09:44:15 +000014}