Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
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
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Merge requests
!115
Resolve "Slang Compiler"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Slang Compiler"
144-slang-compiler
into
develop
Overview
2
Commits
7
Pipelines
0
Changes
1
Merged
Tobias Frisch
requested to merge
144-slang-compiler
into
develop
1 year ago
Overview
2
Commits
7
Pipelines
0
Changes
1
Expand
Closes
#144 (closed)
0
0
Merge request reports
Viewing commit
6fcadc36
Prev
Next
Show latest version
1 file
+
15
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Unverified
6fcadc36
Use macros in slang compiler
· 6fcadc36
Jacki
authored
6 months ago
Signed-off-by:
Jacki
<
jacki@thejackimonster.de
>
modules/shader_compiler/src/vkcv/shader/SlangCompiler.cpp
+
15
−
0
Options
@@ -107,6 +107,21 @@ namespace vkcv::shader {
sessionDesc
.
searchPaths
=
&
searchPath
;
sessionDesc
.
searchPathCount
=
1
;
std
::
vector
<
slang
::
PreprocessorMacroDesc
>
macros
;
macros
.
reserve
(
m_defines
.
size
());
for
(
const
auto
&
define
:
m_defines
)
{
const
slang
::
PreprocessorMacroDesc
macro
=
{
define
.
first
.
c_str
(),
define
.
second
.
c_str
()
};
macros
.
push_back
(
macro
);
}
sessionDesc
.
preprocessorMacros
=
macros
.
data
();
sessionDesc
.
preprocessorMacroCount
=
macros
.
size
();
Slang
::
ComPtr
<
slang
::
ISession
>
session
;
if
(
SLANG_FAILED
(
s_GlobalSession
->
createSession
(
sessionDesc
,
session
.
writeRef
())))
{
vkcv_log
(
LogLevel
::
ERROR
,
"Compiler session could not be created"
);
Loading