| SKIP: FAILED |
| |
| |
| @group(0) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>; |
| |
| @group(1) @binding(0) var arg_0 : texture_3d<f32>; |
| |
| fn textureDimensions_1bc428() -> vec3<u32> { |
| var arg_1 = 1i; |
| var res : vec3<u32> = textureDimensions(arg_0, arg_1); |
| return res; |
| } |
| |
| @fragment |
| fn fragment_main() { |
| prevent_dce = textureDimensions_1bc428(); |
| } |
| |
| @compute @workgroup_size(1) |
| fn compute_main() { |
| prevent_dce = textureDimensions_1bc428(); |
| } |
| |
| struct VertexOutput { |
| @builtin(position) |
| pos : vec4<f32>, |
| @location(0) @interpolate(flat) |
| prevent_dce : vec3<u32>, |
| } |
| |
| @vertex |
| fn vertex_main() -> VertexOutput { |
| var tint_symbol : VertexOutput; |
| tint_symbol.pos = vec4<f32>(); |
| tint_symbol.prevent_dce = textureDimensions_1bc428(); |
| return tint_symbol; |
| } |
| |
| Failed to generate: :30:49 error: var: initializer type 'vec2<u32>' does not match store type 'vec3<u32>' |
| %res:ptr<function, vec3<u32>, read_write> = var, %15 |
| ^^^ |
| |
| :17:3 note: in block |
| $B2: { |
| ^^^ |
| |
| note: # Disassembly |
| VertexOutput = struct @align(16) { |
| pos:vec4<f32> @offset(0) |
| prevent_dce:vec3<u32> @offset(16) |
| } |
| |
| vertex_main_outputs = struct @align(16) { |
| VertexOutput_prevent_dce:vec3<u32> @offset(0), @location(0), @interpolate(flat) |
| VertexOutput_pos:vec4<f32> @offset(16), @builtin(position) |
| } |
| |
| $B1: { # root |
| %prevent_dce:hlsl.byte_address_buffer<read_write> = var @binding_point(0, 0) |
| %arg_0:ptr<handle, texture_3d<f32>, read> = var @binding_point(1, 0) |
| } |
| |
| %textureDimensions_1bc428 = func():vec3<u32> { |
| $B2: { |
| %arg_1:ptr<function, i32, read_write> = var, 1i |
| %5:texture_3d<f32> = load %arg_0 |
| %6:i32 = load %arg_1 |
| %7:u32 = convert %6 |
| %8:ptr<function, vec4<u32>, read_write> = var |
| %9:ptr<function, u32, read_write> = access %8, 0u |
| %10:ptr<function, u32, read_write> = access %8, 1u |
| %11:ptr<function, u32, read_write> = access %8, 2u |
| %12:ptr<function, u32, read_write> = access %8, 3u |
| %13:void = %5.GetDimensions %7, %9, %10, %11, %12 |
| %14:vec4<u32> = load %8 |
| %15:vec2<u32> = swizzle %14, xyz |
| %res:ptr<function, vec3<u32>, read_write> = var, %15 |
| %17:vec3<u32> = load %res |
| ret %17 |
| } |
| } |
| %fragment_main = @fragment func():void { |
| $B3: { |
| %19:vec3<u32> = call %textureDimensions_1bc428 |
| %20:void = %prevent_dce.Store3 0u, %19 |
| ret |
| } |
| } |
| %compute_main = @compute @workgroup_size(1, 1, 1) func():void { |
| $B4: { |
| %22:vec3<u32> = call %textureDimensions_1bc428 |
| %23:void = %prevent_dce.Store3 0u, %22 |
| ret |
| } |
| } |
| %vertex_main_inner = func():VertexOutput { |
| $B5: { |
| %tint_symbol:ptr<function, VertexOutput, read_write> = var |
| %26:ptr<function, vec4<f32>, read_write> = access %tint_symbol, 0u |
| store %26, vec4<f32>(0.0f) |
| %27:ptr<function, vec3<u32>, read_write> = access %tint_symbol, 1u |
| %28:vec3<u32> = call %textureDimensions_1bc428 |
| store %27, %28 |
| %29:VertexOutput = load %tint_symbol |
| ret %29 |
| } |
| } |
| %vertex_main = @vertex func():vertex_main_outputs { |
| $B6: { |
| %31:VertexOutput = call %vertex_main_inner |
| %32:vec4<f32> = access %31, 0u |
| %33:vec3<u32> = access %31, 1u |
| %34:vertex_main_outputs = construct %33, %32 |
| ret %34 |
| } |
| } |
| |