Skip to content

Commit 2683ee0

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents 35b9364 + 2554b70 commit 2683ee0

File tree

178 files changed

+2937
-2491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+2937
-2491
lines changed

.gitmodules

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
[submodule "murmur3"]
2-
path = murmur3
3-
url = https://github.com/PeterScott/murmur3
41
[submodule "SPIRV-Headers"]
52
path = SPIRV-Headers
63
url = https://github.com/shady-gang/SPIRV-Headers.git
4+
branch = main

doc/code_style.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have a good reason for breaking any of those rules we're happy to conside
1212
* `{ spaces, surrounding, initializer, lists }`
1313
* Unless you're literally contributing using a 80-column display (for which I'll ask visual proof), don't format your code as if you do.
1414
* Include order:
15-
* If appropriate, (Private) `self.h` should always come first
15+
* If appropriate, (Private) `self.h` should always come first, with other local headers in the same group
1616
* Then other `shady/` headers
1717
* Then in-project utility headers
1818
* Then external headers
@@ -26,6 +26,7 @@ Due to C not having namespaces, we have to deal with this painfully automatable
2626
* Avoid exposing any symbols that don't need to be exposed (use `static` wherever you can)
2727
* Prefixes:
2828
* `shd_` in front of API functions (in the root `include` folder)
29+
* `slim_`, `l2s_`, `spv_` and `vcc_` are used in various sub-projects
2930
* `subsystem_` is acceptable for internal use
3031
* `shd_subsystem_` is preferable where a clear delineation can be made
3132
* `shd_new_thing` and `shd_destroy_thing` for constructors and destructors

include/shady/be/c.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef struct {
1818
int glsl_version;
1919
} CEmitterConfig;
2020

21-
CEmitterConfig default_c_emitter_config(void);
21+
CEmitterConfig shd_default_c_emitter_config(void);
2222

2323
typedef struct CompilerConfig_ CompilerConfig;
2424
void shd_emit_c(const CompilerConfig* compiler_config, CEmitterConfig config, Module* mod, size_t* output_size, char** output, Module** new_mod);

include/shady/be/dump.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
void shd_dump_module(Module* mod);
1010
void shd_dump_node(const Node* node);
1111

12-
void dump_cfgs(FILE* output, Module* mod);
13-
void dump_loop_trees(FILE* output, Module* mod);
12+
void shd_dump_cfgs(FILE* output, Module* mod);
13+
void shd_dump_loop_trees(FILE* output, Module* mod);
1414

1515
#endif
1616

include/shady/be/spirv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "shady/ir/base.h"
55

66
typedef struct CompilerConfig_ CompilerConfig;
7-
void emit_spirv(const CompilerConfig* config, Module*, size_t* output_size, char** output, Module** new_mod);
7+
void shd_emit_spirv(const CompilerConfig* config, Module* mod, size_t* output_size, char** output, Module** new_mod);
88

99
#endif
1010

include/shady/body_builder.h

Lines changed: 0 additions & 66 deletions
This file was deleted.

include/shady/fe/slim.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
#include "shady/ir/module.h"
55
#include "shady/config.h"
66

7-
typedef enum {
8-
SlimOpDereference,
9-
SlimOpAssign,
10-
SlimOpAddrOf,
11-
SlimOpSubscript,
12-
SlimOpBindVal,
13-
SlimOpBindVar,
14-
SlimOpBindContinuations,
15-
SlimOpUnbound,
16-
} SlimFrontEndOpCodes;
17-
187
typedef struct {
198
bool front_end;
209
} SlimParserConfig;

include/shady/ir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "shady/ir/function.h"
2020
#include "shady/ir/decl.h"
2121

22-
#include "shady/body_builder.h"
22+
#include "shady/ir/builder.h"
2323
#include "shady/analysis/literal.h"
2424

2525
#endif

include/shady/ir/base.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ Nodes shd_concat_nodes(IrArena* arena, Nodes a, Nodes b);
4444
Nodes shd_change_node_at_index(IrArena* arena, Nodes old, size_t i, const Node* n);
4545
bool shd_find_in_nodes(Nodes nodes, const Node* n);
4646

47-
String string_sized(IrArena*, size_t size, const char* start);
48-
String string(IrArena*, const char*);
47+
String shd_string_sized(IrArena*, size_t size, const char* start);
48+
String shd_string(IrArena*, const char*);
4949

5050
// see also: format_string in util.h
5151
String shd_fmt_string_irarena(IrArena* arena, const char* str, ...);
52-
String unique_name(IrArena*, const char* base_name);
52+
String shd_make_unique_name(IrArena* arena, const char* str);
5353

5454
#endif

0 commit comments

Comments
 (0)