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
Commits
ca77a04e
Commit
ca77a04e
authored
6 months ago
by
Tobias Frisch
Browse files
Options
Downloads
Plain Diff
Merge branch '144-slang-compiler' into 'develop'
Resolve "Slang Compiler" Closes
#144
See merge request
!115
parents
ea60d494
c7b5f3c2
No related branches found
Branches containing commit
No related tags found
1 merge request
!115
Resolve "Slang Compiler"
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/shader_compiler/src/vkcv/shader/SlimCompiler.cpp
+19
-19
19 additions, 19 deletions
modules/shader_compiler/src/vkcv/shader/SlimCompiler.cpp
with
19 additions
and
19 deletions
modules/shader_compiler/src/vkcv/shader/SlimCompiler.cpp
+
19
−
19
View file @
ca77a04e
...
@@ -14,15 +14,15 @@ namespace vkcv::shader {
...
@@ -14,15 +14,15 @@ namespace vkcv::shader {
:
ShadyCompiler
(),
m_target
(
target
)
{}
:
ShadyCompiler
(),
m_target
(
target
)
{}
static
bool
shadyCompileModule
(
Module
*
module
,
static
bool
shadyCompileModule
(
Module
*
module
,
ShaderStage
shaderStage
,
ShaderStage
shaderStage
,
const
std
::
string
&
shaderSource
,
const
std
::
string
&
shaderSource
,
const
ShaderCompiledFunction
&
compiled
,
const
ShaderCompiledFunction
&
compiled
,
const
std
::
filesystem
::
path
&
includePath
)
{
const
std
::
filesystem
::
path
&
includePath
)
{
ShadyErrorCodes
codes
=
driver_load_source_file
(
ShadyErrorCodes
codes
=
driver_load_source_file
(
SrcSlim
,
SrcSlim
,
shaderSource
.
length
(),
shaderSource
.
length
(),
shaderSource
.
c_str
(),
shaderSource
.
c_str
(),
module
module
);
);
switch
(
codes
)
{
switch
(
codes
)
{
...
@@ -46,7 +46,7 @@ namespace vkcv::shader {
...
@@ -46,7 +46,7 @@ namespace vkcv::shader {
DriverConfig
config
=
default_driver_config
();
DriverConfig
config
=
default_driver_config
();
config
.
target
=
TgtSPV
;
config
.
target
=
TgtSPV
;
config
.
output_filename
=
tmp_path
.
string
().
c_str
();
config
.
output_filename
=
tmp_path
.
string
().
c_str
();
codes
=
driver_compile
(
&
config
,
module
);
codes
=
driver_compile
(
&
config
,
module
);
...
@@ -78,10 +78,10 @@ namespace vkcv::shader {
...
@@ -78,10 +78,10 @@ namespace vkcv::shader {
}
}
static
bool
shadyCompileArena
(
IrArena
*
arena
,
static
bool
shadyCompileArena
(
IrArena
*
arena
,
ShaderStage
shaderStage
,
ShaderStage
shaderStage
,
const
std
::
string
&
shaderSource
,
const
std
::
string
&
shaderSource
,
const
ShaderCompiledFunction
&
compiled
,
const
ShaderCompiledFunction
&
compiled
,
const
std
::
filesystem
::
path
&
includePath
)
{
const
std
::
filesystem
::
path
&
includePath
)
{
Module
*
module
=
new_module
(
arena
,
"slim_module"
);
Module
*
module
=
new_module
(
arena
,
"slim_module"
);
if
(
nullptr
==
module
)
{
if
(
nullptr
==
module
)
{
...
@@ -92,11 +92,11 @@ namespace vkcv::shader {
...
@@ -92,11 +92,11 @@ namespace vkcv::shader {
return
shadyCompileModule
(
module
,
shaderStage
,
shaderSource
,
compiled
,
includePath
);
return
shadyCompileModule
(
module
,
shaderStage
,
shaderSource
,
compiled
,
includePath
);
}
}
bool
SlimCompiler
::
compileSource
(
ShaderStage
shaderStage
,
bool
SlimCompiler
::
compileSource
(
ShaderStage
shaderStage
,
const
std
::
string
&
shaderSource
,
const
std
::
string
&
shaderSource
,
const
ShaderCompiledFunction
&
compiled
,
const
ShaderCompiledFunction
&
compiled
,
const
std
::
filesystem
::
path
&
includePath
)
{
const
std
::
filesystem
::
path
&
includePath
)
{
if
(
ShaderStage
::
COMPUTE
!=
shaderStage
)
{
if
(
ShaderStage
::
COMPUTE
!=
shaderStage
)
{
vkcv_log
(
LogLevel
::
ERROR
,
"Shader stage not supported"
);
vkcv_log
(
LogLevel
::
ERROR
,
"Shader stage not supported"
);
return
false
;
return
false
;
}
}
...
@@ -112,7 +112,7 @@ namespace vkcv::shader {
...
@@ -112,7 +112,7 @@ namespace vkcv::shader {
bool
result
=
shadyCompileArena
(
arena
,
shaderStage
,
shaderSource
,
compiled
,
includePath
);
bool
result
=
shadyCompileArena
(
arena
,
shaderStage
,
shaderSource
,
compiled
,
includePath
);
destroy_ir_arena
(
arena
);
destroy_ir_arena
(
arena
);
return
result
;
return
result
;
}
}
}
}
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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