Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GrayScott Reloaded - Rust practical
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
Authenticating with a password
with git over http
works again
. More information
here
.
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GRASLAND Hadrien
GrayScott Reloaded - Rust practical
Commits
c5e34a83
Commit
c5e34a83
authored
9 months ago
by
Hadrien Grasland
Browse files
Options
Downloads
Patches
Plain Diff
Review chapter 23
parent
5f2791a2
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
handouts/src/23-gazoduc.md
+6
-4
6 additions, 4 deletions
handouts/src/23-gazoduc.md
with
6 additions
and
4 deletions
handouts/src/23-gazoduc.md
+
6
−
4
View file @
c5e34a83
...
@@ -36,7 +36,8 @@ First of all, `vulkano-shaders` generated SPIR-V code from our GLSL, but we must
...
@@ -36,7 +36,8 @@ First of all, `vulkano-shaders` generated SPIR-V code from our GLSL, but we must
turn it into a device-specific
turn it into a device-specific
[
`ShaderModule`
](
https://docs.rs/vulkano/latest/vulkano/shader/struct.ShaderModule.html
)
[
`ShaderModule`
](
https://docs.rs/vulkano/latest/vulkano/shader/struct.ShaderModule.html
)
before we do anything with it. This is done using the
`load()`
function that
before we do anything with it. This is done using the
`load()`
function that
`vulkano-shaders`
also generated for us within the
`shader`
module:
`vulkano-shaders`
also generated for us within the
`gpu::pipeline::shader`
module:
```
rust,ignore
```
rust,ignore
let
shader_module
=
shader
::
load
(
context
.device
.clone
())
?
;
let
shader_module
=
shader
::
load
(
context
.device
.clone
())
?
;
...
@@ -92,7 +93,7 @@ basic default configuration from the shader itself:
...
@@ -92,7 +93,7 @@ basic default configuration from the shader itself:
use
vulkano
::
pipeline
::
layout
::
PipelineDescriptorSetLayoutCreateInfo
;
use
vulkano
::
pipeline
::
layout
::
PipelineDescriptorSetLayoutCreateInfo
;
let
mut
layout_info
=
let
mut
layout_info
=
PipelineDescriptorSetLayoutCreateInfo
::
from_stages
(
&
[
shader_stage
]);
PipelineDescriptorSetLayoutCreateInfo
::
from_stages
([
&
shader_stage
]);
```
```
There are three parts to the pipeline layout configuration:
There are three parts to the pipeline layout configuration:
...
@@ -184,7 +185,8 @@ With that, we are done configuring our descriptors, so we can finalize our
...
@@ -184,7 +185,8 @@ With that, we are done configuring our descriptors, so we can finalize our
descriptor set layouts...
descriptor set layouts...
```
rust,ignore
```
rust,ignore
let
layout_info
=
layout_info
.into_pipeline_layout_create_info
()
?
;
let
layout_info
=
layout_info
.into_pipeline_layout_create_info
(
context
.device
.clone
())
?
;
```
```
...create our compute pipeline layout...
...create our compute pipeline layout...
...
@@ -205,7 +207,7 @@ use vulkano::pipeline::compute::{ComputePipeline, ComputePipelineCreateInfo};
...
@@ -205,7 +207,7 @@ use vulkano::pipeline::compute::{ComputePipeline, ComputePipelineCreateInfo};
let
pipeline
=
ComputePipeline
::
new
(
let
pipeline
=
ComputePipeline
::
new
(
context
.device
.clone
(),
context
.device
.clone
(),
Some
(
context
.pipeline_cache.cache
.clone
()),
Some
(
context
.pipeline_cache.cache
.clone
()),
create_info
:
ComputePipelineCreateInfo
::
stage_layout
(
shader_stage
,
layout
),
ComputePipelineCreateInfo
::
stage_layout
(
shader_stage
,
layout
),
)
?
;
)
?
;
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment