<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tests/language-feature/namespaces, 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>2025-03-26T02:47:01+00:00</updated>
<entry>
<title>Fix mul operator followed by global scope (#6686)</title>
<updated>2025-03-26T02:47:01+00:00</updated>
<author>
<name>Gangzheng Tong</name>
<email>tonggangzheng@gmail.com</email>
</author>
<published>2025-03-26T02:47:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ff5e04f7f2e50466ed626193941c24b38494a785'/>
<id>urn:sha1:ff5e04f7f2e50466ed626193941c24b38494a785</id>
<content type='text'>
* Fix mul operator followed by global scope

This should fix expr like `2.0f * ::a::b::c`.

But it will no longer parse something like
```
extension&lt;T&gt; Ptr&lt;T&gt; { static void foo(); }
int*::foo() // won't work, but this is a less common case
```

Fixes #6684

* Update simpe-namespace.slang to test global scope</content>
</entry>
<entry>
<title>Fix overload resolution for `ModuleDeclarationDecl` (#6483)</title>
<updated>2025-02-27T18:28:13+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2025-02-27T18:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1fb3c1536587d6ed085f13af78101cbfb3481dca'/>
<id>urn:sha1:1fb3c1536587d6ed085f13af78101cbfb3481dca</id>
<content type='text'>
* Fix overload resolution for `MemberExp`r's base expression

Also fixed an issue where `ModuleDeclarationDecl` priority during overload resolution was inverted.

* Made the fix slightly simpler..

* Update overload-resolve.slang</content>
</entry>
<entry>
<title>Support entrypoints defined in a namespace. (#5011)</title>
<updated>2024-09-05T18:53:14+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-09-05T18:53:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=879ee3d187e577189eba9aed7bc6326b740cb627'/>
<id>urn:sha1:879ee3d187e577189eba9aed7bc6326b740cb627</id>
<content type='text'>
* Support entrypoints defined in a namespace.

* Fix test.</content>
</entry>
<entry>
<title>enable more metal tests (#4326)</title>
<updated>2024-06-10T20:28:36+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-06-10T20:28:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=712ce653d4c3d7284dd71389f31540d0da7f144e'/>
<id>urn:sha1:712ce653d4c3d7284dd71389f31540d0da7f144e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Metal compute tests (#4292)</title>
<updated>2024-06-07T07:28:16+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-06-07T07:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=004fe27a52b7952111ad7e749397aeff499de7ed'/>
<id>urn:sha1:004fe27a52b7952111ad7e749397aeff499de7ed</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Diagnose for invalid decl nesting + namespace lookup fixes. (#3397)</title>
<updated>2023-12-12T00:13:32+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-12-12T00:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ec0224edc3a867bbf059e790ad7b2a1a881a0705'/>
<id>urn:sha1:ec0224edc3a867bbf059e790ad7b2a1a881a0705</id>
<content type='text'>
* Diagnose for invalid decl nesting.

* Fix.

* Fix.

* Fix.

* Fix `namespace` lookup and `using` resolution.

* fix project files.

* revert project files.

* Enhance namespace syntax, docs.

* Fixes.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Warning on lossy implicit casts. (#2367)</title>
<updated>2022-08-18T06:08:34+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2022-08-18T06:08:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=adaea0e993fd8db351b5dad92802e47ed6d0ec77'/>
<id>urn:sha1:adaea0e993fd8db351b5dad92802e47ed6d0ec77</id>
<content type='text'>
* Warning on bool to float conversion.

* Fix test cases.

* Improve.

* LanguageServer: don't show constant value for non constant variables.

* Fix tests.

* Fix warnings in tests.

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Fix issue with multiple namespace openings (#2176)</title>
<updated>2022-04-05T21:53:41+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2022-04-05T21:53:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=464ecb6083f64f903df19b961e2af0075bdf3111'/>
<id>urn:sha1:464ecb6083f64f903df19b961e2af0075bdf3111</id>
<content type='text'>
* #include an absolute path didn't work - because paths were taken to always be relative.

* Added sample-grad-clamp-lod sample.

* Fix handling multiple reopenings of namespaces.</content>
</entry>
<entry>
<title>Convert more tests to use shader objects (#1659)</title>
<updated>2021-01-15T20:10:06+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2021-01-15T20:10:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a'/>
<id>urn:sha1:2a5d5b32348c33aac7ca62aa9a4c2bb7cff8e08a</id>
<content type='text'>
This change converts a large number of our existing tests to use the `ShaderObject` support that was added to the `gfx` layer.

In many cases, tests were just updated to pass `-shaderobj` and the result Just Worked.
In other cases, a `name` attribute had to be added to one or more `TEST_INPUT` lines.

For tests that did not work with shader objects "out of the box," I spent a little bit of time trying to get them work, but fell back to letting those tests run in the older mode.
Future changes to the infrastructure will be needed to get those additional tests working in the new path.

Along with the changes to test files, the following implementation changes were made to get additional tests working:

* Because the shader object mode uses explicit register bindings (from reflection), the hacky logic that was offseting `u` registers for D3D12 based on the number of render targets gets disabled (by another hack).

* The "flat" reflection information coming from Slang was not correctly reporting "binding ranges" for things that consumed only uniform data (which would be everything on CUDA/CPU), so it was refactored to properly include binding ranges for anything where the type of the field/variable implied a binding range should be created (even if the `LayoutResourceKind` was `::Uniform`).

* A few fixes were made to the CUDA implementation of `Renderer`, in order to get additional tests up and running. Most of these changes had to do with texture bindings, which hadn't really been tested previously.

In addition, a few changes were made that were attempts at getting more tests working, but didn't actually help. These could be dropped if requested:

* As a quality-of-life feature (not being used) the `object` style of `TEST_INPUT` line is upgraded to support inferring the type to use from the type of the input being set.

* Any `object` shader input lines get ignored in non-shader-object mode.</content>
</entry>
<entry>
<title>Initial support for a using construct (#1506)</title>
<updated>2020-08-20T15:23:51+00:00</updated>
<author>
<name>Tim Foley</name>
<email>tfoleyNV@users.noreply.github.com</email>
</author>
<published>2020-08-20T15:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=11748a75e66c2bd3fa7ef7635fd35363465f599c'/>
<id>urn:sha1:11748a75e66c2bd3fa7ef7635fd35363465f599c</id>
<content type='text'>
The basic idea is that if you have a namespace:

    namespace MyCoolNamespace { void f() { ... } ... }

then you can bring the declarations from that namespace into scope with:

    using MyCoolNamespace;
    f();

The `using` construct is allowed in any scope where declarations are allowed. As an additional feature, the construct allows and then ignores the keyword `namespace` if it occurs right after `using`:

    using namespace MyCoolNamespace;

Note that unlike in C++, `using` a namespace inside another namespace doesn't implicitly make the symbols available to clients of that namespace:

    namespace hidden { void secret() {...} ... }
    namespace api { using hidden; ... }

    api.secret(); // ERROR: `secret()` isn't a member of `api`

The implementation of this feature was relatively simple, although it does leave out more advanced features that might be desirable in the future:

* No support for `using MCN = MyCoolNamespace` sorts of tricks to define a short name

* No support for `using` anything that isn't a namespace (e.g., to make the members of a type available without qualification)

* No support for cases where multiple visible modules have a namespace of the same name (or dealing with overloaded namespaces in general)</content>
</entry>
</feed>
