blob: 6785346eb1fad1d70d8fcef6adc3566122f34b14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* 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 "sirit/sirit.h"
#include "stream.h"
namespace Sirit {
Id Module::OpUndef(Id result_type) {
code->Reserve(3);
return *code << OpId{spv::Op::OpUndef, result_type} << EndOp{};
}
void Module::OpEmitVertex() {
code->Reserve(1);
*code << spv::Op::OpEmitVertex << EndOp{};
}
void Module::OpEndPrimitive() {
code->Reserve(1);
*code << spv::Op::OpEndPrimitive << EndOp{};
}
void Module::OpEmitStreamVertex(Id stream) {
code->Reserve(2);
*code << spv::Op::OpEmitStreamVertex << stream << EndOp{};
}
void Module::OpEndStreamPrimitive(Id stream) {
code->Reserve(2);
*code << spv::Op::OpEndStreamPrimitive << stream << EndOp{};
}
} // namespace Sirit
|