test: Generate more permutations for pointers
Instead of just generating pointers to functions, generate pointers to all permuted storage types and accesses. Change-Id: I930b20150d823877eaf72dd7cac850078fe22f35 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54656 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
adbbd0ba66
commit
433b4ec60d
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0: array<i32>;
|
||||
};
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<i32>, read>) -> u32
|
||||
fn arrayLength_1588cd() {
|
||||
var res: u32 = arrayLength(&sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_1588cd();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_1588cd() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_1588cd();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_1588cd();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_1588cd();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_1588cd() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_1588cd();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,82 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_1588cd "arrayLength_1588cd"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_int ArrayStride 4
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%_runtimearr_int = OpTypeRuntimeArray %int
|
||||
%SB_RO = OpTypeStruct %_runtimearr_int
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%22 = OpConstantNull %uint
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_1588cd = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %22
|
||||
%18 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %arrayLength_1588cd
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %arrayLength_1588cd
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %arrayLength_1588cd
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_1588cd() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_1588cd();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_1588cd();
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0: array<i32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<i32>, read_write>) -> u32
|
||||
fn arrayLength_61b1c7() {
|
||||
var res: u32 = arrayLength(&sb_rw.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_61b1c7();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
RWByteAddressBuffer sb_rw : register(u0, space0);
|
||||
|
||||
void arrayLength_61b1c7() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_rw.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_61b1c7();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_61b1c7();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_61b1c7();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_61b1c7() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_61b1c7();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,81 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RW "SB_RW"
|
||||
OpMemberName %SB_RW 0 "arg_0"
|
||||
OpName %sb_rw "sb_rw"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_61b1c7 "arrayLength_61b1c7"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RW Block
|
||||
OpMemberDecorate %SB_RW 0 Offset 0
|
||||
OpDecorate %_runtimearr_int ArrayStride 4
|
||||
OpDecorate %sb_rw DescriptorSet 0
|
||||
OpDecorate %sb_rw Binding 0
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%_runtimearr_int = OpTypeRuntimeArray %int
|
||||
%SB_RW = OpTypeStruct %_runtimearr_int
|
||||
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%22 = OpConstantNull %uint
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_61b1c7 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %22
|
||||
%18 = OpArrayLength %uint %sb_rw 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %arrayLength_61b1c7
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %arrayLength_61b1c7
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %arrayLength_61b1c7
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_61b1c7() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_61b1c7();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_61b1c7();
|
||||
}
|
|
@ -23,14 +23,14 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0: array<u32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(array<u32>) -> u32
|
||||
fn arrayLength_647a40() {
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
ByteAddressBuffer sb : register(t0, space0);
|
||||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_647a40() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb.GetDimensions(tint_symbol_2);
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
SKIP: FAILED
|
||||
|
||||
intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_647a40() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() {
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_647a40();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
; SPIR-V
|
||||
|
@ -15,9 +15,9 @@ intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB "SB"
|
||||
OpMemberName %SB 0 "arg_0"
|
||||
OpName %sb "sb"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_647a40 "arrayLength_647a40"
|
||||
OpName %res "res"
|
||||
|
@ -27,12 +27,12 @@ intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB Block
|
||||
OpMemberDecorate %SB 0 Offset 0
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %sb NonWritable
|
||||
OpDecorate %sb DescriptorSet 0
|
||||
OpDecorate %sb Binding 0
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
|
@ -40,9 +40,9 @@ intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%_runtimearr_uint = OpTypeRuntimeArray %uint
|
||||
%SB = OpTypeStruct %_runtimearr_uint
|
||||
%_ptr_StorageBuffer_SB = OpTypePointer StorageBuffer %SB
|
||||
%sb = OpVariable %_ptr_StorageBuffer_SB StorageBuffer
|
||||
%SB_RO = OpTypeStruct %_runtimearr_uint
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
|
@ -56,7 +56,7 @@ intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
%arrayLength_647a40 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%18 = OpArrayLength %uint %sb 0
|
||||
%18 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
intrinsics/gen/arrayLength/647a40.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_647a40() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0: array<i32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(array<i32>) -> u32
|
||||
fn arrayLength_721c9d() {
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
ByteAddressBuffer sb : register(t0, space0);
|
||||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_721c9d() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb.GetDimensions(tint_symbol_2);
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
SKIP: FAILED
|
||||
|
||||
intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_721c9d() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() {
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_721c9d();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
; SPIR-V
|
||||
|
@ -15,9 +15,9 @@ intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB "SB"
|
||||
OpMemberName %SB 0 "arg_0"
|
||||
OpName %sb "sb"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_721c9d "arrayLength_721c9d"
|
||||
OpName %res "res"
|
||||
|
@ -27,12 +27,12 @@ intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB Block
|
||||
OpMemberDecorate %SB 0 Offset 0
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_int ArrayStride 4
|
||||
OpDecorate %sb NonWritable
|
||||
OpDecorate %sb DescriptorSet 0
|
||||
OpDecorate %sb Binding 0
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
|
@ -40,9 +40,9 @@ intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%_runtimearr_int = OpTypeRuntimeArray %int
|
||||
%SB = OpTypeStruct %_runtimearr_int
|
||||
%_ptr_StorageBuffer_SB = OpTypePointer StorageBuffer %SB
|
||||
%sb = OpVariable %_ptr_StorageBuffer_SB StorageBuffer
|
||||
%SB_RO = OpTypeStruct %_runtimearr_int
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
|
@ -57,7 +57,7 @@ intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
%arrayLength_721c9d = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %22
|
||||
%18 = OpArrayLength %uint %sb 0
|
||||
%18 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
intrinsics/gen/arrayLength/721c9d.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<i32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_721c9d() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0: array<f32>;
|
||||
};
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<f32>, read>) -> u32
|
||||
fn arrayLength_a0f5ca() {
|
||||
var res: u32 = arrayLength(&sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_a0f5ca();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_a0f5ca() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_a0f5ca();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_a0f5ca();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_a0f5ca();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_a0f5ca() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_a0f5ca();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,81 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_a0f5ca "arrayLength_a0f5ca"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_float ArrayStride 4
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%_runtimearr_float = OpTypeRuntimeArray %float
|
||||
%SB_RO = OpTypeStruct %_runtimearr_float
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%21 = OpConstantNull %uint
|
||||
%22 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_a0f5ca = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%17 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %22
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%25 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %13
|
||||
%27 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %arrayLength_a0f5ca
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %13
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %arrayLength_a0f5ca
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %13
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %arrayLength_a0f5ca
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_a0f5ca() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_a0f5ca();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_a0f5ca();
|
||||
}
|
|
@ -23,14 +23,14 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0: array<f32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(array<f32>) -> u32
|
||||
fn arrayLength_b083be() {
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
ByteAddressBuffer sb : register(t0, space0);
|
||||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_b083be() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb.GetDimensions(tint_symbol_2);
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,31 @@
|
|||
SKIP: FAILED
|
||||
|
||||
intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage> sb : [[access(read)]] SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_b083be() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() {
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_b083be();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
; SPIR-V
|
||||
|
@ -15,9 +15,9 @@ intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB "SB"
|
||||
OpMemberName %SB 0 "arg_0"
|
||||
OpName %sb "sb"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_b083be "arrayLength_b083be"
|
||||
OpName %res "res"
|
||||
|
@ -27,21 +27,21 @@ intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB Block
|
||||
OpMemberDecorate %SB 0 Offset 0
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_float ArrayStride 4
|
||||
OpDecorate %sb NonWritable
|
||||
OpDecorate %sb DescriptorSet 0
|
||||
OpDecorate %sb Binding 0
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%_runtimearr_float = OpTypeRuntimeArray %float
|
||||
%SB = OpTypeStruct %_runtimearr_float
|
||||
%_ptr_StorageBuffer_SB = OpTypePointer StorageBuffer %SB
|
||||
%sb = OpVariable %_ptr_StorageBuffer_SB StorageBuffer
|
||||
%SB_RO = OpTypeStruct %_runtimearr_float
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
|
@ -56,7 +56,7 @@ intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsi
|
|||
%arrayLength_b083be = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%17 = OpArrayLength %uint %sb 0
|
||||
%17 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
intrinsics/gen/arrayLength/b083be.wgsl:33:18 warning: use of deprecated intrinsic
|
||||
var res: u32 = arrayLength(sb.arg_0);
|
||||
var res: u32 = arrayLength(sb_ro.arg_0);
|
||||
^^^^^^^^^^^
|
||||
|
||||
[[block]]
|
||||
struct SB {
|
||||
struct SB_RO {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read> sb : SB;
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_b083be() {
|
||||
var res : u32 = arrayLength(sb.arg_0);
|
||||
var res : u32 = arrayLength(sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0: array<f32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<f32>, read_write>) -> u32
|
||||
fn arrayLength_cdd123() {
|
||||
var res: u32 = arrayLength(&sb_rw.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_cdd123();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
RWByteAddressBuffer sb_rw : register(u0, space0);
|
||||
|
||||
void arrayLength_cdd123() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_rw.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_cdd123();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_cdd123();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_cdd123();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_cdd123() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_cdd123();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,80 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RW "SB_RW"
|
||||
OpMemberName %SB_RW 0 "arg_0"
|
||||
OpName %sb_rw "sb_rw"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_cdd123 "arrayLength_cdd123"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RW Block
|
||||
OpMemberDecorate %SB_RW 0 Offset 0
|
||||
OpDecorate %_runtimearr_float ArrayStride 4
|
||||
OpDecorate %sb_rw DescriptorSet 0
|
||||
OpDecorate %sb_rw Binding 0
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%_runtimearr_float = OpTypeRuntimeArray %float
|
||||
%SB_RW = OpTypeStruct %_runtimearr_float
|
||||
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%21 = OpConstantNull %uint
|
||||
%22 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_cdd123 = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%17 = OpArrayLength %uint %sb_rw 0
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %22
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%25 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %13
|
||||
%27 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %arrayLength_cdd123
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %13
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %arrayLength_cdd123
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %13
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %arrayLength_cdd123
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<f32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_cdd123() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_cdd123();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cdd123();
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0: array<u32>;
|
||||
};
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<u32>, read>) -> u32
|
||||
fn arrayLength_cfca0a() {
|
||||
var res: u32 = arrayLength(&sb_ro.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_cfca0a();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
ByteAddressBuffer sb_ro : register(t1, space0);
|
||||
|
||||
void arrayLength_cfca0a() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_ro.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_cfca0a();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_cfca0a();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_cfca0a();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_cfca0a() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_cfca0a();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,81 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RO "SB_RO"
|
||||
OpMemberName %SB_RO 0 "arg_0"
|
||||
OpName %sb_ro "sb_ro"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_cfca0a "arrayLength_cfca0a"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RO Block
|
||||
OpMemberDecorate %SB_RO 0 Offset 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %sb_ro NonWritable
|
||||
OpDecorate %sb_ro DescriptorSet 0
|
||||
OpDecorate %sb_ro Binding 1
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%_runtimearr_uint = OpTypeRuntimeArray %uint
|
||||
%SB_RO = OpTypeStruct %_runtimearr_uint
|
||||
%_ptr_StorageBuffer_SB_RO = OpTypePointer StorageBuffer %SB_RO
|
||||
%sb_ro = OpVariable %_ptr_StorageBuffer_SB_RO StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%21 = OpConstantNull %uint
|
||||
%22 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_cfca0a = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%18 = OpArrayLength %uint %sb_ro 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %22
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%25 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%27 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %arrayLength_cfca0a
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %arrayLength_cfca0a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %arrayLength_cfca0a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RO {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(1)]] var<storage, read> sb_ro : SB_RO;
|
||||
|
||||
fn arrayLength_cfca0a() {
|
||||
var res : u32 = arrayLength(&(sb_ro.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_cfca0a();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_cfca0a();
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0: array<u32>;
|
||||
};
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
// fn arrayLength(ptr<storage, array<u32>, read_write>) -> u32
|
||||
fn arrayLength_eb510f() {
|
||||
var res: u32 = arrayLength(&sb_rw.arg_0);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_eb510f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
RWByteAddressBuffer sb_rw : register(u0, space0);
|
||||
|
||||
void arrayLength_eb510f() {
|
||||
uint tint_symbol_2 = 0u;
|
||||
sb_rw.GetDimensions(tint_symbol_2);
|
||||
const uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
|
||||
uint res = tint_symbol_3;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
arrayLength_eb510f();
|
||||
const tint_symbol tint_symbol_4 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
arrayLength_eb510f();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
arrayLength_eb510f();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_eb510f() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
arrayLength_eb510f();
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: arrayLength
|
|
@ -0,0 +1,80 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %SB_RW "SB_RW"
|
||||
OpMemberName %SB_RW 0 "arg_0"
|
||||
OpName %sb_rw "sb_rw"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %arrayLength_eb510f "arrayLength_eb510f"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %SB_RW Block
|
||||
OpMemberDecorate %SB_RW 0 Offset 0
|
||||
OpDecorate %_runtimearr_uint ArrayStride 4
|
||||
OpDecorate %sb_rw DescriptorSet 0
|
||||
OpDecorate %sb_rw Binding 0
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%_runtimearr_uint = OpTypeRuntimeArray %uint
|
||||
%SB_RW = OpTypeStruct %_runtimearr_uint
|
||||
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%21 = OpConstantNull %uint
|
||||
%22 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%arrayLength_eb510f = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_uint Function %21
|
||||
%18 = OpArrayLength %uint %sb_rw 0
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %22
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%25 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%27 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %arrayLength_eb510f
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %arrayLength_eb510f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %arrayLength_eb510f
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,26 @@
|
|||
[[block]]
|
||||
struct SB_RW {
|
||||
arg_0 : array<u32>;
|
||||
};
|
||||
|
||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
||||
|
||||
fn arrayLength_eb510f() {
|
||||
var res : u32 = arrayLength(&(sb_rw.arg_0));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
arrayLength_eb510f();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
arrayLength_eb510f();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: i32;
|
||||
|
||||
// fn frexp(f32, ptr<workgroup, i32, read_write>) -> f32
|
||||
fn frexp_0da285() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_0da285();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared int arg_1;
|
||||
|
||||
void frexp_0da285() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = int(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_0da285();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_0da285(tint_symbol_2 : ptr<workgroup, i32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : i32;
|
||||
frexp_0da285(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : i32;
|
||||
frexp_0da285(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : i32;
|
||||
frexp_0da285(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,35 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 19
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%10 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_0da285 "frexp_0da285"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||
%void = OpTypeVoid
|
||||
%4 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpConstantNull %float
|
||||
%frexp_0da285 = OpFunction %void None %4
|
||||
%7 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %15
|
||||
%8 = OpExtInst %float %10 Frexp %float_1 %arg_1
|
||||
OpStore %res %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %4
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %frexp_0da285
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : i32;
|
||||
|
||||
fn frexp_0da285() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_0da285();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec3<i32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<workgroup, vec<3, i32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_40fc9b() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_40fc9b();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared int3 arg_1;
|
||||
|
||||
void frexp_40fc9b() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = int3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_40fc9b();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_40fc9b(tint_symbol_2 : ptr<workgroup, vec3<i32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec3<i32>;
|
||||
frexp_40fc9b(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,36 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 20
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%12 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_40fc9b "frexp_40fc9b"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%_ptr_Workgroup_v3int = OpTypePointer Workgroup %v3int
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v3int Workgroup
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%13 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%frexp_40fc9b = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %13
|
||||
%9 = OpExtInst %v3float %12 Frexp %13 %arg_1
|
||||
OpStore %res %9
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %5
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %frexp_40fc9b
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : vec3<i32>;
|
||||
|
||||
fn frexp_40fc9b() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_40fc9b();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: vec3<u32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<private, vec<3, u32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_53d417() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_53d417();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_53d417();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_53d417();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
static uint3 arg_1;
|
||||
|
||||
void frexp_53d417() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_53d417();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_53d417();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_53d417();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_53d417(tint_symbol_2 : ptr<private, vec3<u32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec3<u32>;
|
||||
frexp_53d417(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,75 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_53d417 "frexp_53d417"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
|
||||
%9 = OpConstantNull %v3uint
|
||||
%arg_1 = OpVariable %_ptr_Private_v3uint Private %9
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%21 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_53d417 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %21
|
||||
%18 = OpExtInst %v3float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_53d417
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_53d417
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_53d417
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
var<private> arg_1 : vec3<u32>;
|
||||
|
||||
fn frexp_53d417() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_53d417();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_53d417();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_53d417();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec3<u32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<workgroup, vec<3, u32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_6be229() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_6be229();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared uint3 arg_1;
|
||||
|
||||
void frexp_6be229() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_6be229();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6be229(tint_symbol_2 : ptr<workgroup, vec3<u32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec3<u32>;
|
||||
frexp_6be229(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,36 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 20
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%12 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_6be229 "frexp_6be229"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%_ptr_Workgroup_v3uint = OpTypePointer Workgroup %v3uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v3uint Workgroup
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%13 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%frexp_6be229 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %13
|
||||
%9 = OpExtInst %v3float %12 Frexp %13 %arg_1
|
||||
OpStore %res %9
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %5
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %frexp_6be229
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : vec3<u32>;
|
||||
|
||||
fn frexp_6be229() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_6be229();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: vec3<i32>;
|
||||
|
||||
// fn frexp(vec<3, f32>, ptr<private, vec<3, i32>, read_write>) -> vec<3, f32>
|
||||
fn frexp_6efa09() {
|
||||
var res: vec3<f32> = frexp(vec3<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_6efa09();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_6efa09();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_6efa09();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
static int3 arg_1;
|
||||
|
||||
void frexp_6efa09() {
|
||||
float3 tint_tmp;
|
||||
float3 tint_tmp_1 = frexp(float3(0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = int3(tint_tmp);
|
||||
float3 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_6efa09();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_6efa09();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_6efa09();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_6efa09(tint_symbol_2 : ptr<private, vec3<i32>>) {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec3<i32>;
|
||||
frexp_6efa09(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec3<i32>;
|
||||
frexp_6efa09(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec3<i32>;
|
||||
frexp_6efa09(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,75 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 40
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%20 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_6efa09 "frexp_6efa09"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%_ptr_Private_v3int = OpTypePointer Private %v3int
|
||||
%9 = OpConstantNull %v3int
|
||||
%arg_1 = OpVariable %_ptr_Private_v3int Private %9
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%v3float = OpTypeVector %float 3
|
||||
%21 = OpConstantNull %v3float
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%25 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_6efa09 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v3float Function %21
|
||||
%18 = OpExtInst %v3float %20 Frexp %21 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %25
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%30 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%32 = OpFunctionCall %void %frexp_6efa09
|
||||
%33 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_6efa09
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%38 = OpLabel
|
||||
%39 = OpFunctionCall %void %frexp_6efa09
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
var<private> arg_1 : vec3<i32>;
|
||||
|
||||
fn frexp_6efa09() {
|
||||
var res : vec3<f32> = frexp(vec3<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_6efa09();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_6efa09();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_6efa09();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec4<u32>;
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<workgroup, vec<4, u32>, read_write>) -> vec<4, f32>
|
||||
fn frexp_841515() {
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_841515();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared uint4 arg_1;
|
||||
|
||||
void frexp_841515() {
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = uint4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_841515();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_841515(tint_symbol_2 : ptr<workgroup, vec4<u32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec4<u32>;
|
||||
frexp_841515(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,36 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 20
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%12 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_841515 "frexp_841515"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%v4uint = OpTypeVector %uint 4
|
||||
%_ptr_Workgroup_v4uint = OpTypePointer Workgroup %v4uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v4uint Workgroup
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%13 = OpConstantNull %v4float
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%frexp_841515 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %13
|
||||
%9 = OpExtInst %v4float %12 Frexp %13 %arg_1
|
||||
OpStore %res %9
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %5
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %frexp_841515
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : vec4<u32>;
|
||||
|
||||
fn frexp_841515() {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_841515();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: u32;
|
||||
|
||||
// fn frexp(f32, ptr<workgroup, u32, read_write>) -> f32
|
||||
fn frexp_8b3191() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_8b3191();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared uint arg_1;
|
||||
|
||||
void frexp_8b3191() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_8b3191();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_8b3191(tint_symbol_2 : ptr<workgroup, u32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : u32;
|
||||
frexp_8b3191(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : u32;
|
||||
frexp_8b3191(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : u32;
|
||||
frexp_8b3191(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,35 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 19
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%10 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_8b3191 "frexp_8b3191"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||
%void = OpTypeVoid
|
||||
%4 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%15 = OpConstantNull %float
|
||||
%frexp_8b3191 = OpFunction %void None %4
|
||||
%7 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %15
|
||||
%8 = OpExtInst %float %10 Frexp %float_1 %arg_1
|
||||
OpStore %res %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %4
|
||||
%17 = OpLabel
|
||||
%18 = OpFunctionCall %void %frexp_8b3191
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : u32;
|
||||
|
||||
fn frexp_8b3191() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_8b3191();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: i32;
|
||||
|
||||
// fn frexp(f32, ptr<private, i32, read_write>) -> f32
|
||||
fn frexp_a2a617() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_a2a617();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_a2a617();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_a2a617();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
static int arg_1;
|
||||
|
||||
void frexp_a2a617() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = int(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_a2a617();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_a2a617();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_a2a617();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_a2a617(tint_symbol_2 : ptr<private, i32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : i32;
|
||||
frexp_a2a617(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : i32;
|
||||
frexp_a2a617(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : i32;
|
||||
frexp_a2a617(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%18 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_a2a617 "frexp_a2a617"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
%8 = OpConstantNull %int
|
||||
%arg_1 = OpVariable %_ptr_Private_int Private %8
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%frexp_a2a617 = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%17 = OpExtInst %float %18 Frexp %float_1 %arg_1
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %13
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %frexp_a2a617
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %13
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %frexp_a2a617
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %13
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_a2a617
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
var<private> arg_1 : i32;
|
||||
|
||||
fn frexp_a2a617() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_a2a617();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_a2a617();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_a2a617();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<workgroup> arg_1: vec2<i32>;
|
||||
|
||||
// fn frexp(vec<2, f32>, ptr<workgroup, vec<2, i32>, read_write>) -> vec<2, f32>
|
||||
fn frexp_a3f940() {
|
||||
var res: vec2<f32> = frexp(vec2<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_a3f940();
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
groupshared int2 arg_1;
|
||||
|
||||
void frexp_a3f940() {
|
||||
float2 tint_tmp;
|
||||
float2 tint_tmp_1 = frexp(float2(0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = int2(tint_tmp);
|
||||
float2 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_a3f940();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_a3f940(tint_symbol_2 : ptr<workgroup, vec2<i32>>) {
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_3 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_4 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<workgroup> tint_symbol_5 : vec2<i32>;
|
||||
frexp_a3f940(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,36 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 20
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%12 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %frexp_a3f940 "frexp_a3f940"
|
||||
OpName %res "res"
|
||||
OpName %compute_main "compute_main"
|
||||
%int = OpTypeInt 32 1
|
||||
%v2int = OpTypeVector %int 2
|
||||
%_ptr_Workgroup_v2int = OpTypePointer Workgroup %v2int
|
||||
%arg_1 = OpVariable %_ptr_Workgroup_v2int Workgroup
|
||||
%void = OpTypeVoid
|
||||
%5 = OpTypeFunction %void
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%13 = OpConstantNull %v2float
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%frexp_a3f940 = OpFunction %void None %5
|
||||
%8 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v2float Function %13
|
||||
%9 = OpExtInst %v2float %12 Frexp %13 %arg_1
|
||||
OpStore %res %9
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %5
|
||||
%18 = OpLabel
|
||||
%19 = OpFunctionCall %void %frexp_a3f940
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,10 @@
|
|||
var<workgroup> arg_1 : vec2<i32>;
|
||||
|
||||
fn frexp_a3f940() {
|
||||
var res : vec2<f32> = frexp(vec2<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_a3f940();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: vec4<i32>;
|
||||
|
||||
// fn frexp(vec<4, f32>, ptr<private, vec<4, i32>, read_write>) -> vec<4, f32>
|
||||
fn frexp_b45525() {
|
||||
var res: vec4<f32> = frexp(vec4<f32>(), &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b45525();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b45525();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_b45525();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
static int4 arg_1;
|
||||
|
||||
void frexp_b45525() {
|
||||
float4 tint_tmp;
|
||||
float4 tint_tmp_1 = frexp(float4(0.0f, 0.0f, 0.0f, 0.0f), tint_tmp);
|
||||
arg_1 = int4(tint_tmp);
|
||||
float4 res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_b45525();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_b45525();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_b45525();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b45525(tint_symbol_2 : ptr<private, vec4<i32>>) {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : vec4<i32>;
|
||||
frexp_b45525(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : vec4<i32>;
|
||||
frexp_b45525(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : vec4<i32>;
|
||||
frexp_b45525(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,73 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%19 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_b45525 "frexp_b45525"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%int = OpTypeInt 32 1
|
||||
%v4int = OpTypeVector %int 4
|
||||
%_ptr_Private_v4int = OpTypePointer Private %v4int
|
||||
%9 = OpConstantNull %v4int
|
||||
%arg_1 = OpVariable %_ptr_Private_v4int Private %9
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%13 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %13
|
||||
%void = OpTypeVoid
|
||||
%14 = OpTypeFunction %void
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%float_1 = OpConstant %float 1
|
||||
%frexp_b45525 = OpFunction %void None %14
|
||||
%17 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_v4float Function %13
|
||||
%18 = OpExtInst %v4float %19 Frexp %13 %arg_1
|
||||
OpStore %res %18
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %14
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%30 = OpFunctionCall %void %frexp_b45525
|
||||
%31 = OpFunctionCall %void %tint_symbol_2 %13
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %14
|
||||
%33 = OpLabel
|
||||
%34 = OpFunctionCall %void %frexp_b45525
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %14
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %void %frexp_b45525
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
var<private> arg_1 : vec4<i32>;
|
||||
|
||||
fn frexp_b45525() {
|
||||
var res : vec4<f32> = frexp(vec4<f32>(), &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b45525();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b45525();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_b45525();
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2021 The Tint Authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// File generated by tools/intrinsic-gen
|
||||
// using the template:
|
||||
// test/intrinsics/intrinsics.wgsl.tmpl
|
||||
// and the intrinsic defintion file:
|
||||
// src/intrinsics.def
|
||||
//
|
||||
// Do not modify this file directly
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var<private> arg_1: u32;
|
||||
|
||||
// fn frexp(f32, ptr<private, u32, read_write>) -> f32
|
||||
fn frexp_b7bcbb() {
|
||||
var res: f32 = frexp(1.0, &arg_1);
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b7bcbb();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
static uint arg_1;
|
||||
|
||||
void frexp_b7bcbb() {
|
||||
float tint_tmp;
|
||||
float tint_tmp_1 = frexp(1.0f, tint_tmp);
|
||||
arg_1 = uint(tint_tmp);
|
||||
float res = tint_tmp_1;
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
float4 value : SV_Position;
|
||||
};
|
||||
|
||||
tint_symbol vertex_main() {
|
||||
frexp_b7bcbb();
|
||||
const tint_symbol tint_symbol_1 = {float4(0.0f, 0.0f, 0.0f, 0.0f)};
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
void fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
return;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
void compute_main() {
|
||||
frexp_b7bcbb();
|
||||
return;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
SKIP: FAILED
|
||||
|
||||
|
||||
fn frexp_b7bcbb(tint_symbol_2 : ptr<private, u32>) {
|
||||
var res : f32 = frexp(1.0, &(*(tint_symbol_2)));
|
||||
}
|
||||
|
||||
struct tint_symbol {
|
||||
[[builtin(position)]]
|
||||
value : vec4<f32>;
|
||||
};
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> tint_symbol {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_3 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_3));
|
||||
let tint_symbol_1 : tint_symbol = tint_symbol(vec4<f32>());
|
||||
return tint_symbol_1;
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_4 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_4));
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
[[internal(disable_validation__function_var_storage_class)]] var<private> tint_symbol_5 : u32;
|
||||
frexp_b7bcbb(&(tint_symbol_5));
|
||||
}
|
||||
|
||||
Failed to generate: error: Unknown import method: frexp
|
|
@ -0,0 +1,72 @@
|
|||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 37
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%18 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vertex_main "vertex_main" %tint_pointsize %tint_symbol_1
|
||||
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||
OpExecutionMode %fragment_main OriginUpperLeft
|
||||
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||
OpName %tint_pointsize "tint_pointsize"
|
||||
OpName %arg_1 "arg_1"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %frexp_b7bcbb "frexp_b7bcbb"
|
||||
OpName %res "res"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %vertex_main "vertex_main"
|
||||
OpName %fragment_main "fragment_main"
|
||||
OpName %compute_main "compute_main"
|
||||
OpDecorate %tint_pointsize BuiltIn PointSize
|
||||
OpDecorate %tint_symbol_1 BuiltIn Position
|
||||
%float = OpTypeFloat 32
|
||||
%_ptr_Output_float = OpTypePointer Output %float
|
||||
%4 = OpConstantNull %float
|
||||
%tint_pointsize = OpVariable %_ptr_Output_float Output %4
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Private_uint = OpTypePointer Private %uint
|
||||
%8 = OpConstantNull %uint
|
||||
%arg_1 = OpVariable %_ptr_Private_uint Private %8
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%12 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
|
||||
%void = OpTypeVoid
|
||||
%13 = OpTypeFunction %void
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%23 = OpTypeFunction %void %v4float
|
||||
%frexp_b7bcbb = OpFunction %void None %13
|
||||
%16 = OpLabel
|
||||
%res = OpVariable %_ptr_Function_float Function %4
|
||||
%17 = OpExtInst %float %18 Frexp %float_1 %arg_1
|
||||
OpStore %res %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %23
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%26 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%vertex_main = OpFunction %void None %13
|
||||
%28 = OpLabel
|
||||
OpStore %tint_pointsize %float_1
|
||||
%29 = OpFunctionCall %void %frexp_b7bcbb
|
||||
%30 = OpFunctionCall %void %tint_symbol_2 %12
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%fragment_main = OpFunction %void None %13
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %void %frexp_b7bcbb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%compute_main = OpFunction %void None %13
|
||||
%35 = OpLabel
|
||||
%36 = OpFunctionCall %void %frexp_b7bcbb
|
||||
OpReturn
|
||||
OpFunctionEnd
|
|
@ -0,0 +1,21 @@
|
|||
var<private> arg_1 : u32;
|
||||
|
||||
fn frexp_b7bcbb() {
|
||||
var res : f32 = frexp(1.0, &(arg_1));
|
||||
}
|
||||
|
||||
[[stage(vertex)]]
|
||||
fn vertex_main() -> [[builtin(position)]] vec4<f32> {
|
||||
frexp_b7bcbb();
|
||||
return vec4<f32>();
|
||||
}
|
||||
|
||||
[[stage(fragment)]]
|
||||
fn fragment_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
||||
|
||||
[[stage(compute)]]
|
||||
fn compute_main() {
|
||||
frexp_b7bcbb();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue