Comments (3)
According to Yong in offline discussion, globals are a can of worms, implying this is at least a medium or large size task.
from slang.
One consideration is whether this can be worked around with globals passed as function parameters.
from slang.
Yong He
14 minutes ago
We have concluded that we won't deal with global variables previously, right?
Adam Cheney
14 minutes ago
I thought it was just deferred.
NEW
Yong He
14 minutes ago
So let's not work on this.
Yong He
13 minutes ago
spirv has higher priority.
Adam Cheney
13 minutes ago
Right, is it low priority or a limitation we're just accepting indefinitely?
Adam Cheney
12 minutes ago
If low priority, then it gets pushed to EOY.
Yong He
12 minutes ago
this particular crash though, I think is a bug we may need to fix.
Yong He
12 minutes ago
I don';t think that crash is related to downstream embedding at all.
Yong He
11 minutes ago
But supporting shared cbuffers fully with downstream embedding, no I don't think that is our current scope.
Yong He
11 minutes ago
slang should never crash, especially in the reflection API and in the front end.
Yong He
10 minutes ago
we can allow it to produce invalid dxil if cbuffer is used cross module.
Adam Cheney
10 minutes ago
It didn't really crash, it just reports an error.
Yong He
10 minutes ago
yeah, there should be no front end errors.
Yong He
10 minutes ago
This is totally valid code.
Yong He
8 minutes ago
In the mid future, we want to ban precompilation of modules that defines any global shader parameters. (edited)
Yong He
7 minutes ago
Like we can have a diagnostic when the user is trying to precompile buffers modules.
Yong He
7 minutes ago
Because bufferrs define a cbuffer that is effecitvely a global shader paraemter.
Yong He
7 minutes ago
That makes buffers ineligible for precompilation.
Yong He
5 minutes ago
An alternative is to allow use of global variables, but all modules linked together must have consistent binding/pipeline layout.
Yong He
5 minutes ago
We don't have to verify that ourselves, and we can leave it to the user.
Yong He
4 minutes ago
But I don't want us to get into this right now, before we have a working spirv path.
Adam Cheney
3 minutes ago
I'll defer it until after the SPIRV path is in place then.
Adam Cheney
2 minutes ago
It seems like it would be fairly easy to avoid precompiling modules that define public global variables.
from slang.
Related Issues (20)
- Resource variables used in a global initializer function do not hoist correctly
- Error not propagated from failed DXC compile
- `tests\autodiff\reverse-while-loop-3.slang` has incorrect results
- `kIROp_MakeStruct` differentiates when it should not be differentiating
- Uninitialized variable check will infinitely loop if pointer to a specialized IR object is used
- `DifferentialType` `ownedScope` does not track an associated `ContainerDecl`
- Problem with exported matrices in DxcLinker HOT 1
- Support generic type constraints that are dependent on another generic type parameter.
- Initial precompiled SPIR-V support (-embed-spirv)
- Autodiff Usability: CLI and API methods to extract per-instruction context overhead information HOT 1
- Reflection API: Add features needed for slangpy
- Auto documentation code does not correctly exclude synthesized decl's from documentation
- Support `where` clause for defining generic constraints.
- Implement autodiff support for Tuple types.
- Implement `IFunc` proposal.
- Emit valid WGSL for all compute tests
- `tests\autodiff\generic-jvp.slang` test is incorrect
- Document rules for initializer lists
- Capabilities and warning HOT 1
- Reuse graphics device in slang-test over multiple tests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slang.