-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crate, Example, Documentation and Test Organisation #170
Comments
I support this though I would restructure the example code differently:
|
@termhn That seems good to me, though it's a bit non-obvious that whether |
Yeah exactly. That's basically the goal of #109 (make all of the examples be able to run all the shaders with same output) |
I like @termhn proposed structure, with the added caveat that I think most shaders will not be separate crates, but be a large crate with many of them in, or rather a set of collections of them. so instead of Snapshot of Ark shaders likely will be its own crate for ease of use and keep separate and have the old GLSL shaders in also for reference. Another note about shaders, we'll have many different types of shaders, not just "examples", will also be sets of shaders from other sources (such as Ark) that we experiment with, are porting and maintaining as part of the dev of this, and there will be shaders as in loose separate files that are only there to test specific functionality. Some of them will be embedded in actual tests but larger ones likely will be part of separate standalone crates in the repo. So may want to have The benefit of having a separate The CPU direct evaluation example will continue to directly link just specific set of shaders and will ever only be able to run very few of them.
Was leaning towards that as well. Would be the main native binary crates + shader library crates that we maintain, but not our example/test shaders.
Yup makes sense, |
Seems good to me, at least for the docs and rfc structuring! |
* get rid of vertex buffers in example * get rid of unused attributes in example shader * use negative viewport height to match wgpu * remove depth buffer * use SRGB surface * improve tonemapping remove 'gamma correction' in favor of hardware srgb support * make clippy happy * move tonemapping out of sky(), rename gl_pos to builtin_pos * rename shaders and use sky shader in wgpu example runner * apply srgb OETF and invert clip space for cpu example runner * restructure example directory structure according to #170 * update winit in wgpu example runner * fix deny.toml example crate refs * fix ci example name on maOS * example-shader -> sky-shader in docs * update sky shader image * re-enable clippy and make it happy
The amount of crates, examples documentation, and tests are expanding pretty rapidly, and some of the layout is already is mildly confusing. I think we should figure out some sort of structure for each.
Crates
Currently we have three dev crates (five with #117) which are at the top level, the top level is already becoming pretty crowded with documentation, and configuration files. I think we should have a
crates/
folder that houses the main development crates.Documentation
Currently we have two directories (
assets
andrfcs
) which are at the top level, but I think since these will be less frequently used I would propose that we should moveassets
intodocs
and moverfcs
intodocs/src
and make it part of the rust GPU dev guide. This has the advantage of making the RFCs viewable in the rust gpu guide directly.Tests
The integration tests for
rustc_codegen_spirv
are currently located insidespirv-builder
inspirv-builder/src/test
. This isn't where I would expect these kinds of tests to be. I propose that we create a new separate crate for holding integration/end-to-end tests (e.g.test_suite
,codegen_test
, etc).Examples
We have four different example crates at the moment, all on the same level in
examples
, however it's not really clear which examples are related, or use each other. I would like to propose adding another level to examples that covers the basic domain of example (e.g. awgpu
directory for wgpu examples), and remove theexample
prefix from the name (e.g.example-runner
→runner
).I've included a
tree
output of what this proposed directory structure would look like if all of these changes implemented below.The text was updated successfully, but these errors were encountered: