early-access version 2711
This commit is contained in:
6
externals/sirit/include/sirit/sirit.h
vendored
6
externals/sirit/include/sirit/sirit.h
vendored
@@ -125,6 +125,12 @@ public:
|
||||
/// Returns type integer.
|
||||
Id TypeInt(int width, bool is_signed);
|
||||
|
||||
/// Returns type signed integer.
|
||||
Id TypeSInt(int width);
|
||||
|
||||
/// Returns type unsigned integer.
|
||||
Id TypeUInt(int width);
|
||||
|
||||
/// Returns type float.
|
||||
Id TypeFloat(int width);
|
||||
|
||||
|
8
externals/sirit/src/instructions/type.cpp
vendored
8
externals/sirit/src/instructions/type.cpp
vendored
@@ -28,6 +28,14 @@ Id Module::TypeInt(int width, bool is_signed) {
|
||||
return *declarations << OpId{spv::Op::OpTypeInt} << width << is_signed << EndOp{};
|
||||
}
|
||||
|
||||
Id Module::TypeSInt(int width) {
|
||||
return TypeInt(width, true);
|
||||
}
|
||||
|
||||
Id Module::TypeUInt(int width) {
|
||||
return TypeInt(width, false);
|
||||
}
|
||||
|
||||
Id Module::TypeFloat(int width) {
|
||||
declarations->Reserve(3);
|
||||
return *declarations << OpId{spv::Op::OpTypeFloat} << width << EndOp{};
|
||||
|
1
externals/sirit/src/stream.h
vendored
1
externals/sirit/src/stream.h
vendored
@@ -15,6 +15,7 @@
|
||||
#include <unordered_map>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
||||
#ifndef __cpp_lib_bit_cast
|
||||
#include <cstring>
|
||||
|
Reference in New Issue
Block a user