1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2024-12-22 20:22:02 +00:00
Commit graph

40 commits

Author SHA1 Message Date
ReinUsesLisp
42248408a9 Remove Emit entry in favor of auto-emitting code
All instructions but OpVariable and OpLabel are automatically emitted.
These functions have to call AddLocalVariable/AddGlobalVariable or
AddLabel respectively.
2019-10-18 04:27:52 -03:00
ReinUsesLisp
8cf3d225db Assemble uint32_t instead of uint8_t
Vulkan receives SPIR-V modules with a uint32_t alignment. Returning
uint8_t forced users to invoke undefined behaviour (reinterpret_cast)
or copy.
2019-10-18 03:46:47 -03:00
ReinUsesLisp
d24685ebd3 Revert "operand: Implement operand hashing and use hashed set for declarations"
This reverts commit 1e665afa36.
2019-09-09 16:48:05 -03:00
ReinUsesLisp
58c5406436 Revert "Fix declarations hashing"
This reverts commit bb6a3421d2.
2019-09-09 16:47:58 -03:00
ReinUsesLisp
bb6a3421d2 Fix declarations hashing 2019-09-09 16:46:46 -03:00
ReinUsesLisp
60a856d266 Relicense to The BSD 3-clause license 2019-07-14 18:50:44 -03:00
ReinUsesLisp
1e665afa36 operand: Implement operand hashing and use hashed set for declarations
Instead of manually searching each element in the declarations vector,
use an unordered_set to emplace new declarations avoiding repetition.
2019-06-08 05:23:15 -03:00
Lioncash
47d85b81a7 CMakeLists: Apply compilation flags to the sirit target
Previously this wasn't utilizing any of the compiler flags, meaning it
wasn't applying any of the specified warnings.

Since applying the warnings to the target, this uncovered a few warning
cases, such as shadowing class variables on MSVC, etc, which have been fixed.
2019-03-14 19:30:54 -03:00
Lioncash
6fd44e494c Pass std::string by value where applicable.
By taking the std::string by value in the constructor, this allows for
certain situations where copies can be elided entirely (when moving an
instance into the constructor)

e.g.

std::string var = ...

...

... = LiteralString(std::move(var)) // Or whatever other initialization
                                    // is done.

No copy will be done in this case, the move transfers it into the
constructor, and then the move within the initializer list transfers it
into the member variable.

tl;dr: This allows the calling code to potentially construct less
std::string instances by allowing moving into the parameters themselves.
2019-03-14 04:30:39 -03:00
Lioncash
1081bcdda9 sirit: Remove unused variable in AddAnnotation()
id isn't used within AddAnnotation, so this can be removed.
2019-03-14 02:43:05 -04:00
ReinUsesLisp
057b100a68 Assert on empty Emit 2019-03-13 19:20:29 -03:00
ReinUsesLisp
73595f4588 Change clang-format settings 2019-03-11 03:26:21 -03:00
ReinUsesLisp
b23716087a Add OpExtension 2019-03-08 21:09:11 -03:00
ReinUsesLisp
e7971b4451 Add OpExecutionMode 2018-12-04 21:30:32 -03:00
ReinUsesLisp
93d42e62da Remove WriteEnum abstraction 2018-11-16 04:21:37 -03:00
ReinUsesLisp
f5944d61a6 Upgrade from LGPLv2.1 to LGPLv3 2018-11-16 04:10:10 -03:00
ReinUsesLisp
30dbb951dd Fixup empty GLSL extension creation 2018-11-13 19:30:54 -03:00
ReinUsesLisp
8f17ad84ba Annotations return target and add OpUMod 2018-11-06 04:50:10 -03:00
ReinUsesLisp
6742afd6dd Add support for GLSLstd450 and OpFAbs 2018-11-04 03:03:06 -03:00
ReinUsesLisp
4f66fb18e9 Add version select and OpLogicalNot 2018-11-02 13:38:33 -03:00
ReinUsesLisp
91e0769db5 Fixup build issues 2018-11-01 05:13:30 -03:00
ReinUsesLisp
f3a63aa55f Use unique_ptr for instruction implementations 2018-11-01 00:02:45 -03:00
ReinUsesLisp
63ca1b5243 Rename Ref alias to Id 2018-10-31 22:20:49 -03:00
ReinUsesLisp
00fc8daf56 Use variant instead of creating an object for literals 2018-10-28 14:57:49 -03:00
ReinUsesLisp
3f845b7c48 Fixup build errors 2018-10-28 04:59:15 -03:00
ReinUsesLisp
8c1ab76ce5 Fix "for" incosistencies 2018-10-23 05:09:17 -03:00
ReinUsesLisp
1458bd2c1c Add OpDecorate 2018-10-23 04:45:56 -03:00
ReinUsesLisp
54cc7d06ce Add global variables 2018-10-20 02:52:55 -03:00
ReinUsesLisp
0485e1877c Use some C++17 features 2018-10-03 00:32:45 -03:00
ReinUsesLisp
acea9030c5 Add OpName and debug symbols 2018-08-31 04:40:15 -03:00
ReinUsesLisp
2bafba1a17 Rename Assembly -> Assemble 2018-08-31 03:41:30 -03:00
ReinUsesLisp
edfc77bbbe Rename opcodes -> insts 2018-08-28 04:05:47 -03:00
ReinUsesLisp
954774f9e8 Alias "const Op*" -> "Ref". 2018-08-28 04:01:21 -03:00
ReinUsesLisp
f68dbb20fc Fixup License header 2 -> 2.1 2018-08-26 23:28:39 -03:00
ReinUsesLisp
c0d61d32d4 Fixup License 2018-08-26 22:27:33 -03:00
ReinUsesLisp
c2215fca0e Move flow and function opcodes into their own file 2018-08-26 05:01:31 -03:00
ReinUsesLisp
3bd3688567 Move type opcodes to their own file 2018-08-26 04:49:16 -03:00
ReinUsesLisp
1de01c95ae Rename Ref -> Op 2018-08-25 20:34:06 -03:00
ReinUsesLisp
34d215d3d8 Implement stuff 2018-08-25 20:16:37 -03:00
ReinUsesLisp
5cfa8aa6ab aloha 2018-08-23 04:59:57 -03:00