Add OpGroupNonUniformShuffleXor
This commit is contained in:
parent
3067893923
commit
9b897c3541
4 changed files with 27 additions and 1 deletions
|
@ -939,6 +939,12 @@ public:
|
||||||
/// Query the number of samples available per texel fetch in a multisample image.
|
/// Query the number of samples available per texel fetch in a multisample image.
|
||||||
Id OpImageQuerySamples(Id result_type, Id image);
|
Id OpImageQuerySamples(Id result_type, Id image);
|
||||||
|
|
||||||
|
// Group
|
||||||
|
|
||||||
|
/// Return the value of the invocation identified by the current invocation's id within the
|
||||||
|
/// group xor'ed with mask.
|
||||||
|
Id OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Id AddCode(std::unique_ptr<Op> op);
|
Id AddCode(std::unique_ptr<Op> op);
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ add_library(sirit
|
||||||
instructions/arithmetic.cpp
|
instructions/arithmetic.cpp
|
||||||
instructions/extension.cpp
|
instructions/extension.cpp
|
||||||
instructions/image.cpp
|
instructions/image.cpp
|
||||||
|
instructions/group.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_options(sirit PRIVATE ${SIRIT_CXX_FLAGS})
|
target_compile_options(sirit PRIVATE ${SIRIT_CXX_FLAGS})
|
||||||
|
|
20
src/instructions/group.cpp
Normal file
20
src/instructions/group.cpp
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
/* This file is part of the sirit project.
|
||||||
|
* Copyright (c) 2019 sirit
|
||||||
|
* This software may be used and distributed according to the terms of the
|
||||||
|
* 3-Clause BSD License
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "op.h"
|
||||||
|
#include "sirit/sirit.h"
|
||||||
|
|
||||||
|
namespace Sirit {
|
||||||
|
|
||||||
|
Id Module::OpGroupNonUniformShuffleXor(Id result_type, spv::Scope scope, Id value, Id mask) {
|
||||||
|
auto op = std::make_unique<Op>(spv::Op::OpGroupNonUniformShuffleXor, bound++, result_type);
|
||||||
|
op->Add(static_cast<u32>(scope));
|
||||||
|
op->Add(value);
|
||||||
|
op->Add(mask);
|
||||||
|
return AddCode(std::move(op));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Sirit
|
|
@ -4,7 +4,6 @@
|
||||||
* 3-Clause BSD License
|
* 3-Clause BSD License
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include "op.h"
|
#include "op.h"
|
||||||
#include "sirit/sirit.h"
|
#include "sirit/sirit.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue