<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/core.meta.slang.cpp, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2017-09-27T18:17:39+00:00</updated>
<entry>
<title>First attempt at a Linux build (#193)</title>
<updated>2017-09-27T18:17:39+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2017-09-27T18:17:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=74f2f47cb63b02638270beecd20acea1a0f5665e'/>
<id>urn:sha1:74f2f47cb63b02638270beecd20acea1a0f5665e</id>
<content type='text'>
* First attempt at a Linux build

- Fix up places where C++ idioms were written assuming lenient behavior of Microsoft's compiler

- Add a few more alternatives for platform-specific behavior where Windows was the only platform accounted for.

- Add a basic Makefile that can at least invoke our build, even if it isn't going good dependency tracking, etc.

- Build `libslang.so` and `slangc` that depends on it, using a relative `RPATH` to make the binary portable (I hope)

- Add an initial `.travis.yml` to see if we can trigger their build process.

* Fixup: const bug in `List::Sort`

I'm not clear why this gets picked up by the gcc *and* clang that Travis uses, but not the (newer) gcc I'm using on Ubuntu here, but I'm hoping it is just some missing `const` qualifiers.

* Fixup: reorder specialization of "class info"

Clang complains about things being specialized after being instantiated (implicilty), and I hope it is just the fact that I generate the class info for the roots of the hierarchy after the other cases. We'll see.

* Fixup: add `platform.cpp` to unified/lumped build

* Fixup: Windows uses `FreeLibrary`

and not `UnloadLibrary`

* Fixup: fix Windows project file to include new source file

This obviously points to the fact that we are going to need to be generating these files sooner or later.
</content>
</entry>
<entry>
<title>More work on IR-based lowering and cross-compilation</title>
<updated>2017-09-22T21:18:44+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-09-22T15:24:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1972fa3616af55c223096e9b11465f580530d88f'/>
<id>urn:sha1:1972fa3616af55c223096e9b11465f580530d88f</id>
<content type='text'>
None of these changes are made "live" at the moment. I'm just trying to get them checked in to avoid divering too far from `master` at any point during development.

- Add basic emit logic to produce GLSL from the IR in a few cases (the existing IR emit logic was ad hoc and HLSL-specific)

- When lowering a function declaration, walk up its chain of parent declarations to collect additional parameters as needed

- When lowering a call, make sure to add generic arguments that come from the declaration reference being called

- Attach a "mangled name" to symbols when lowering, so that we can eventually use that name to resolve things for linkage.

- After the above work, I had to apply some fixups to make sure that generic arguments *don't* get added when the user is calling an `__intrinsic_op` function, since those should map 1-to-1 down to instructions with just their ordinary parameter list.

A big open question right now is whether I should continue to represent the generic arguments as just part of the ordinary argument list for a function, or split them out into separate `applyGeneric` and `apply` steps.
A strongly related question is whether a declaration with generic parameters should lower into a single declaration, or one declaration nested inside an outer generic declaration.

A good future step at this point would be to eliminate a lot of the `__intrinsic_op` stuff in favor of having the builtin functions include their own definitions, which might be in terms of a new expression-level construct for writing inline IR operations. This can't be done until the existing AST-to-AST path is no longer needed for cross-compilation purposes.

More immediate next steps here:

- We need a way to round-trip calls to external declaration that get handled by this mangled-name logic. Basically, if we are asked to output HLSL and we see a call to `_S...GetDimensions...(float4, t, a, ...)` we need to be able to walk the mangled name and get back to `t.getDimensions(a, ...)` without a whole lot of manual definitions to make things round-trip.

- In the other case, where a declaration isn't built-in for the chosen target, we need to be able to load a module of target-specific definitions (which will somehow map back to symbols with certain mangled names) and then look these up (by mangled name) and then load/link/inline them into the user's IR to satisfy requirements in their code.
</content>
</entry>
<entry>
<title>Initial work on boilerplate code generator</title>
<updated>2017-09-11T16:50:56+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoley@nvidia.com</email>
</author>
<published>2017-09-07T21:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=14137cbd2ddd7deebcdf8cc85c30d534bec8e40b'/>
<id>urn:sha1:14137cbd2ddd7deebcdf8cc85c30d534bec8e40b</id>
<content type='text'>
The goal here is to get the Slang "standard library" code out of string literals and into something a bit more like an actual code file.
This is handled by having a `slang-generate` tool that can translate a "template" file that mixes raw Slang code (or any language we want to generate...) with generation logic that is implemented in C++ (currently).

This work isn't final by any stretch of the imagination, but it moves a lot of code and not merging it ASAP will complicate other changes.
My expectation is that the generator tool will be beefed up on an as-needed basis, to get our stdlib code working.

Similarly, the stdlib code does not really take advantage of the new approach as much as it could. That is something we can clean up along the way as we do modifications of the stdlib.
</content>
</entry>
</feed>
