writer/spirv: Implement atomics
Bug: tint:892 Change-Id: Ic0de538c76fd7cfe8fd3d7c25d2d61dd74aa1494 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54658 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
parent
83184202ec
commit
c3dc300fcb
|
@ -22,6 +22,7 @@
|
||||||
#include "src/ast/fallthrough_statement.h"
|
#include "src/ast/fallthrough_statement.h"
|
||||||
#include "src/ast/override_decoration.h"
|
#include "src/ast/override_decoration.h"
|
||||||
#include "src/sem/array.h"
|
#include "src/sem/array.h"
|
||||||
|
#include "src/sem/atomic_type.h"
|
||||||
#include "src/sem/call.h"
|
#include "src/sem/call.h"
|
||||||
#include "src/sem/depth_texture_type.h"
|
#include "src/sem/depth_texture_type.h"
|
||||||
#include "src/sem/function.h"
|
#include "src/sem/function.h"
|
||||||
|
@ -2188,6 +2189,14 @@ uint32_t Builder::GenerateIntrinsic(ast::CallExpression* call,
|
||||||
return result_id;
|
return result_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (intrinsic->IsAtomic()) {
|
||||||
|
if (!GenerateAtomicIntrinsic(call, intrinsic, Operand::Int(result_type_id),
|
||||||
|
result)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return result_id;
|
||||||
|
}
|
||||||
|
|
||||||
// Generates the SPIR-V ID for the expression for the indexed call parameter,
|
// Generates the SPIR-V ID for the expression for the indexed call parameter,
|
||||||
// and loads it if necessary. Returns 0 on error.
|
// and loads it if necessary. Returns 0 on error.
|
||||||
auto get_param_as_value_id = [&](size_t i) -> uint32_t {
|
auto get_param_as_value_id = [&](size_t i) -> uint32_t {
|
||||||
|
@ -2915,6 +2924,236 @@ bool Builder::GenerateControlBarrierIntrinsic(const sem::Intrinsic* intrinsic) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Builder::GenerateAtomicIntrinsic(ast::CallExpression* call,
|
||||||
|
const sem::Intrinsic* intrinsic,
|
||||||
|
Operand result_type,
|
||||||
|
Operand result_id) {
|
||||||
|
auto is_value_signed = [&] {
|
||||||
|
return intrinsic->Parameters()[1].type->Is<sem::I32>();
|
||||||
|
};
|
||||||
|
|
||||||
|
auto storage_class =
|
||||||
|
intrinsic->Parameters()[0].type->As<sem::Pointer>()->StorageClass();
|
||||||
|
|
||||||
|
uint32_t memory_id = 0;
|
||||||
|
switch (intrinsic->Parameters()[0].type->As<sem::Pointer>()->StorageClass()) {
|
||||||
|
case ast::StorageClass::kWorkgroup:
|
||||||
|
memory_id = GenerateConstantIfNeeded(
|
||||||
|
ScalarConstant::U32(static_cast<uint32_t>(spv::Scope::Workgroup)));
|
||||||
|
break;
|
||||||
|
case ast::StorageClass::kStorage:
|
||||||
|
memory_id = GenerateConstantIfNeeded(
|
||||||
|
ScalarConstant::U32(static_cast<uint32_t>(spv::Scope::Device)));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
TINT_UNREACHABLE(builder_.Diagnostics())
|
||||||
|
<< "unhandled atomic storage class " << storage_class;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (memory_id == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t semantics_id = GenerateConstantIfNeeded(ScalarConstant::U32(
|
||||||
|
static_cast<uint32_t>(spv::MemorySemanticsMask::MaskNone)));
|
||||||
|
if (semantics_id == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t pointer_id = GenerateExpression(call->params()[0]);
|
||||||
|
if (pointer_id == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t value_id = 0;
|
||||||
|
if (call->params().size() > 1) {
|
||||||
|
value_id = GenerateExpression(call->params().back());
|
||||||
|
if (value_id == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Operand pointer = Operand::Int(pointer_id);
|
||||||
|
Operand value = Operand::Int(value_id);
|
||||||
|
Operand memory = Operand::Int(memory_id);
|
||||||
|
Operand semantics = Operand::Int(semantics_id);
|
||||||
|
|
||||||
|
switch (intrinsic->Type()) {
|
||||||
|
case sem::IntrinsicType::kAtomicLoad:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicLoad, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicStore:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicStore, {
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicAdd:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicIAdd, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicMax:
|
||||||
|
return push_function_inst(
|
||||||
|
is_value_signed() ? spv::Op::OpAtomicSMax : spv::Op::OpAtomicUMax,
|
||||||
|
{
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicMin:
|
||||||
|
return push_function_inst(
|
||||||
|
is_value_signed() ? spv::Op::OpAtomicSMin : spv::Op::OpAtomicUMin,
|
||||||
|
{
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicAnd:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicAnd, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicOr:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicOr, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicXor:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicXor, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicExchange:
|
||||||
|
return push_function_inst(spv::Op::OpAtomicExchange, {
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
|
||||||
|
auto comparator = GenerateExpression(call->params()[1]);
|
||||||
|
if (comparator == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto* value_sem_type = TypeOf(call->params()[2]);
|
||||||
|
|
||||||
|
auto value_type = GenerateTypeIfNeeded(value_sem_type);
|
||||||
|
if (value_type == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
sem::Bool bool_sem_type;
|
||||||
|
auto bool_type = GenerateTypeIfNeeded(&bool_sem_type);
|
||||||
|
if (bool_type == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// original_value := OpAtomicCompareExchange(pointer, memory, semantics,
|
||||||
|
// semantics, value, comparator)
|
||||||
|
auto original_value = result_op();
|
||||||
|
if (!push_function_inst(spv::Op::OpAtomicCompareExchange,
|
||||||
|
{
|
||||||
|
Operand::Int(value_type),
|
||||||
|
original_value,
|
||||||
|
pointer,
|
||||||
|
memory,
|
||||||
|
semantics,
|
||||||
|
semantics,
|
||||||
|
value,
|
||||||
|
Operand::Int(comparator),
|
||||||
|
})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// values_equal := original_value == value
|
||||||
|
auto values_equal = result_op();
|
||||||
|
if (!push_function_inst(spv::Op::OpIEqual, {
|
||||||
|
Operand::Int(bool_type),
|
||||||
|
values_equal,
|
||||||
|
original_value,
|
||||||
|
value,
|
||||||
|
})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// zero := T(0)
|
||||||
|
// one := T(1)
|
||||||
|
uint32_t zero = 0;
|
||||||
|
uint32_t one = 0;
|
||||||
|
if (value_sem_type->Is<sem::I32>()) {
|
||||||
|
zero = GenerateConstantIfNeeded(ScalarConstant::I32(0u));
|
||||||
|
one = GenerateConstantIfNeeded(ScalarConstant::I32(1u));
|
||||||
|
} else if (value_sem_type->Is<sem::U32>()) {
|
||||||
|
zero = GenerateConstantIfNeeded(ScalarConstant::U32(0u));
|
||||||
|
one = GenerateConstantIfNeeded(ScalarConstant::U32(1u));
|
||||||
|
} else {
|
||||||
|
TINT_UNREACHABLE(builder_.Diagnostics())
|
||||||
|
<< "unsupported atomic type " << value_sem_type->TypeInfo().name;
|
||||||
|
}
|
||||||
|
if (zero == 0 || one == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// xchg_success := values_equal ? one : zero
|
||||||
|
auto xchg_success = result_op();
|
||||||
|
if (!push_function_inst(spv::Op::OpSelect, {
|
||||||
|
Operand::Int(value_type),
|
||||||
|
xchg_success,
|
||||||
|
values_equal,
|
||||||
|
Operand::Int(one),
|
||||||
|
Operand::Int(zero),
|
||||||
|
})) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// result := vec2<T>(original_value, xchg_success)
|
||||||
|
return push_function_inst(spv::Op::OpCompositeConstruct,
|
||||||
|
{
|
||||||
|
result_type,
|
||||||
|
result_id,
|
||||||
|
original_value,
|
||||||
|
xchg_success,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
TINT_UNREACHABLE(builder_.Diagnostics())
|
||||||
|
<< "unhandled atomic intrinsic " << intrinsic->Type();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t Builder::GenerateSampledImage(const sem::Type* texture_type,
|
uint32_t Builder::GenerateSampledImage(const sem::Type* texture_type,
|
||||||
Operand texture_operand,
|
Operand texture_operand,
|
||||||
Operand sampler_operand) {
|
Operand sampler_operand) {
|
||||||
|
@ -3313,6 +3552,12 @@ uint32_t Builder::GenerateTypeIfNeeded(const sem::Type* type) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Atomics are a type in WGSL, but aren't a distinct type in SPIR-V.
|
||||||
|
// Just emit the type inside the atomic.
|
||||||
|
if (auto* atomic = type->As<sem::Atomic>()) {
|
||||||
|
return GenerateTypeIfNeeded(atomic->Type());
|
||||||
|
}
|
||||||
|
|
||||||
// Pointers and references with differing accesses should not result in a
|
// Pointers and references with differing accesses should not result in a
|
||||||
// different SPIR-V types, so we explicitly ignore the access.
|
// different SPIR-V types, so we explicitly ignore the access.
|
||||||
// Pointers and References both map to a SPIR-V pointer type.
|
// Pointers and References both map to a SPIR-V pointer type.
|
||||||
|
|
|
@ -365,10 +365,19 @@ class Builder {
|
||||||
spirv::Operand result_type,
|
spirv::Operand result_type,
|
||||||
spirv::Operand result_id);
|
spirv::Operand result_id);
|
||||||
/// Generates a control barrier statement.
|
/// Generates a control barrier statement.
|
||||||
/// @param intrinsic the semantic information for the barrier intrinsic
|
/// @param intrinsic the semantic information for the barrier intrinsic call
|
||||||
/// parameters
|
|
||||||
/// @returns true on success
|
/// @returns true on success
|
||||||
bool GenerateControlBarrierIntrinsic(const sem::Intrinsic* intrinsic);
|
bool GenerateControlBarrierIntrinsic(const sem::Intrinsic* intrinsic);
|
||||||
|
/// Generates an atomic intrinsic call.
|
||||||
|
/// @param call the call expression
|
||||||
|
/// @param intrinsic the semantic information for the atomic intrinsic call
|
||||||
|
/// @param result_type result type operand of the texture instruction
|
||||||
|
/// @param result_id result identifier operand of the texture instruction
|
||||||
|
/// @returns true on success
|
||||||
|
bool GenerateAtomicIntrinsic(ast::CallExpression* call,
|
||||||
|
const sem::Intrinsic* intrinsic,
|
||||||
|
Operand result_type,
|
||||||
|
Operand result_id);
|
||||||
/// Generates a sampled image
|
/// Generates a sampled image
|
||||||
/// @param texture_type the texture type
|
/// @param texture_type the texture type
|
||||||
/// @param texture_operand the texture operand
|
/// @param texture_operand the texture operand
|
||||||
|
|
|
@ -1572,7 +1572,7 @@ OpFunctionEnd
|
||||||
|
|
||||||
// TODO(crbug.com/tint/806): Remove
|
// TODO(crbug.com/tint/806): Remove
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_DEPRECATED) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_DEPRECATED) {
|
||||||
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
|
@ -1620,7 +1620,7 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_DEPRECATED) {
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct_DEPRECATED) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct_DEPRECATED) {
|
||||||
auto* s = Structure("my_struct",
|
auto* s = Structure("my_struct",
|
||||||
{
|
{
|
||||||
Member(0, "z", ty.f32()),
|
Member("z", ty.f32()),
|
||||||
Member(4, "a", ty.array<f32>(4)),
|
Member(4, "a", ty.array<f32>(4)),
|
||||||
},
|
},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
@ -1667,7 +1667,7 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct_DEPRECATED) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
|
||||||
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
|
@ -1714,7 +1714,7 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength) {
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct) {
|
||||||
auto* s = Structure("my_struct",
|
auto* s = Structure("my_struct",
|
||||||
{
|
{
|
||||||
Member(0, "z", ty.f32()),
|
Member("z", ty.f32()),
|
||||||
Member(4, "a", ty.array<f32>(4)),
|
Member(4, "a", ty.array<f32>(4)),
|
||||||
},
|
},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
@ -1761,7 +1761,7 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_OtherMembersInStruct) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets) {
|
||||||
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
|
@ -1810,9 +1810,10 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets) {
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
|
TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
|
||||||
// struct my_struct {
|
// [[block]] struct my_struct {
|
||||||
// a : [[stride(4)]] array<f32>;
|
// a : [[stride(4)]] array<f32>;
|
||||||
// }
|
// };
|
||||||
|
// [[binding(1), group(2)]] var<storage, read> b : my_struct;
|
||||||
//
|
//
|
||||||
// fn a_func() {
|
// fn a_func() {
|
||||||
// let p = &*&b;
|
// let p = &*&b;
|
||||||
|
@ -1820,7 +1821,7 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
|
||||||
// let p3 = &((*p).a);
|
// let p3 = &((*p).a);
|
||||||
// arrayLength(&*p3);
|
// arrayLength(&*p3);
|
||||||
// }
|
// }
|
||||||
auto* s = Structure("my_struct", {Member(0, "a", ty.array<f32>(4))},
|
auto* s = Structure("my_struct", {Member("a", ty.array<f32>(4))},
|
||||||
{create<ast::StructBlockDecoration>()});
|
{create<ast::StructBlockDecoration>()});
|
||||||
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kRead,
|
||||||
ast::DecorationList{
|
ast::DecorationList{
|
||||||
|
@ -1870,6 +1871,427 @@ TEST_F(IntrinsicBuilderTest, Call_ArrayLength_ViaLets_WithPtrNoise) {
|
||||||
Validate(b);
|
Validate(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(IntrinsicBuilderTest, Call_AtomicLoad) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// u : atomic<u32>;
|
||||||
|
// i : atomic<i32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let u : u32 = atomicLoad(&b.u);
|
||||||
|
// let i : i32 = atomicLoad(&b.i);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("u", ty.atomic<u32>()),
|
||||||
|
Member("i", ty.atomic<i32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
Decl(Const("u", ty.u32(),
|
||||||
|
Call("atomicLoad", AddressOf(MemberAccessor("b", "u"))))),
|
||||||
|
Decl(Const("i", ty.i32(),
|
||||||
|
Call("atomicLoad", AddressOf(MemberAccessor("b", "i"))))),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
auto* expected_types = R"(%4 = OpTypeInt 32 0
|
||||||
|
%5 = OpTypeInt 32 1
|
||||||
|
%3 = OpTypeStruct %4 %5
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%7 = OpTypeVoid
|
||||||
|
%6 = OpTypeFunction %7
|
||||||
|
%11 = OpConstant %4 1
|
||||||
|
%12 = OpConstant %4 0
|
||||||
|
%14 = OpTypePointer StorageBuffer %4
|
||||||
|
%18 = OpTypePointer StorageBuffer %5
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
auto* expected_instructions = R"(%15 = OpAccessChain %14 %1 %12
|
||||||
|
%10 = OpAtomicLoad %4 %15 %11 %12
|
||||||
|
%19 = OpAccessChain %18 %1 %11
|
||||||
|
%16 = OpAtomicLoad %5 %19 %11 %12
|
||||||
|
)";
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(IntrinsicBuilderTest, Call_AtomicStore) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// u : atomic<u32>;
|
||||||
|
// i : atomic<i32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let u : u32 = atomicStore(&b.u, 1u);
|
||||||
|
// let i : i32 = atomicStore(&b.i, 2);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("u", ty.atomic<u32>()),
|
||||||
|
Member("i", ty.atomic<i32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
create<ast::CallStatement>(
|
||||||
|
Call("atomicStore", AddressOf(MemberAccessor("b", "u")), 1u)),
|
||||||
|
create<ast::CallStatement>(
|
||||||
|
Call("atomicStore", AddressOf(MemberAccessor("b", "i")), 2)),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
auto* expected_types = R"(%4 = OpTypeInt 32 0
|
||||||
|
%5 = OpTypeInt 32 1
|
||||||
|
%3 = OpTypeStruct %4 %5
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%7 = OpTypeVoid
|
||||||
|
%6 = OpTypeFunction %7
|
||||||
|
%11 = OpConstant %4 1
|
||||||
|
%12 = OpConstant %4 0
|
||||||
|
%14 = OpTypePointer StorageBuffer %4
|
||||||
|
%18 = OpTypePointer StorageBuffer %5
|
||||||
|
%20 = OpConstant %5 2
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
auto* expected_instructions = R"(%15 = OpAccessChain %14 %1 %12
|
||||||
|
OpAtomicStore %15 %11 %12 %11
|
||||||
|
%19 = OpAccessChain %18 %1 %11
|
||||||
|
OpAtomicStore %19 %11 %12 %20
|
||||||
|
)";
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
using Intrinsic_Builtin_AtomicRMW_i32 =
|
||||||
|
IntrinsicBuilderTestWithParam<IntrinsicData>;
|
||||||
|
TEST_P(Intrinsic_Builtin_AtomicRMW_i32, Test) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// v : atomic<i32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let x : i32 = atomicOP(&b.v);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("v", ty.atomic<i32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
Decl(Const(
|
||||||
|
"x", ty.i32(),
|
||||||
|
Call(GetParam().name, AddressOf(MemberAccessor("b", "v")), 10))),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
std::string expected_types = R"(%4 = OpTypeInt 32 1
|
||||||
|
%3 = OpTypeStruct %4
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%6 = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %6
|
||||||
|
%10 = OpTypeInt 32 0
|
||||||
|
%11 = OpConstant %10 1
|
||||||
|
%12 = OpConstant %10 0
|
||||||
|
%14 = OpTypePointer StorageBuffer %4
|
||||||
|
%16 = OpConstant %4 10
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
std::string expected_instructions = "%15 = OpAccessChain %14 %1 %12\n";
|
||||||
|
expected_instructions += "%9 = " + GetParam().op + " %4 %15 %11 %12 %16\n";
|
||||||
|
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
IntrinsicBuilderTest,
|
||||||
|
Intrinsic_Builtin_AtomicRMW_i32,
|
||||||
|
testing::Values(IntrinsicData{"atomicAdd", "OpAtomicIAdd"},
|
||||||
|
IntrinsicData{"atomicMax", "OpAtomicSMax"},
|
||||||
|
IntrinsicData{"atomicMin", "OpAtomicSMin"},
|
||||||
|
IntrinsicData{"atomicAnd", "OpAtomicAnd"},
|
||||||
|
IntrinsicData{"atomicOr", "OpAtomicOr"},
|
||||||
|
IntrinsicData{"atomicXor", "OpAtomicXor"}));
|
||||||
|
|
||||||
|
using Intrinsic_Builtin_AtomicRMW_u32 =
|
||||||
|
IntrinsicBuilderTestWithParam<IntrinsicData>;
|
||||||
|
TEST_P(Intrinsic_Builtin_AtomicRMW_u32, Test) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// v : atomic<u32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let x : u32 = atomicOP(&b.v);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("v", ty.atomic<u32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
Decl(Const("x", ty.u32(),
|
||||||
|
Call(GetParam().name, AddressOf(MemberAccessor("b", "v")),
|
||||||
|
10u))),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
std::string expected_types = R"(%4 = OpTypeInt 32 0
|
||||||
|
%3 = OpTypeStruct %4
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%6 = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %6
|
||||||
|
%10 = OpConstant %4 1
|
||||||
|
%11 = OpConstant %4 0
|
||||||
|
%13 = OpTypePointer StorageBuffer %4
|
||||||
|
%15 = OpConstant %4 10
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
std::string expected_instructions = "%14 = OpAccessChain %13 %1 %11\n";
|
||||||
|
expected_instructions += "%9 = " + GetParam().op + " %4 %14 %10 %11 %15\n";
|
||||||
|
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
INSTANTIATE_TEST_SUITE_P(
|
||||||
|
IntrinsicBuilderTest,
|
||||||
|
Intrinsic_Builtin_AtomicRMW_u32,
|
||||||
|
testing::Values(IntrinsicData{"atomicAdd", "OpAtomicIAdd"},
|
||||||
|
IntrinsicData{"atomicMax", "OpAtomicUMax"},
|
||||||
|
IntrinsicData{"atomicMin", "OpAtomicUMin"},
|
||||||
|
IntrinsicData{"atomicAnd", "OpAtomicAnd"},
|
||||||
|
IntrinsicData{"atomicOr", "OpAtomicOr"},
|
||||||
|
IntrinsicData{"atomicXor", "OpAtomicXor"}));
|
||||||
|
|
||||||
|
TEST_F(IntrinsicBuilderTest, Call_AtomicExchange) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// u : atomic<u32>;
|
||||||
|
// i : atomic<i32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let u : u32 = atomicExchange(&b.u, 10u);
|
||||||
|
// let i : i32 = atomicExchange(&b.i, 10);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("u", ty.atomic<u32>()),
|
||||||
|
Member("i", ty.atomic<i32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
Decl(Const("u", ty.u32(),
|
||||||
|
Call("atomicExchange",
|
||||||
|
AddressOf(MemberAccessor("b", "u")), 10u))),
|
||||||
|
Decl(Const("i", ty.i32(),
|
||||||
|
Call("atomicExchange",
|
||||||
|
AddressOf(MemberAccessor("b", "i")), 10))),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
auto* expected_types = R"(%4 = OpTypeInt 32 0
|
||||||
|
%5 = OpTypeInt 32 1
|
||||||
|
%3 = OpTypeStruct %4 %5
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%7 = OpTypeVoid
|
||||||
|
%6 = OpTypeFunction %7
|
||||||
|
%11 = OpConstant %4 1
|
||||||
|
%12 = OpConstant %4 0
|
||||||
|
%14 = OpTypePointer StorageBuffer %4
|
||||||
|
%16 = OpConstant %4 10
|
||||||
|
%19 = OpTypePointer StorageBuffer %5
|
||||||
|
%21 = OpConstant %5 10
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
auto* expected_instructions = R"(%15 = OpAccessChain %14 %1 %12
|
||||||
|
%10 = OpAtomicExchange %4 %15 %11 %12 %16
|
||||||
|
%20 = OpAccessChain %19 %1 %11
|
||||||
|
%17 = OpAtomicExchange %5 %20 %11 %12 %21
|
||||||
|
)";
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(IntrinsicBuilderTest, Call_AtomicCompareExchangeWeak) {
|
||||||
|
// [[block]] struct S {
|
||||||
|
// u : atomic<u32>;
|
||||||
|
// i : atomic<i32>;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// [[binding(1), group(2)]] var<storage, read_write> b : S;
|
||||||
|
//
|
||||||
|
// fn a_func() {
|
||||||
|
// let u : vec2<u32> = atomicCompareExchangeWeak(&b.u, 10u);
|
||||||
|
// let i : vec2<i32> = atomicCompareExchangeWeak(&b.i, 10);
|
||||||
|
// }
|
||||||
|
auto* s = Structure("S",
|
||||||
|
{
|
||||||
|
Member("u", ty.atomic<u32>()),
|
||||||
|
Member("i", ty.atomic<i32>()),
|
||||||
|
},
|
||||||
|
{create<ast::StructBlockDecoration>()});
|
||||||
|
Global("b", ty.Of(s), ast::StorageClass::kStorage, ast::Access::kReadWrite,
|
||||||
|
ast::DecorationList{
|
||||||
|
create<ast::BindingDecoration>(1),
|
||||||
|
create<ast::GroupDecoration>(2),
|
||||||
|
});
|
||||||
|
|
||||||
|
Func("a_func", ast::VariableList{}, ty.void_(),
|
||||||
|
ast::StatementList{
|
||||||
|
Decl(Const("u", ty.vec2<u32>(),
|
||||||
|
Call("atomicCompareExchangeWeak",
|
||||||
|
AddressOf(MemberAccessor("b", "u")), 10u, 20u))),
|
||||||
|
Decl(Const("i", ty.vec2<i32>(),
|
||||||
|
Call("atomicCompareExchangeWeak",
|
||||||
|
AddressOf(MemberAccessor("b", "i")), 10, 20))),
|
||||||
|
},
|
||||||
|
ast::DecorationList{Stage(ast::PipelineStage::kFragment)});
|
||||||
|
|
||||||
|
spirv::Builder& b = Build();
|
||||||
|
|
||||||
|
ASSERT_TRUE(b.Build()) << b.error();
|
||||||
|
|
||||||
|
ASSERT_EQ(b.functions().size(), 1u);
|
||||||
|
|
||||||
|
auto* expected_types = R"(%4 = OpTypeInt 32 0
|
||||||
|
%5 = OpTypeInt 32 1
|
||||||
|
%3 = OpTypeStruct %4 %5
|
||||||
|
%2 = OpTypePointer StorageBuffer %3
|
||||||
|
%1 = OpVariable %2 StorageBuffer
|
||||||
|
%7 = OpTypeVoid
|
||||||
|
%6 = OpTypeFunction %7
|
||||||
|
%11 = OpTypeVector %4 2
|
||||||
|
%12 = OpConstant %4 1
|
||||||
|
%13 = OpConstant %4 0
|
||||||
|
%15 = OpTypePointer StorageBuffer %4
|
||||||
|
%17 = OpConstant %4 20
|
||||||
|
%18 = OpConstant %4 10
|
||||||
|
%19 = OpTypeBool
|
||||||
|
%24 = OpTypeVector %5 2
|
||||||
|
%26 = OpTypePointer StorageBuffer %5
|
||||||
|
%28 = OpConstant %5 20
|
||||||
|
%29 = OpConstant %5 10
|
||||||
|
%32 = OpConstant %5 0
|
||||||
|
%33 = OpConstant %5 1
|
||||||
|
)";
|
||||||
|
auto got_types = DumpInstructions(b.types());
|
||||||
|
EXPECT_EQ(expected_types, got_types);
|
||||||
|
|
||||||
|
auto* expected_instructions = R"(%16 = OpAccessChain %15 %1 %13
|
||||||
|
%20 = OpAtomicCompareExchange %4 %16 %12 %13 %13 %17 %18
|
||||||
|
%21 = OpIEqual %19 %20 %17
|
||||||
|
%22 = OpSelect %4 %21 %12 %13
|
||||||
|
%10 = OpCompositeConstruct %11 %20 %22
|
||||||
|
%27 = OpAccessChain %26 %1 %12
|
||||||
|
%30 = OpAtomicCompareExchange %5 %27 %12 %13 %13 %28 %29
|
||||||
|
%31 = OpIEqual %19 %30 %28
|
||||||
|
%34 = OpSelect %5 %31 %33 %32
|
||||||
|
%23 = OpCompositeConstruct %24 %30 %34
|
||||||
|
)";
|
||||||
|
auto got_instructions = DumpInstructions(b.functions()[0].instructions());
|
||||||
|
EXPECT_EQ(expected_instructions, got_instructions);
|
||||||
|
|
||||||
|
Validate(b);
|
||||||
|
}
|
||||||
|
|
||||||
using Intrinsic_Builtin_DataPacking_Test =
|
using Intrinsic_Builtin_DataPacking_Test =
|
||||||
IntrinsicBuilderTestWithParam<IntrinsicData>;
|
IntrinsicBuilderTestWithParam<IntrinsicData>;
|
||||||
TEST_P(Intrinsic_Builtin_DataPacking_Test, Binary) {
|
TEST_P(Intrinsic_Builtin_DataPacking_Test, Binary) {
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicAdd_794055() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicAdd(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicAdd_794055 "atomicAdd_794055"
|
||||||
atomicAdd_794055();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicAdd_794055 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicIAdd %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicAdd_794055
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicAdd_8a199a() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicAdd(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicAdd_8a199a "atomicAdd_8a199a"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicAdd_8a199a();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicAdd_8a199a();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicAdd_8a199a = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicIAdd %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicAdd_8a199a
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicAdd_8a199a
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicAdd_d32fe4() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicAdd(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicAdd_d32fe4 "atomicAdd_d32fe4"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicAdd_d32fe4();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicAdd_d32fe4();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicAdd_d32fe4 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicIAdd %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicAdd_d32fe4
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicAdd_d32fe4
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicAdd_d5db1d() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicAdd(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicAdd_d5db1d "atomicAdd_d5db1d"
|
||||||
atomicAdd_d5db1d();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicAdd_d5db1d = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicIAdd %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicAdd_d5db1d
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicAnd_152966() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicAnd(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicAnd_152966 "atomicAnd_152966"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicAnd_152966();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicAnd_152966();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicAnd_152966 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicAnd %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicAnd_152966
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicAnd_152966
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicAnd_34edd3() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicAnd(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicAnd_34edd3 "atomicAnd_34edd3"
|
||||||
atomicAnd_34edd3();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicAnd_34edd3 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicAnd %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicAnd_34edd3
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicAnd_45a819() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicAnd(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicAnd_45a819 "atomicAnd_45a819"
|
||||||
atomicAnd_45a819();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicAnd_45a819 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicAnd %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicAnd_45a819
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicAnd_85a8d9() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicAnd(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicAnd_85a8d9 "atomicAnd_85a8d9"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicAnd_85a8d9();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicAnd_85a8d9();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicAnd_85a8d9 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicAnd %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicAnd_85a8d9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicAnd_85a8d9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,59 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 32
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicCompareExchangeWeak_12871c() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : vec2<i32> = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1, 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicCompareExchangeWeak_12871c "atomicCompareExchangeWeak_12871c"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicCompareExchangeWeak_12871c();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicCompareExchangeWeak_12871c();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%v2int = OpTypeVector %int 2
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%bool = OpTypeBool
|
||||||
|
%int_0 = OpConstant %int 0
|
||||||
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
||||||
|
%25 = OpConstantNull %v2int
|
||||||
|
%atomicCompareExchangeWeak_12871c = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v2int Function %25
|
||||||
|
%16 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%19 = OpAtomicCompareExchange %int %16 %uint_1 %uint_0 %uint_0 %int_1 %int_1
|
||||||
|
%20 = OpIEqual %bool %19 %int_1
|
||||||
|
%22 = OpSelect %int %20 %int_1 %int_0
|
||||||
|
%9 = OpCompositeConstruct %v2int %19 %22
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%27 = OpLabel
|
||||||
|
%28 = OpFunctionCall %void %atomicCompareExchangeWeak_12871c
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%30 = OpLabel
|
||||||
|
%31 = OpFunctionCall %void %atomicCompareExchangeWeak_12871c
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,56 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 29
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicCompareExchangeWeak_6673da() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : vec2<u32> = atomicCompareExchangeWeak(&(sb_rw.arg_0), 1u, 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicCompareExchangeWeak_6673da "atomicCompareExchangeWeak_6673da"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicCompareExchangeWeak_6673da();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicCompareExchangeWeak_6673da();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%v2uint = OpTypeVector %uint 2
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%bool = OpTypeBool
|
||||||
|
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||||
|
%22 = OpConstantNull %v2uint
|
||||||
|
%atomicCompareExchangeWeak_6673da = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v2uint Function %22
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%17 = OpAtomicCompareExchange %uint %15 %uint_1 %uint_0 %uint_0 %uint_1 %uint_1
|
||||||
|
%18 = OpIEqual %bool %17 %uint_1
|
||||||
|
%19 = OpSelect %uint %18 %uint_1 %uint_0
|
||||||
|
%9 = OpCompositeConstruct %v2uint %17 %19
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicCompareExchangeWeak_6673da
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%27 = OpLabel
|
||||||
|
%28 = OpFunctionCall %void %atomicCompareExchangeWeak_6673da
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,42 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 26
|
||||||
|
; Schema: 0
|
||||||
fn atomicCompareExchangeWeak_89ea3b() {
|
OpCapability Shader
|
||||||
var res : vec2<i32> = atomicCompareExchangeWeak(&(arg_0), 1, 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicCompareExchangeWeak_89ea3b "atomicCompareExchangeWeak_89ea3b"
|
||||||
atomicCompareExchangeWeak_89ea3b();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%v2int = OpTypeVector %int 2
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%bool = OpTypeBool
|
||||||
|
%int_0 = OpConstant %int 0
|
||||||
|
%_ptr_Function_v2int = OpTypePointer Function %v2int
|
||||||
|
%22 = OpConstantNull %v2int
|
||||||
|
%atomicCompareExchangeWeak_89ea3b = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v2int Function %22
|
||||||
|
%16 = OpAtomicCompareExchange %int %arg_0 %uint_2 %uint_0 %uint_0 %int_1 %int_1
|
||||||
|
%17 = OpIEqual %bool %16 %int_1
|
||||||
|
%19 = OpSelect %int %17 %int_1 %int_0
|
||||||
|
%8 = OpCompositeConstruct %v2int %16 %19
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicCompareExchangeWeak_89ea3b
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,40 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 24
|
||||||
|
; Schema: 0
|
||||||
fn atomicCompareExchangeWeak_b2ab2c() {
|
OpCapability Shader
|
||||||
var res : vec2<u32> = atomicCompareExchangeWeak(&(arg_0), 1u, 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicCompareExchangeWeak_b2ab2c "atomicCompareExchangeWeak_b2ab2c"
|
||||||
atomicCompareExchangeWeak_b2ab2c();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%v2uint = OpTypeVector %uint 2
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%bool = OpTypeBool
|
||||||
|
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
|
||||||
|
%20 = OpConstantNull %v2uint
|
||||||
|
%atomicCompareExchangeWeak_b2ab2c = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_v2uint Function %20
|
||||||
|
%15 = OpAtomicCompareExchange %uint %arg_0 %uint_2 %uint_0 %uint_0 %uint_1 %uint_1
|
||||||
|
%16 = OpIEqual %bool %15 %uint_1
|
||||||
|
%17 = OpSelect %uint %16 %uint_1 %uint_0
|
||||||
|
%8 = OpCompositeConstruct %v2uint %15 %17
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicCompareExchangeWeak_b2ab2c
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicExchange_0a5dca() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicExchange(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicExchange_0a5dca "atomicExchange_0a5dca"
|
||||||
atomicExchange_0a5dca();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicExchange_0a5dca = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicExchange %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicExchange_0a5dca
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicExchange_d59712() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicExchange(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicExchange_d59712 "atomicExchange_d59712"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicExchange_d59712();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicExchange_d59712();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicExchange_d59712 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicExchange %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicExchange_d59712
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicExchange_d59712
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicExchange_e114ba() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicExchange(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicExchange_e114ba "atomicExchange_e114ba"
|
||||||
atomicExchange_e114ba();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicExchange_e114ba = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicExchange %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicExchange_e114ba
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicExchange_f2e22f() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicExchange(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicExchange_f2e22f "atomicExchange_f2e22f"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicExchange_f2e22f();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicExchange_f2e22f();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicExchange_f2e22f = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicExchange %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicExchange_f2e22f
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicExchange_f2e22f
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,52 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 25
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicLoad_0806ad() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicLoad(&(sb_rw.arg_0));
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicLoad_0806ad "atomicLoad_0806ad"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicLoad_0806ad();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicLoad_0806ad();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%18 = OpConstantNull %int
|
||||||
|
%atomicLoad_0806ad = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %18
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicLoad %int %15 %uint_1 %uint_0
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%20 = OpLabel
|
||||||
|
%21 = OpFunctionCall %void %atomicLoad_0806ad
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%23 = OpLabel
|
||||||
|
%24 = OpFunctionCall %void %atomicLoad_0806ad
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,34 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 18
|
||||||
|
; Schema: 0
|
||||||
fn atomicLoad_361bf1() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicLoad(&(arg_0));
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicLoad_361bf1 "atomicLoad_361bf1"
|
||||||
atomicLoad_361bf1();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%14 = OpConstantNull %uint
|
||||||
|
%atomicLoad_361bf1 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %14
|
||||||
|
%8 = OpAtomicLoad %uint %arg_0 %uint_2 %uint_0
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%16 = OpLabel
|
||||||
|
%17 = OpFunctionCall %void %atomicLoad_361bf1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicLoad_afcc03() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicLoad(&(arg_0));
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicLoad_afcc03 "atomicLoad_afcc03"
|
||||||
atomicLoad_afcc03();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%15 = OpConstantNull %int
|
||||||
|
%atomicLoad_afcc03 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %15
|
||||||
|
%8 = OpAtomicLoad %int %arg_0 %uint_2 %uint_0
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicLoad_afcc03
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicLoad_fe6cc3() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicLoad(&(sb_rw.arg_0));
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicLoad_fe6cc3 "atomicLoad_fe6cc3"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicLoad_fe6cc3();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicLoad_fe6cc3();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicLoad_fe6cc3 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicLoad %uint %14 %uint_1 %uint_0
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicLoad_fe6cc3
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicLoad_fe6cc3
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicMax_51b9be() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicMax(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicMax_51b9be "atomicMax_51b9be"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicMax_51b9be();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicMax_51b9be();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicMax_51b9be = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicUMax %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicMax_51b9be
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicMax_51b9be
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicMax_92aa72() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicMax(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicMax_92aa72 "atomicMax_92aa72"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicMax_92aa72();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicMax_92aa72();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicMax_92aa72 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicSMax %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicMax_92aa72
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicMax_92aa72
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicMax_a89cc3() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicMax(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicMax_a89cc3 "atomicMax_a89cc3"
|
||||||
atomicMax_a89cc3();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicMax_a89cc3 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicSMax %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicMax_a89cc3
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicMax_beccfc() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicMax(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicMax_beccfc "atomicMax_beccfc"
|
||||||
atomicMax_beccfc();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicMax_beccfc = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicUMax %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicMax_beccfc
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicMin_278235() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicMin(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicMin_278235 "atomicMin_278235"
|
||||||
atomicMin_278235();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicMin_278235 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicSMin %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicMin_278235
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicMin_69d383() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicMin(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicMin_69d383 "atomicMin_69d383"
|
||||||
atomicMin_69d383();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicMin_69d383 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicUMin %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicMin_69d383
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicMin_8e38dc() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicMin(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicMin_8e38dc "atomicMin_8e38dc"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicMin_8e38dc();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicMin_8e38dc();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicMin_8e38dc = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicSMin %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicMin_8e38dc
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicMin_8e38dc
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicMin_c67a74() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicMin(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicMin_c67a74 "atomicMin_c67a74"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicMin_c67a74();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicMin_c67a74();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicMin_c67a74 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicUMin %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicMin_c67a74
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicMin_c67a74
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicOr_5e3d61() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicOr(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicOr_5e3d61 "atomicOr_5e3d61"
|
||||||
atomicOr_5e3d61();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicOr_5e3d61 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicOr %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicOr_5e3d61
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicOr_5e95d4() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicOr(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicOr_5e95d4 "atomicOr_5e95d4"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicOr_5e95d4();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicOr_5e95d4();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicOr_5e95d4 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicOr %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicOr_5e95d4
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicOr_5e95d4
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicOr_8d96a0() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicOr(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicOr_8d96a0 "atomicOr_8d96a0"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicOr_8d96a0();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicOr_8d96a0();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicOr_8d96a0 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicOr %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicOr_8d96a0
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicOr_8d96a0
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicOr_d09248() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicOr(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicOr_d09248 "atomicOr_d09248"
|
||||||
atomicOr_d09248();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicOr_d09248 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicOr %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicOr_d09248
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,30 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 16
|
||||||
|
; Schema: 0
|
||||||
fn atomicStore_726882() {
|
OpCapability Shader
|
||||||
atomicStore(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicStore_726882 "atomicStore_726882"
|
||||||
atomicStore_726882();
|
OpName %compute_main "compute_main"
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%atomicStore_726882 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
OpAtomicStore %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%14 = OpLabel
|
||||||
|
%15 = OpFunctionCall %void %atomicStore_726882
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,31 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 17
|
||||||
|
; Schema: 0
|
||||||
fn atomicStore_8bea94() {
|
OpCapability Shader
|
||||||
atomicStore(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicStore_8bea94 "atomicStore_8bea94"
|
||||||
atomicStore_8bea94();
|
OpName %compute_main "compute_main"
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%atomicStore_8bea94 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
OpAtomicStore %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%15 = OpLabel
|
||||||
|
%16 = OpFunctionCall %void %atomicStore_8bea94
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,46 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 21
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicStore_cdc29e() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
atomicStore(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicStore_cdc29e "atomicStore_cdc29e"
|
||||||
fn fragment_main() {
|
OpName %fragment_main "fragment_main"
|
||||||
atomicStore_cdc29e();
|
OpName %compute_main "compute_main"
|
||||||
}
|
OpDecorate %SB_RW Block
|
||||||
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
[[stage(compute)]]
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw Binding 0
|
||||||
atomicStore_cdc29e();
|
%uint = OpTypeInt 32 0
|
||||||
}
|
%SB_RW = OpTypeStruct %uint
|
||||||
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%atomicStore_cdc29e = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
OpAtomicStore %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%16 = OpLabel
|
||||||
|
%17 = OpFunctionCall %void %atomicStore_cdc29e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicStore_cdc29e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,48 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 23
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicStore_d1e9a6() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
atomicStore(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicStore_d1e9a6 "atomicStore_d1e9a6"
|
||||||
fn fragment_main() {
|
OpName %fragment_main "fragment_main"
|
||||||
atomicStore_d1e9a6();
|
OpName %compute_main "compute_main"
|
||||||
}
|
OpDecorate %SB_RW Block
|
||||||
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
[[stage(compute)]]
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw Binding 0
|
||||||
atomicStore_d1e9a6();
|
%int = OpTypeInt 32 1
|
||||||
}
|
%SB_RW = OpTypeStruct %int
|
||||||
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%atomicStore_d1e9a6 = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
OpAtomicStore %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicStore_d1e9a6
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicStore_d1e9a6
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,51 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 24
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<u32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicXor_54510e() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : u32 = atomicXor(&(sb_rw.arg_0), 1u);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicXor_54510e "atomicXor_54510e"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicXor_54510e();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicXor_54510e();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%uint = OpTypeInt 32 0
|
||||||
|
%SB_RW = OpTypeStruct %uint
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%17 = OpConstantNull %uint
|
||||||
|
%atomicXor_54510e = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %17
|
||||||
|
%14 = OpAccessChain %_ptr_StorageBuffer_uint %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicXor %uint %14 %uint_1 %uint_0 %uint_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%19 = OpLabel
|
||||||
|
%20 = OpFunctionCall %void %atomicXor_54510e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%22 = OpLabel
|
||||||
|
%23 = OpFunctionCall %void %atomicXor_54510e
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,36 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<i32>;
|
; Bound: 20
|
||||||
|
; Schema: 0
|
||||||
fn atomicXor_75dc95() {
|
OpCapability Shader
|
||||||
var res : i32 = atomicXor(&(arg_0), 1);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicXor_75dc95 "atomicXor_75dc95"
|
||||||
atomicXor_75dc95();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%int = OpTypeInt 32 1
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_int Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%16 = OpConstantNull %int
|
||||||
|
%atomicXor_75dc95 = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %16
|
||||||
|
%8 = OpAtomicXor %int %arg_0 %uint_2 %uint_0 %int_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%18 = OpLabel
|
||||||
|
%19 = OpFunctionCall %void %atomicXor_75dc95
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,25 +1,53 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
[[block]]
|
; Bound: 26
|
||||||
struct SB_RW {
|
; Schema: 0
|
||||||
arg_0 : atomic<i32>;
|
OpCapability Shader
|
||||||
};
|
OpMemoryModel Logical GLSL450
|
||||||
|
OpEntryPoint Fragment %fragment_main "fragment_main"
|
||||||
[[group(0), binding(0)]] var<storage, read_write> sb_rw : SB_RW;
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %fragment_main OriginUpperLeft
|
||||||
fn atomicXor_c1b78c() {
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
var res : i32 = atomicXor(&(sb_rw.arg_0), 1);
|
OpName %SB_RW "SB_RW"
|
||||||
}
|
OpMemberName %SB_RW 0 "arg_0"
|
||||||
|
OpName %sb_rw "sb_rw"
|
||||||
[[stage(fragment)]]
|
OpName %atomicXor_c1b78c "atomicXor_c1b78c"
|
||||||
fn fragment_main() {
|
OpName %res "res"
|
||||||
atomicXor_c1b78c();
|
OpName %fragment_main "fragment_main"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
OpDecorate %SB_RW Block
|
||||||
[[stage(compute)]]
|
OpMemberDecorate %SB_RW 0 Offset 0
|
||||||
fn compute_main() {
|
OpDecorate %sb_rw DescriptorSet 0
|
||||||
atomicXor_c1b78c();
|
OpDecorate %sb_rw Binding 0
|
||||||
}
|
%int = OpTypeInt 32 1
|
||||||
|
%SB_RW = OpTypeStruct %int
|
||||||
Failed to generate: unable to convert type: __atomic__i32
|
%_ptr_StorageBuffer_SB_RW = OpTypePointer StorageBuffer %SB_RW
|
||||||
|
%sb_rw = OpVariable %_ptr_StorageBuffer_SB_RW StorageBuffer
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%5 = OpTypeFunction %void
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
||||||
|
%int_1 = OpConstant %int 1
|
||||||
|
%_ptr_Function_int = OpTypePointer Function %int
|
||||||
|
%19 = OpConstantNull %int
|
||||||
|
%atomicXor_c1b78c = OpFunction %void None %5
|
||||||
|
%8 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_int Function %19
|
||||||
|
%15 = OpAccessChain %_ptr_StorageBuffer_int %sb_rw %uint_0
|
||||||
|
%9 = OpAtomicXor %int %15 %uint_1 %uint_0 %int_1
|
||||||
|
OpStore %res %9
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%fragment_main = OpFunction %void None %5
|
||||||
|
%21 = OpLabel
|
||||||
|
%22 = OpFunctionCall %void %atomicXor_c1b78c
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %5
|
||||||
|
%24 = OpLabel
|
||||||
|
%25 = OpFunctionCall %void %atomicXor_c1b78c
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
SKIP: FAILED
|
; SPIR-V
|
||||||
|
; Version: 1.3
|
||||||
|
; Generator: Google Tint Compiler; 0
|
||||||
var<workgroup> arg_0 : atomic<u32>;
|
; Bound: 19
|
||||||
|
; Schema: 0
|
||||||
fn atomicXor_c8e6be() {
|
OpCapability Shader
|
||||||
var res : u32 = atomicXor(&(arg_0), 1u);
|
OpMemoryModel Logical GLSL450
|
||||||
}
|
OpEntryPoint GLCompute %compute_main "compute_main"
|
||||||
|
OpExecutionMode %compute_main LocalSize 1 1 1
|
||||||
[[stage(compute)]]
|
OpName %arg_0 "arg_0"
|
||||||
fn compute_main() {
|
OpName %atomicXor_c8e6be "atomicXor_c8e6be"
|
||||||
atomicXor_c8e6be();
|
OpName %res "res"
|
||||||
}
|
OpName %compute_main "compute_main"
|
||||||
|
%uint = OpTypeInt 32 0
|
||||||
Failed to generate: unable to convert type: __atomic__u32
|
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
|
||||||
|
%arg_0 = OpVariable %_ptr_Workgroup_uint Workgroup
|
||||||
|
%void = OpTypeVoid
|
||||||
|
%4 = OpTypeFunction %void
|
||||||
|
%uint_2 = OpConstant %uint 2
|
||||||
|
%uint_0 = OpConstant %uint 0
|
||||||
|
%uint_1 = OpConstant %uint 1
|
||||||
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||||
|
%15 = OpConstantNull %uint
|
||||||
|
%atomicXor_c8e6be = OpFunction %void None %4
|
||||||
|
%7 = OpLabel
|
||||||
|
%res = OpVariable %_ptr_Function_uint Function %15
|
||||||
|
%8 = OpAtomicXor %uint %arg_0 %uint_2 %uint_0 %uint_1
|
||||||
|
OpStore %res %8
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
%compute_main = OpFunction %void None %4
|
||||||
|
%17 = OpLabel
|
||||||
|
%18 = OpFunctionCall %void %atomicXor_c8e6be
|
||||||
|
OpReturn
|
||||||
|
OpFunctionEnd
|
||||||
|
|
Loading…
Reference in New Issue